Bc. Petr Pecha
10 years ago
3 changed files with 66 additions and 1 deletions
@ -0,0 +1,32 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
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=b'False', verbose_name=b'Zve\xc5\x99ejn\xc4\x9bno')), |
||||
|
('autor', models.ForeignKey(verbose_name=b'Autor novinky', to=settings.AUTH_USER_MODEL)), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'Novinka', |
||||
|
'verbose_name_plural': 'Novinky', |
||||
|
}, |
||||
|
bases=(models.Model,), |
||||
|
), |
||||
|
] |
Loading…
Reference in new issue