Bc. Petr Pecha
9 years ago
5 changed files with 33 additions and 3 deletions
@ -1,6 +1,11 @@ |
|||||
#coding: utf-8 |
#coding: utf-8 |
||||
|
|
||||
from django import forms |
from django import forms |
||||
|
from seminar.models import Soustredeni |
||||
|
|
||||
class KomentarForm(forms.Form): |
class KomentarForm(forms.Form): |
||||
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False) |
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False) |
||||
|
|
||||
|
class NewGalerieForm(forms.Form): |
||||
|
soustredeni = forms.ModelChoiceField(queryset = Soustredeni.objects, label = "Soustředění") |
||||
|
nazev = forms.CharField(label = "Název galerie", max_length = 100) |
||||
|
@ -0,0 +1,18 @@ |
|||||
|
{% extends "galerie/Base.html" %} |
||||
|
|
||||
|
{% block title %}{% block nadpis1a %} |
||||
|
Vytvářím novou galerii |
||||
|
{% endblock %}{% endblock %} |
||||
|
|
||||
|
{% block content %} |
||||
|
|
||||
|
<form enctype="multipart/form-data" action="." method="post"> |
||||
|
{% csrf_token %} |
||||
|
<table>{{form.as_table}} |
||||
|
<tr><td><label>Obrázky:</label></td><td><input name="obr" type="file" multiple></td></tr> |
||||
|
<tr><td> </td></tr> |
||||
|
<tr><td></td><td><input name="odeslat" type="submit" value="Vytvoř galerii"></td></tr> |
||||
|
</table> |
||||
|
</form> |
||||
|
|
||||
|
{% endblock %} |
Loading…
Reference in new issue