82 lines
5.1 KiB
Python
82 lines
5.1 KiB
Python
# Generated by Django 2.0.3 on 2018-08-18 17:30
|
|
|
|
import datetime
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('nalodeni', '0033_auto_20180818_1729'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='NewsCond',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('group', models.IntegerField(default=False, verbose_name='Skupina podmínek')),
|
|
('neg', models.BooleanField(default=False, verbose_name='Negovat podmínku')),
|
|
('kind', models.IntegerField(choices=[(0, 'Dovednost'), (1, 'Téma'), (2, 'Území')], default=0, verbose_name='Druh')),
|
|
('opt_id', models.IntegerField(verbose_name='ID vybrané možnosti')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Newsletter',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(blank=True, max_length=150, null=True, verbose_name='Název')),
|
|
('desc', models.CharField(blank=True, max_length=500, null=True, verbose_name='Popis')),
|
|
('enabled', models.BooleanField(default=False, verbose_name='Aktivní')),
|
|
('managed_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='newsletter_managed', to=settings.AUTH_USER_MODEL, verbose_name='Správce newsletteru')),
|
|
('sent_by', models.ManyToManyField(blank=True, related_name='newsletter_sent', to=settings.AUTH_USER_MODEL, verbose_name='Odesílatelé')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='NewsMsg',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created_ts', models.DateTimeField(default=datetime.datetime.now, editable=False, verbose_name='Datum vytvoření')),
|
|
('delivery_ts', models.DateTimeField(blank=True, null=True, verbose_name='Datum plánovaného rozeslání')),
|
|
('sent_ts', models.DateTimeField(blank=True, null=True, verbose_name='Datum skutečného rozeslání')),
|
|
('title', models.CharField(max_length=150, null=True, verbose_name='Název, předmět emailu')),
|
|
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Vytvořil')),
|
|
('news', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nalodeni.Newsletter', verbose_name='Newsletter')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='NewsMsgBlock',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('order', models.IntegerField(default=False, verbose_name='Pořadí')),
|
|
('heading', models.CharField(max_length=150, null=True, verbose_name='Nadpis')),
|
|
('content', models.TextField(null=True, verbose_name='Text (i validované HTML)')),
|
|
('link', models.CharField(max_length=500, null=True, verbose_name='Odkaz')),
|
|
('link_text', models.CharField(max_length=100, null=True, verbose_name='Text odkazu')),
|
|
('img_url', models.CharField(max_length=500, null=True, verbose_name='Obrázek (URL)')),
|
|
('img_thumb_url', models.CharField(max_length=500, null=True, verbose_name='Obrázek náhledu (URL)')),
|
|
('img_label', models.CharField(max_length=100, null=True, verbose_name='Popis obrázku')),
|
|
('nmsg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nalodeni.NewsMsg', verbose_name='Zpráva')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='NewsMsgReply',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('comment', models.CharField(blank=True, max_length=250, null=True, verbose_name='Poznámka')),
|
|
('rating_usefullness', models.IntegerField(blank=True, default=0, null=True, verbose_name='Využiji to')),
|
|
('rating_interest', models.IntegerField(blank=True, default=0, null=True, verbose_name='Zajímá mě to')),
|
|
('rating_action', models.IntegerField(blank=True, default=0, null=True, verbose_name='Zapojím se / Pomůžu')),
|
|
('block', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nalodeni.NewsMsgBlock', verbose_name='Část zprávy')),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Vytvořil')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='newscond',
|
|
name='news',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nalodeni.Newsletter', verbose_name='Newsletter'),
|
|
),
|
|
]
|