show isbn for woblink
[redakcja.git] / src / cover / migrations / 0001_initial.py
index f31c405..562cdff 100644 (file)
@@ -1,44 +1,32 @@
-# -*- coding: 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 'Image'
-        db.create_table('cover_image', (
-            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('author', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('license_name', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('license_url', self.gf('django.db.models.fields.URLField')(max_length=255, blank=True)),
-            ('source_url', self.gf('django.db.models.fields.URLField')(max_length=200)),
-            ('download_url', self.gf('django.db.models.fields.URLField')(unique=True, max_length=200)),
-            ('file', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
-        ))
-        db.send_create_signal('cover', ['Image'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'Image'
-        db.delete_table('cover_image')
-
-
-    models = {
-        'cover.image': {
-            'Meta': {'object_name': 'Image'},
-            'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'download_url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}),
-            'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
-            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
-            'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        }
-    }
-
-    complete_apps = ['cover']
\ No newline at end of file
+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from django.db import models, migrations
+import cover.models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Image',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('title', models.CharField(max_length=255, verbose_name='title')),
+                ('author', models.CharField(max_length=255, verbose_name='author')),
+                ('license_name', models.CharField(max_length=255, verbose_name='license name')),
+                ('license_url', models.URLField(max_length=255, verbose_name='license URL', blank=True)),
+                ('source_url', models.URLField(null=True, verbose_name='source URL', blank=True)),
+                ('download_url', models.URLField(unique=True, null=True, verbose_name='image download URL', blank=True)),
+                ('file', models.ImageField(upload_to=b'cover/image', storage=cover.models.OverwriteStorage(), verbose_name='file')),
+            ],
+            options={
+                'verbose_name': 'cover image',
+                'verbose_name_plural': 'cover images',
+            },
+            bases=(models.Model,),
+        ),
+    ]