Librarian: support for <abstrakt>
[wolnelektury.git] / apps / libraries / migrations / 0001_initial.py
index 0411c87..4b210f8 100644 (file)
@@ -1,36 +1,43 @@
 # -*- 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 'Library'
-        db.create_table(u'libraries_library', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
-            ('url', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
-            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
-        ))
-        db.send_create_signal(u'libraries', ['Library'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'Library'
-        db.delete_table(u'libraries_library')
-
-
-    models = {
-        u'libraries.library': {
-            'Meta': {'object_name': 'Library'},
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
-            'url': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'})
-        }
-    }
-
-    complete_apps = ['libraries']
\ No newline at end of file
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Catalog',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=120, verbose_name='name')),
+                ('slug', models.SlugField(unique=True, max_length=120, verbose_name='Slug')),
+            ],
+            options={
+                'verbose_name': 'catalog',
+                'verbose_name_plural': 'catalogs',
+            },
+            bases=(models.Model,),
+        ),
+        migrations.CreateModel(
+            name='Library',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=120, verbose_name='name', blank=True)),
+                ('slug', models.SlugField(max_length=120, unique=True, null=True, verbose_name='Slug')),
+                ('url', models.CharField(max_length=120, verbose_name='url', blank=True)),
+                ('description', models.TextField(verbose_name='Description', blank=True)),
+                ('catalog', models.ForeignKey(related_name=b'libraries', on_delete=django.db.models.deletion.PROTECT, to='libraries.Catalog')),
+            ],
+            options={
+                'verbose_name': 'library',
+                'verbose_name_plural': 'libraries',
+            },
+            bases=(models.Model,),
+        ),
+    ]