X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/67df302167539474edd02b57c2e8bd30349d7625..d3d0f68c842db9d5fda99a388f2df96358084166:/apps/suggest/migrations/0001_initial.py diff --git a/apps/suggest/migrations/0001_initial.py b/apps/suggest/migrations/0001_initial.py index a25297a7f..b02889762 100644 --- a/apps/suggest/migrations/0001_initial.py +++ b/apps/suggest/migrations/0001_initial.py @@ -1,77 +1,50 @@ -# encoding: utf-8 -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 'Suggestion' - db.create_table('suggest_suggestion', ( - ('description', self.gf('django.db.models.fields.TextField')(blank=True)), - ('ip', self.gf('django.db.models.fields.IPAddressField')(max_length=15)), - ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - ('contact', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - )) - db.send_create_signal('suggest', ['Suggestion']) - - - def backwards(self, orm): - - # Deleting model 'Suggestion' - db.delete_table('suggest_suggestion') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - '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': "orm['auth.Permission']", 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'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'}) - }, - 'suggest.suggestion': { - 'Meta': {'object_name': 'Suggestion'}, - 'contact': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['suggest'] +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='PublishingSuggestion', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('contact', models.CharField(max_length=120, verbose_name='Contact', blank=True)), + ('books', models.TextField(null=True, verbose_name='Books', blank=True)), + ('audiobooks', models.TextField(null=True, verbose_name='audiobooks', blank=True)), + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date')), + ('ip', models.GenericIPAddressField(verbose_name='IP address')), + ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-created_at',), + 'verbose_name': 'publishing suggestion', + 'verbose_name_plural': 'publishing suggestions', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Suggestion', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('contact', models.CharField(max_length=120, verbose_name='Contact', blank=True)), + ('description', models.TextField(verbose_name='Description', blank=True)), + ('created_at', models.DateTimeField(auto_now=True, verbose_name='creation date')), + ('ip', models.GenericIPAddressField(verbose_name='IP address')), + ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('-created_at',), + 'verbose_name': 'suggestion', + 'verbose_name_plural': 'suggestions', + }, + bases=(models.Model,), + ), + ]