Web M&M
https://mam.matfyz.cz
32 lines
1.2 KiB
32 lines
1.2 KiB
5 years ago
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import models, migrations
|
||
|
from django.conf import settings
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
('seminar', '0022_decimal_body'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Novinky',
|
||
|
fields=[
|
||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||
|
('datum', models.DateField(auto_now_add=True)),
|
||
|
('text', models.TextField(null=True, verbose_name=b'Text novinky', blank=True)),
|
||
|
('obrazek', models.ImageField(upload_to=b'image_novinky/%Y/%m/%d/', null=True, verbose_name=b'Obr\xc3\xa1zek', blank=True)),
|
||
|
('zverejneno', models.BooleanField(default=False, verbose_name=b'Zve\xc5\x99ejn\xc4\x9bno')),
|
||
|
('autor', models.ForeignKey(verbose_name=b'Autor novinky', to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE))
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Novinka',
|
||
|
'verbose_name_plural': 'Novinky',
|
||
|
},
|
||
|
bases=(models.Model,),
|
||
|
),
|
||
|
]
|