Browse Source

Merge pull request 'Split Novinky' (!48) from split-novinky into master

Reviewed-on: #48
pojmenovane_aplikace_broken
Pavel Turinský 6 months ago
parent
commit
7c1d9a0329
  1. 8
      deploy_v2/admin_org_prava.json
  2. 1
      mamweb/settings_common.py
  3. 0
      novinky/__init__.py
  4. 5
      novinky/admin.py
  5. 5
      novinky/apps.py
  6. 45
      novinky/migrations/0001_initial.py
  7. 18
      novinky/migrations/0002_manage_novinky.py
  8. 13
      novinky/migrations/0003_novinky_post.py
  9. 0
      novinky/migrations/__init__.py
  10. 1
      novinky/models.py
  11. 3
      novinky/tests.py
  12. 3
      novinky/views.py
  13. 13
      personalni/migrations/0007_novinky_pre.py
  14. 14
      personalni/migrations/0008_novinky_post.py
  15. 2
      personalni/templates/personalni/profil/orgorozcestnik.html
  16. 1
      seminar/admin.py
  17. 14
      seminar/migrations/0126_novinky_pre.py
  18. 17
      seminar/migrations/0127_unmanage_novinky.py
  19. 17
      seminar/migrations/0128_delete_novinky.py
  20. 14
      seminar/migrations/0129_novinky_post.py
  21. 2
      seminar/models/__init__.py

8
deploy_v2/admin_org_prava.json

@ -331,22 +331,22 @@
},
{
"codename": "add_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "change_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "delete_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "view_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{

1
mamweb/settings_common.py

@ -149,6 +149,7 @@ INSTALLED_APPS = (
'treenode',
'vyroci',
'sifrovacka',
'novinky',
# Admin upravy:

0
novinky/__init__.py

5
novinky/admin.py

@ -0,0 +1,5 @@
from django.contrib import admin
from .models import Novinky
admin.site.register(Novinky)

5
novinky/apps.py

@ -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

@ -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

@ -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

@ -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

1
seminar/models/novinky.py → novinky/models.py

@ -13,6 +13,7 @@ class Novinky(models.Model):
verbose_name = 'Novinka'
verbose_name_plural = 'Novinky'
ordering = ['-datum']
db_table = 'seminar_novinky'
datum = models.DateField(auto_now_add=True)

3
novinky/tests.py

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
novinky/views.py

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

13
personalni/migrations/0007_novinky_pre.py

@ -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

@ -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 = [
]

2
personalni/templates/personalni/profil/orgorozcestnik.html

@ -13,7 +13,7 @@
<li>soustředění</li>
</ul>
</li>
<li><a href="{% url 'admin:seminar_novinky_add' %}"><strong>přidat novinku</strong></a> na web</li>
<li><a href="{% url 'admin:novinky_novinky_add' %}"><strong>přidat novinku</strong></a> na web</li>
</ul>
<hr />

1
seminar/admin.py

@ -186,4 +186,3 @@ class ResitelInline(admin.TabularInline):
# admin.site.register(m.Pohadka)
admin.site.register(m.Obrazek)
admin.site.register(m.Nastaveni, SingletonModelAdmin)
admin.site.register(m.Novinky)

14
seminar/migrations/0126_novinky_pre.py

@ -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

@ -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

@ -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

@ -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 = [
]

2
seminar/models/__init__.py

@ -3,11 +3,11 @@ from .odevzdavatko import *
from .base import *
from .pomocne import *
from .treenode import *
from .novinky import *
from various.models import Nastaveni
from personalni.models import Organizator, Resitel, Skola, Prijemce, Osoba
from soustredeni.models import Soustredeni, Soustredeni_Ucastnici, Soustredeni_Organizatori, Konfera, Konfery_Ucastnici
from novinky.models import Novinky
# Kvůli migr. 0041
from soustredeni.models import generate_filename_konfera

Loading…
Cancel
Save