text: # encoding: utf-8
  from __future__ import unicode_literals
  import 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 'Gallery'
          db.create_table('galleries_gallery', (
              ('page_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['pages.Page'], unique=True, primary_key=True)),
              ('content', self.gf('mezzanine.core.fields.RichTextField')()),
              ('zip_import', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
          ))
          db.send_create_signal('galleries', ['Gallery'])
  
          # Adding model 'GalleryImage'
          db.create_table('galleries_galleryimage', (
              ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
              ('_order', self.gf('django.db.models.fields.IntegerField')(null=True)),
              ('gallery', self.gf('django.db.models.fields.related.ForeignKey')(related_name='images', to=orm['galleries.Gallery'])),
              ('file', self.gf('mezzanine.core.fields.FileField')(max_length=200)),
              ('description', self.gf('django.db.models.fields.CharField')(max_length=1000, blank=True)),
          ))
          db.send_create_signal('galleries', ['GalleryImage'])
  
  
      def backwards(self, orm):
          
          # Deleting model 'Gallery'
          db.delete_table('galleries_gallery')
  
          # Deleting model 'GalleryImage'
          db.delete_table('galleries_galleryimage')
  
  
      models = {
          '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'}),
              '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'})
          },
          'galleries.gallery': {
              'Meta': {'ordering': "('_order',)", 'object_name': 'Gallery', '_ormbases': ['pages.Page']},
              'content': ('mezzanine.core.fields.RichTextField', [], {}),
              'page_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['pages.Page']", 'unique': 'True', 'primary_key': 'True'}),
              'zip_import': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
          },
          'galleries.galleryimage': {
              'Meta': {'ordering': "('_order',)", 'object_name': 'GalleryImage'},
              '_order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
              'description': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
              'file': ('mezzanine.core.fields.FileField', [], {'max_length': '200'}),
              'gallery': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'images'", 'to': "orm['galleries.Gallery']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
          },
          'generic.assignedkeyword': {
              'Meta': {'ordering': "('_order',)", 'object_name': 'AssignedKeyword'},
              '_order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'keyword': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'assignments'", 'to': "orm['generic.Keyword']"}),
              'object_pk': ('django.db.models.fields.IntegerField', [], {})
          },
          'generic.keyword': {
              'Meta': {'object_name': 'Keyword'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
              'slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
          },
          'pages.page': {
              'Meta': {'ordering': "('titles',)", 'object_name': 'Page'},
              '_order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
              'content_model': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
              'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
              'expiry_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'in_footer': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'in_navigation': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'keywords': ('mezzanine.generic.fields.KeywordsField', [], {'object_id_field': "'object_pk'", 'to': "orm['generic.AssignedKeyword']"}),
              'keywords_string': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
              'login_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['pages.Page']"}),
              'publish_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'short_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
              'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
              'slug': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'status': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'titles': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True'})
          },
          'sites.site': {
              'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
              'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          }
      }
  
      complete_apps = ['galleries']
  