diff --git a/.idea/misc.xml b/.idea/misc.xml index 316238e..832a7da 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,4 +4,7 @@ + + \ No newline at end of file diff --git a/kinoostrov/templates/kinoostrov/base.html b/kinoostrov/templates/kinoostrov/base.html index 4ea8278..9325ff4 100644 --- a/kinoostrov/templates/kinoostrov/base.html +++ b/kinoostrov/templates/kinoostrov/base.html @@ -44,8 +44,8 @@

Akce

Klub

Galerie

-

Formulář pro kolotoč

-

Formulář pro letní kino

+ {#

Formulář pro kolotoč

#} + {#

Formulář pro letní kino

#} {% menu %} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7d23619 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +Django==3.2.4 +django-ckeditor==6.1.0 +Pillow==8.2.0 + diff --git a/stranky/models.py b/stranky/models.py index 47f3154..e4b4da3 100644 --- a/stranky/models.py +++ b/stranky/models.py @@ -16,4 +16,4 @@ class Menu(models.Model): stranka=models.ForeignKey(Stranka,on_delete=models.CASCADE) poradi=models.PositiveIntegerField() def __str__(self): - return self.stranka \ No newline at end of file + return str(self.stranka) \ No newline at end of file diff --git a/stranky/templates/stranky/stranka.html b/stranky/templates/stranky/stranka.html new file mode 100644 index 0000000..f60d194 --- /dev/null +++ b/stranky/templates/stranky/stranka.html @@ -0,0 +1,6 @@ +{%extends "kinoostrov/base.html" %} + +{% block content %} +{{stranka.nadpis}} +{{stranka.content|safe}} +{% endblock %} \ No newline at end of file diff --git a/stranky/views.py b/stranky/views.py index ee95c80..6967cd6 100644 --- a/stranky/views.py +++ b/stranky/views.py @@ -1,6 +1,11 @@ from django.shortcuts import render # Create your views here. +from stranky.models import Stranka -def stranka(request,sid): - pass \ No newline at end of file + +def stranka(request, sid): + s = Stranka.objects.get(id=sid) + + + return render(request, "stranky/stranka.html", {"stranka": s})