Danny830x

0002_auto_add_field_notecard_notecard_html.py

Apr 13th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.07 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. import datetime
  3. from south.db import db
  4. from south.v2 import SchemaMigration
  5. from django.db import models
  6.  
  7.  
  8. class Migration(SchemaMigration):
  9.  
  10.     def forwards(self, orm):
  11.         # Adding field 'Notecard.notecard_html'
  12.         db.add_column('notecards_notecard', 'notecard_html',
  13.                       self.gf('django.db.models.fields.TextField')(default=datetime.datetime(2012, 4, 12, 0, 0)),
  14.                       keep_default=False)
  15.  
  16.     def backwards(self, orm):
  17.         # Deleting field 'Notecard.notecard_html'
  18.         db.delete_column('notecards_notecard', 'notecard_html')
  19.  
  20.     models = {
  21.         'auth.group': {
  22.             'Meta': {'object_name': 'Group'},
  23.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  24.             'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  25.             'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  26.         },
  27.         'auth.permission': {
  28.             'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  29.             'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  30.             'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  31.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  32.             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  33.         },
  34.         'auth.user': {
  35.             'Meta': {'object_name': 'User'},
  36.             'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  37.             'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  38.             'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  39.             'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  40.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  41.             'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  42.             'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  43.             'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  44.             'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  45.             'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  46.             'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  47.             'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  48.             'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  49.         },
  50.         'contenttypes.contenttype': {
  51.             'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  52.             'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  53.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  54.             'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  55.             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  56.         },
  57.         'notecards.notecard': {
  58.             'Meta': {'object_name': 'Notecard'},
  59.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  60.             'known': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  61.             'notecard_body': ('django.db.models.fields.TextField', [], {}),
  62.             'notecard_html': ('django.db.models.fields.TextField', [], {}),
  63.             'notecard_name': ('django.db.models.fields.TextField', [], {}),
  64.             'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notecards.Section']"})
  65.         },
  66.         'notecards.section': {
  67.             'Meta': {'object_name': 'Section'},
  68.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  69.             'section_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
  70.             'semester': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['notecards.Semester']"})
  71.         },
  72.         'notecards.semester': {
  73.             'Meta': {'object_name': 'Semester'},
  74.             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  75.             'semester_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
  76.             'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
  77.         }
  78.     }
  79.  
  80.     complete_apps = ['notecards']
Advertisement
Add Comment
Please, Sign In to add comment