text: # -*- coding: utf-8 -*-
  from south.utils import datetime_utils as datetime
  from south.db import db
  from south.v2 import SchemaMigration
  from django.db import models
  
  
  class Migration(SchemaMigration):
  
      def forwards(self, orm):
          # Adding model 'Blog'
          db.create_table(u'blog_blog', (
              (u'contentmodel_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['core.ContentModel'], unique=True, primary_key=True)),
          ))
          db.send_create_signal(u'blog', ['Blog'])
  
          # Adding model 'BlogEntry'
          db.create_table(u'blog_blogentry', (
              (u'contentmodel_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['core.ContentModel'], unique=True, primary_key=True)),
              ('blog', self.gf('django.db.models.fields.related.ForeignKey')(related_name='entries', to=orm['blog.Blog'])),
              ('authors_alternate', self.gf('django.db.models.fields.CharField')(max_length=512, null=True, blank=True)),
          ))
          db.send_create_signal(u'blog', ['BlogEntry'])
  
          # Adding M2M table for field author_users on 'BlogEntry'
          m2m_table_name = db.shorten_name(u'blog_blogentry_author_users')
          db.create_table(m2m_table_name, (
              ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
              ('blogentry', models.ForeignKey(orm[u'blog.blogentry'], null=False)),
              ('enduser', models.ForeignKey(orm[u'authentication.enduser'], null=False))
          ))
          db.create_unique(m2m_table_name, ['blogentry_id', 'enduser_id'])
  
  
      def backwards(self, orm):
          # Deleting model 'Blog'
          db.delete_table(u'blog_blog')
  
          # Deleting model 'BlogEntry'
          db.delete_table(u'blog_blogentry')
  
          # Removing M2M table for field author_users on 'BlogEntry'
          db.delete_table(db.shorten_name(u'blog_blogentry_author_users'))
  
  
      models = {
          u'auth.group': {
              'Meta': {'object_name': 'Group'},
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
              'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
          },
          u'auth.permission': {
              'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
              'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          u'authentication.enduser': {
              'Meta': {'object_name': 'EndUser'},
              'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'company_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}),
              'crop_from': ('django.db.models.fields.CharField', [], {'default': "'center'", 'max_length': '10', 'blank': 'True'}),
              'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
              'date_taken': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'effect': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'enduser_related'", 'null': 'True', 'to': u"orm['photologue.PhotoEffect']"}),
              'email': ('django.db.models.fields.EmailField', [], {'db_index': 'True', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
              'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
              'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_console_user': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_regular_user': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'job_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
              'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'mobile_number': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
              'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
              'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
              'state_province': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
              'street_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'}),
              'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
              'username': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
              'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
              'web_address': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'zip_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'})
          },
          u'blog.blog': {
              'Meta': {'ordering': "['order', '-publish_at']", 'object_name': 'Blog', '_ormbases': [u'core.ContentModel']},
              u'contentmodel_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['core.ContentModel']", 'unique': 'True', 'primary_key': 'True'})
          },
          u'blog.blogentry': {
              'Meta': {'ordering': "['order', '-publish_at']", 'object_name': 'BlogEntry', '_ormbases': [u'core.ContentModel']},
              'author_users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'blog_entries_authored'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['authentication.EndUser']"}),
              'authors_alternate': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
              'blog': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entries'", 'to': u"orm['blog.Blog']"}),
              u'contentmodel_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['core.ContentModel']", 'unique': 'True', 'primary_key': 'True'})
          },
          u'contenttypes.contenttype': {
              'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
              'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
          },
          u'core.contentmodel': {
              'Meta': {'ordering': "['order', '-publish_at']", 'object_name': 'ContentModel'},
              'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'contentmodel_created_content'", 'null': 'True', 'to': u"orm['authentication.EndUser']"}),
              'crop_from': ('django.db.models.fields.CharField', [], {'default': "'center'", 'max_length': '10', 'blank': 'True'}),
              'date_taken': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'effect': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'contentmodel_related'", 'null': 'True', 'to': u"orm['photologue.PhotoEffect']"}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
              'image_name': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
              'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'contentmodel_modified_content'", 'null': 'True', 'to': u"orm['authentication.EndUser']"}),
              'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
              'plain_content': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_core.contentmodel_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
              'publish_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
              'retract_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'rich_content': ('ckeditor.fields.RichTextField', [], {'null': 'True', 'blank': 'True'}),
              'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}),
              'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255'}),
              'state': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
              'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
          },
          u'photologue.photoeffect': {
              'Meta': {'object_name': 'PhotoEffect'},
              'background_color': ('django.db.models.fields.CharField', [], {'default': "'#FFFFFF'", 'max_length': '7'}),
              'brightness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
              'color': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
              'contrast': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
              'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'filters': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
              'reflection_size': ('django.db.models.fields.FloatField', [], {'default': '0'}),
              'reflection_strength': ('django.db.models.fields.FloatField', [], {'default': '0.6'}),
              'sharpness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
              'transpose_method': ('django.db.models.fields.CharField', [], {'max_length': '15', 'blank': 'True'})
          },
          u'sites.site': {
              'Meta': {'ordering': "(u'domain',)", 'object_name': 'Site', 'db_table': "u'django_site'"},
              'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          }
      }
  
      complete_apps = ['blog']