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 \xa1 zev ' ) ) ,
( ' datum_vytvoreni ' , models . DateTimeField ( auto_now_add = True , verbose_name = b ' Datum vytvo \xc5 \x99 en \xc3 \xad ' ) ) ,
( ' datum_zmeny ' , models . DateTimeField ( auto_now = True , verbose_name = b ' Datum posledn \xc3 \xad zm \xc4 \x9b ny ' ) ) ,
( ' 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 \xbe dy ' ) , ( 1 , b ' Organiz \xc3 \xa1 tor \xc5 \xaf m ' ) , ( 2 , b ' Nikdy ' ) ] ) ) ,
( ' galerie_up ' , models . ForeignKey ( blank = True , to = ' galerie.Galerie ' , null = True , on_delete = models . CASCADE ) ) ,
( ' soustredeni ' , models . ForeignKey ( blank = True , to = ' seminar.Soustredeni ' , null = True , on_delete = models . CASCADE ) ) ,
] ,
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 \xbe it libovoln \xc4 \x9b velk \xc3 \xbd obr \xc3 \xa1 zek. Ide \xc3 \xa1 ln \xc3 \xad je, aby alespo \xc5 \x88 jeden rozm \xc4 \x9b r m \xc4 \x9b l 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 \xa1 zev ' , 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 \xbe en \xc3 \xad ' ) ) ,
( ' datum ' , models . DateTimeField ( verbose_name = b ' Datum po \xc5 \x99 \xc3 \xad zen \xc3 \xad fotografie ' ) ) ,
( ' poradi ' , models . IntegerField ( null = True , verbose_name = b ' Po \xc5 \x99 ad \xc3 \xad ' , blank = True ) ) ,
( ' galerie ' , models . ForeignKey ( to = ' galerie.Galerie ' , on_delete = models . CASCADE ) ) ,
] ,
options = {
' verbose_name ' : ' Obr \xe1 zek ' ,
' verbose_name_plural ' : ' Obr \xe1 zky ' ,
} ,
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 ,
) ,
]