diff --git a/program2021/migrations/0002_auto_20200805_0726.py b/program2021/migrations/0002_auto_20200805_0726.py new file mode 100644 index 0000000000000000000000000000000000000000..a197d42afd5a9069901f943e5c66e02bcb5711b6 --- /dev/null +++ b/program2021/migrations/0002_auto_20200805_0726.py @@ -0,0 +1,23 @@ +# Generated by Django 3.0.8 on 2020-08-05 05:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('program2021', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='program2021homepage', + name='headline', + field=models.CharField(blank=True, help_text='Hlavní titulek domovské stránky', max_length=100, null=True, verbose_name='název programu'), + ), + migrations.AddField( + model_name='program2021homepage', + name='perex', + field=models.TextField(blank=True, help_text='Text pod titulkem', max_length=512, null=True, verbose_name='perex'), + ), + ] diff --git a/program2021/models.py b/program2021/models.py index 10f9076e31821cf65fb431a84a7c5c4a94d86794..0c84f4a8d2469aa7a141853bc7f5ff07ebd1f934 100644 --- a/program2021/models.py +++ b/program2021/models.py @@ -21,9 +21,33 @@ from wagtailmetadata.models import MetadataPageMixin class Program2021HomePage(Page): ### FIELDS + headline = models.CharField( + "název programu", + max_length=100, + blank=True, + null=True, + help_text="Hlavní titulek domovské stránky", + ) + perex = models.TextField( + "perex", + max_length=512, + blank=True, + null=True, + help_text="Text pod titulkem", + ) ### PANELS + content_panels = Page.content_panels + [ + MultiFieldPanel( + [ + FieldPanel("headline"), + FieldPanel("perex"), + ], + heading="Vyhledávací formulář", + ), + ] + settings_panels = [] ### RELATIONS diff --git a/program2021/templates/program2021/program2021_home_page.html b/program2021/templates/program2021/program2021_home_page.html index 14984e29bab2a66cc8ad1a89e458cfc1bbcd8475..c6aeba8c2730cda6439aa1158f8efd13145c2bd2 100644 --- a/program2021/templates/program2021/program2021_home_page.html +++ b/program2021/templates/program2021/program2021_home_page.html @@ -4,8 +4,8 @@ <section class="jumbotron text-center"> <div class="container"> - <h1>Povězte nám kdo jste?</h1> - <p class="lead text-muted">Zkuste nám říci, kdo jste a my vám nabídneme to nejzajímavější z našeho programu pro vás!</p> + <h1>{{ page.headline }}</h1> + <p class="lead text-muted">{{ page.perex }}</p> <form class="text-left mt-5">