Compare commits
No commits in common. "7c1d9a032965a041c19c99a916ae017d8777f3cf" and "e06080ae31a6404815f00f9fc75b25cd4a59c658" have entirely different histories.
7c1d9a0329
...
e06080ae31
21 changed files with 7 additions and 189 deletions
|
|
@ -331,22 +331,22 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "add_novinky",
|
"codename": "add_novinky",
|
||||||
"ct_app_label": "novinky",
|
"ct_app_label": "seminar",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "change_novinky",
|
"codename": "change_novinky",
|
||||||
"ct_app_label": "novinky",
|
"ct_app_label": "seminar",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "delete_novinky",
|
"codename": "delete_novinky",
|
||||||
"ct_app_label": "novinky",
|
"ct_app_label": "seminar",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"codename": "view_novinky",
|
"codename": "view_novinky",
|
||||||
"ct_app_label": "novinky",
|
"ct_app_label": "seminar",
|
||||||
"ct_model": "novinky"
|
"ct_model": "novinky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,6 @@ INSTALLED_APPS = (
|
||||||
'treenode',
|
'treenode',
|
||||||
'vyroci',
|
'vyroci',
|
||||||
'sifrovacka',
|
'sifrovacka',
|
||||||
'novinky',
|
|
||||||
|
|
||||||
# Admin upravy:
|
# Admin upravy:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
from .models import Novinky
|
|
||||||
|
|
||||||
admin.site.register(Novinky)
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
from django.apps import AppConfig
|
|
||||||
|
|
||||||
class NovinkyConfig(AppConfig):
|
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
|
||||||
name = 'novinky'
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
# 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,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
# 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'},
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# 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 = [
|
|
||||||
]
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# 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 = [
|
|
||||||
]
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# 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 = [
|
|
||||||
]
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<li>soustředění</li>
|
<li>soustředění</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="{% url 'admin:novinky_novinky_add' %}"><strong>přidat novinku</strong></a> na web</li>
|
<li><a href="{% url 'admin:seminar_novinky_add' %}"><strong>přidat novinku</strong></a> na web</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
||||||
|
|
@ -186,3 +186,4 @@ class ResitelInline(admin.TabularInline):
|
||||||
# admin.site.register(m.Pohadka)
|
# admin.site.register(m.Pohadka)
|
||||||
admin.site.register(m.Obrazek)
|
admin.site.register(m.Obrazek)
|
||||||
admin.site.register(m.Nastaveni, SingletonModelAdmin)
|
admin.site.register(m.Nastaveni, SingletonModelAdmin)
|
||||||
|
admin.site.register(m.Novinky)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# 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 = [
|
|
||||||
]
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# 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'},
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# 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',
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# 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
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ 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)
|
||||||
|
|
||||||
Loading…
Reference in a new issue