[func] publishing

main
yaemiku 2022-08-19 23:59:23 +02:00
parent a51f3bef43
commit 2f9bb8d43b
Signed by: podlaskizbs
GPG Key ID: ADC039636B3E4AAB
5 changed files with 58 additions and 3 deletions

View File

@ -29,11 +29,11 @@ def load_config(request):
'Wyniki II Ligi': SecondLeague.objects.all(), 'Wyniki II Ligi': SecondLeague.objects.all(),
'Wyniki III Ligi': ThirdLeague.objects.all() 'Wyniki III Ligi': ThirdLeague.objects.all()
}, },
'calendars': Calendar.objects.all(), 'calendars': Calendar.objects.filter(published=True),
'gpb': GrandPrixB.load(), 'gpb': GrandPrixB.load(),
'tournaments': Tournament.objects.filter(published=True), 'tournaments': Tournament.objects.filter(published=True),
'memberships': Membership.objects.filter(published=True), 'memberships': Membership.objects.filter(published=True),
'youth': Youth.objects.all(), 'youth': Youth.objects.filter(published=True),
'mbkb': MBKB.objects.all(), 'mbkb': MBKB.objects.filter(published=True),
'atu': Atu.load() 'atu': Atu.load()
} }

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0002_alter_calendar_content'),
]
operations = [
migrations.AddField(
model_name='calendar',
name='published',
field=models.BooleanField(default=True, verbose_name='Kalendarz opublikowany'),
),
]

View File

@ -5,6 +5,7 @@ from tinymce.models import HTMLField
class Calendar(models.Model): class Calendar(models.Model):
published = models.BooleanField('Kalendarz opublikowany', default=True)
year = models.IntegerField('Rok', primary_key=True) year = models.IntegerField('Rok', primary_key=True)
content = HTMLField('Kalendarz', default='', blank=True) content = HTMLField('Kalendarz', default='', blank=True)

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tournaments', '0006_remove_tournament_link_remove_tournament_link_title_and_more'),
]
operations = [
migrations.AlterField(
model_name='tournament',
name='buttons',
field=models.TextField(blank=True, default='', help_text='Tutaj można wpisać dowolną ilość przycisków w następującym formacie:<br /> <code><br /> tekst1 -> link<br /> teskt2 | link<br /> ...<br /> </code><br /> Symbol <code>-></code> oznacza, że link będzie otwarty w nowej karcie<br /> Symbol <code>|</code> oznacza, że link będzie otwarty w tej samej karcie<br /> Na przykład:<br /> <code><br /> pzbs -> https://pzbs.pl<br /> fotogaleria | https://galeria.podlaskizbs.pl<br /> cezar -> https://www.msc.com.pl/cezar<br /> </code><br /> PZBS i Cezar zostaną otwarte w nowej karcie<br /> <b>UWAGA !!</b><br /> Klikając na zdjęcie zawsze zostaniemy przekierowani na pierwszy podany link<br /> Gdy nie podamy tekstu przyciku, nie pokaże on się, można to wykorzystać w taki sposób:<br /> <code><br /> -> link do wyników<br /> fotogaleria -> link do fotogalerii<br /> </code><br /> Wtedy pokaże się <b>tylko przycisk fotogalerii</b>, a zdjęcie przekieruje nas do wyników!<br /> ', verbose_name='Przyciski'),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('youth', '0003_youth_buttons'),
]
operations = [
migrations.AlterField(
model_name='youth',
name='buttons',
field=models.TextField(blank=True, default='', help_text='Tutaj można wpisać dowolną ilość przycisków w następującym formacie:<br /> <code><br /> tekst1 -> link<br /> teskt2 | link<br /> ...<br /> </code><br /> Symbol <code>-></code> oznacza, że link będzie otwarty w nowej karcie<br /> Symbol <code>|</code> oznacza, że link będzie otwarty w tej samej karcie<br /> Na przykład:<br /> <code><br /> pzbs -> https://pzbs.pl<br /> fotogaleria | https://galeria.podlaskizbs.pl<br /> cezar -> https://www.msc.com.pl/cezar<br /> </code><br /> PZBS i Cezar zostaną otwarte w nowej karcie<br /> ', verbose_name='Przyciski'),
),
]