Web M&M
https://mam.matfyz.cz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
3.3 KiB
59 lines
3.3 KiB
# -*- 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, 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\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', on_delete=models.CASCADE)),
|
|
],
|
|
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,
|
|
),
|
|
]
|
|
|