From c05db5084ade59505c113955854bd38298052c3d Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Tue, 13 Oct 2015 11:47:00 +0200 Subject: [PATCH] galerie | migrace --- galerie/migrations/0001_initial.py | 59 +++++++++++++++++++ galerie/migrations/0002_auto_20151013_1145.py | 27 +++++++++ galerie/migrations/__init__.py | 0 3 files changed, 86 insertions(+) create mode 100644 galerie/migrations/0001_initial.py create mode 100644 galerie/migrations/0002_auto_20151013_1145.py create mode 100644 galerie/migrations/__init__.py diff --git a/galerie/migrations/0001_initial.py b/galerie/migrations/0001_initial.py new file mode 100644 index 00000000..b7406da6 --- /dev/null +++ b/galerie/migrations/0001_initial.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('seminar', '0033_organizator_studuje_popisek'), + ] + + operations = [ + migrations.CreateModel( + name='Galerie', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('nazev', models.CharField(max_length=100, verbose_name=b'N\xc3\xa1zev')), + ('datum_vytvoreni', models.DateTimeField(auto_now_add=True, verbose_name=b'Datum vytvo\xc5\x99en\xc3\xad')), + ('datum_zmeny', models.DateTimeField(auto_now=True, verbose_name=b'Datum posledn\xc3\xad zm\xc4\x9bny')), + ('popis', models.TextField(null=True, verbose_name=b'Popis', blank=True)), + ('zobrazit', models.IntegerField(default=1, verbose_name=b'Zobrazit?', choices=[(0, b'V\xc5\xbedy'), (1, b'Organiz\xc3\xa1tor\xc5\xafm'), (2, b'Nikdy')])), + ('galerie_up', models.ForeignKey(blank=True, to='galerie.Galerie', null=True)), + ('soustredeni', models.ForeignKey(blank=True, to='seminar.Soustredeni', null=True)), + ], + options={ + 'verbose_name': 'Galerie', + 'verbose_name_plural': 'Galerie', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Obrazek', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('obrazek_velky', models.ImageField(help_text=b'Lze vlo\xc5\xbeit libovoln\xc4\x9b velk\xc3\xbd obr\xc3\xa1zek. Ide\xc3\xa1ln\xc3\xad je, aby alespo\xc5\x88 jeden rozm\xc4\x9br m\xc4\x9bl alespo\xc5\x88 500px.', upload_to=b'Galerie/%Y/%m/%d')), + ('obrazek_stredni', models.ImageField(upload_to=b'Galerie/%Y/%m/%d/stredni', null=True, editable=False)), + ('obrazek_maly', models.ImageField(upload_to=b'Galerie/%Y/%m/%d/male', null=True, editable=False)), + ('nazev', models.CharField(max_length=50, null=True, verbose_name=b'N\xc3\xa1zev', blank=True)), + ('popis', models.TextField(null=True, verbose_name=b'Popis', blank=True)), + ('datum_vlozeni', models.DateTimeField(auto_now_add=True, verbose_name=b'Datum vlo\xc5\xbeen\xc3\xad')), + ('datum', models.DateTimeField(verbose_name=b'Datum po\xc5\x99\xc3\xadzen\xc3\xad fotografie')), + ('poradi', models.IntegerField(null=True, verbose_name=b'Po\xc5\x99ad\xc3\xad', blank=True)), + ('galerie', models.ForeignKey(to='galerie.Galerie')), + ], + options={ + 'verbose_name': 'Obr\xe1zek', + 'verbose_name_plural': 'Obr\xe1zky', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='galerie', + name='titulni_obrazek', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, to='galerie.Obrazek', null=True), + preserve_default=True, + ), + ] diff --git a/galerie/migrations/0002_auto_20151013_1145.py b/galerie/migrations/0002_auto_20151013_1145.py new file mode 100644 index 00000000..ea241267 --- /dev/null +++ b/galerie/migrations/0002_auto_20151013_1145.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('galerie', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='galerie', + name='titulni_obrazek', + field=models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='galerie.Obrazek', null=True), + preserve_default=True, + ), + migrations.AlterField( + model_name='obrazek', + name='datum', + field=models.DateTimeField(null=True, verbose_name=b'Datum po\xc5\x99\xc3\xadzen\xc3\xad fotografie', blank=True), + preserve_default=True, + ), + ] diff --git a/galerie/migrations/__init__.py b/galerie/migrations/__init__.py new file mode 100644 index 00000000..e69de29b