You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
"""
|
|
|
|
Formuláře (:class:`django.forms.Form`) umožňují jednoduchou tvorbu formulářů,
|
|
|
|
které lze pak jednoduše dát do frontendu i zpracovat na backendu.
|
|
|
|
|
|
|
|
Pro přidání políčka do formuláře je potřeba
|
|
|
|
- mít v modelu tu položku, kterou chci upravovat
|
|
|
|
- přidat do views (prihlaskaView, resitelEditView)
|
|
|
|
- přidat do forms
|
|
|
|
- includovat do html
|
|
|
|
"""
|
|
|
|
from django import forms
|
|
|
|
|
|
|
|
class OpravaForm(forms.Form):
|
|
|
|
""" formulář k přidání opravy (:class:`korektury.models.Oprava`) """
|
|
|
|
text = forms.CharField(max_length=256)
|
|
|
|
autor = forms.CharField(max_length=20)
|
|
|
|
x = forms.IntegerField()
|
|
|
|
y = forms.IntegerField()
|
|
|
|
scroll = forms.CharField(max_length=256)
|
|
|
|
pdf = forms.CharField(max_length=256)
|
|
|
|
img_id = forms.CharField(max_length=256)
|
|
|
|
id = forms.CharField(max_length=256)
|
|
|
|
action = forms.CharField(max_length=256)
|
|
|
|
|