Novinky split
It's everything, everything at once.
This commit is contained in:
parent
64465a0471
commit
3be9578ec3
19 changed files with 186 additions and 5 deletions
|
@ -331,22 +331,22 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "add_novinky",
|
"codename": "add_novinky",
|
||||||
"ct_app_label": "seminar",
|
"ct_app_label": "novinky",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "change_novinky",
|
"codename": "change_novinky",
|
||||||
"ct_app_label": "seminar",
|
"ct_app_label": "novinky",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "delete_novinky",
|
"codename": "delete_novinky",
|
||||||
"ct_app_label": "seminar",
|
"ct_app_label": "novinky",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "view_novinky",
|
"codename": "view_novinky",
|
||||||
"ct_app_label": "seminar",
|
"ct_app_label": "novinky",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -149,6 +149,7 @@ INSTALLED_APPS = (
|
||||||
'treenode',
|
'treenode',
|
||||||
'vyroci',
|
'vyroci',
|
||||||
'sifrovacka',
|
'sifrovacka',
|
||||||
|
'novinky',
|
||||||
|
|
||||||
# Admin upravy:
|
# Admin upravy:
|
||||||
|
|
||||||
|
|
0
novinky/__init__.py
Normal file
0
novinky/__init__.py
Normal file
3
novinky/admin.py
Normal file
3
novinky/admin.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
5
novinky/apps.py
Normal file
5
novinky/apps.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
class NovinkyConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'novinky'
|
45
novinky/migrations/0001_initial.py
Normal file
45
novinky/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:43
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
def nastav_nove_contenttypes(apps, schema_editor):
|
||||||
|
ContentType = apps.get_model('contenttypes', 'ContentType')
|
||||||
|
for m in ('novinka'):
|
||||||
|
oct = ContentType.objects.filter(app_label='seminar', model=m)
|
||||||
|
oct.update(app_label='novinky')
|
||||||
|
|
||||||
|
def nastav_stare_contenttypes(apps, schema_editor):
|
||||||
|
ContentType = apps.get_model('contenttypes', 'ContentType')
|
||||||
|
for m in ('novinka'):
|
||||||
|
nct = ContentType.objects.filter(app_label='novinky', model=m)
|
||||||
|
nct.update(app_label='seminar')
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0127_unmanage_novinky'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(nastav_nove_contenttypes, nastav_stare_contenttypes),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Novinky',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('datum', models.DateField(auto_now_add=True)),
|
||||||
|
('text', models.TextField(blank=True, null=True, verbose_name='Text novinky')),
|
||||||
|
('obrazek', models.ImageField(blank=True, null=True, upload_to='image_novinky/%Y/%m/%d/', verbose_name='Obrázek')),
|
||||||
|
('autor', models.ForeignKey(to='personalni.organizator', verbose_name='Autor novinky', null=True, on_delete=models.SET_NULL)),
|
||||||
|
('zverejneno', models.BooleanField(default=False, verbose_name='Zveřejněno')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Novinka',
|
||||||
|
'verbose_name_plural': 'Novinky',
|
||||||
|
'db_table': 'seminar_novinky',
|
||||||
|
'ordering': ['-datum'],
|
||||||
|
'managed': False,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
18
novinky/migrations/0002_manage_novinky.py
Normal file
18
novinky/migrations/0002_manage_novinky.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:58
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('novinky', '0001_initial'),
|
||||||
|
('seminar', '0128_delete_novinky'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='novinky',
|
||||||
|
options={'ordering': ['-datum'], 'verbose_name': 'Novinka', 'verbose_name_plural': 'Novinky'},
|
||||||
|
),
|
||||||
|
]
|
13
novinky/migrations/0003_novinky_post.py
Normal file
13
novinky/migrations/0003_novinky_post.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 21:00
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('novinky', '0002_manage_novinky'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
0
novinky/migrations/__init__.py
Normal file
0
novinky/migrations/__init__.py
Normal file
|
@ -13,6 +13,7 @@ class Novinky(models.Model):
|
||||||
verbose_name = 'Novinka'
|
verbose_name = 'Novinka'
|
||||||
verbose_name_plural = 'Novinky'
|
verbose_name_plural = 'Novinky'
|
||||||
ordering = ['-datum']
|
ordering = ['-datum']
|
||||||
|
db_table = 'seminar_novinky'
|
||||||
|
|
||||||
datum = models.DateField(auto_now_add=True)
|
datum = models.DateField(auto_now_add=True)
|
||||||
|
|
3
novinky/tests.py
Normal file
3
novinky/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
3
novinky/views.py
Normal file
3
novinky/views.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
13
personalni/migrations/0007_novinky_pre.py
Normal file
13
personalni/migrations/0007_novinky_pre.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:35
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('personalni', '0006_pre_split_soustredeni'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
14
personalni/migrations/0008_novinky_post.py
Normal file
14
personalni/migrations/0008_novinky_post.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:59
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('personalni', '0007_novinky_pre'),
|
||||||
|
('novinky', '0003_novinky_post'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
14
seminar/migrations/0126_novinky_pre.py
Normal file
14
seminar/migrations/0126_novinky_pre.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:36
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0125_post_split_soustredeni'),
|
||||||
|
('personalni', '0007_novinky_pre'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
17
seminar/migrations/0127_unmanage_novinky.py
Normal file
17
seminar/migrations/0127_unmanage_novinky.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:41
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0126_novinky_pre'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='novinky',
|
||||||
|
options={'managed': False, 'ordering': ['-datum'], 'verbose_name': 'Novinka', 'verbose_name_plural': 'Novinky'},
|
||||||
|
),
|
||||||
|
]
|
17
seminar/migrations/0128_delete_novinky.py
Normal file
17
seminar/migrations/0128_delete_novinky.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:54
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0127_unmanage_novinky'),
|
||||||
|
('novinky', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Novinky',
|
||||||
|
),
|
||||||
|
]
|
14
seminar/migrations/0129_novinky_post.py
Normal file
14
seminar/migrations/0129_novinky_post.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Generated by Django 4.2.13 on 2024-05-13 20:59
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0128_delete_novinky'),
|
||||||
|
('novinky', '0003_novinky_post'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
]
|
|
@ -3,11 +3,11 @@ from .odevzdavatko import *
|
||||||
from .base import *
|
from .base import *
|
||||||
from .pomocne import *
|
from .pomocne import *
|
||||||
from .treenode import *
|
from .treenode import *
|
||||||
from .novinky import *
|
|
||||||
|
|
||||||
from various.models import Nastaveni
|
from various.models import Nastaveni
|
||||||
from personalni.models import Organizator, Resitel, Skola, Prijemce, Osoba
|
from personalni.models import Organizator, Resitel, Skola, Prijemce, Osoba
|
||||||
from soustredeni.models import Soustredeni, Soustredeni_Ucastnici, Soustredeni_Organizatori, Konfera, Konfery_Ucastnici
|
from soustredeni.models import Soustredeni, Soustredeni_Ucastnici, Soustredeni_Organizatori, Konfera, Konfery_Ucastnici
|
||||||
|
from novinky.models import Novinky
|
||||||
|
|
||||||
# Kvůli migr. 0041
|
# Kvůli migr. 0041
|
||||||
from soustredeni.models import generate_filename_konfera
|
from soustredeni.models import generate_filename_konfera
|
||||||
|
|
Loading…
Reference in a new issue