diff options
author | Jesús <heckyel@hyperbola.info> | 2018-10-11 12:33:40 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-10-11 12:33:40 -0500 |
commit | 932fd81b908c9c91c53a99085784599f535fbf24 (patch) | |
tree | b94500a20e771a3844bdbad81741fdf0122e9f95 /project/forms.py | |
download | personal-site-932fd81b908c9c91c53a99085784599f535fbf24.tar.lz personal-site-932fd81b908c9c91c53a99085784599f535fbf24.tar.xz personal-site-932fd81b908c9c91c53a99085784599f535fbf24.zip |
Initial commit
Diffstat (limited to 'project/forms.py')
-rw-r--r-- | project/forms.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/project/forms.py b/project/forms.py new file mode 100644 index 0000000..0d1c831 --- /dev/null +++ b/project/forms.py @@ -0,0 +1,25 @@ +from django import forms + + +class ContactForm(forms.Form): + name = forms.CharField(label="Nombre", + required=True, + widget=forms.TextInput( + attrs={'placeholder': 'Nombre'} + ), + min_length=3, + max_length=100) + email = forms.EmailField(label="Email", + required=True, + widget=forms.EmailInput( + attrs={'placeholder': 'user@page.domain'} + ), + min_length=3, + max_length=100) + content = forms.CharField(label="Mensaje", + required=True, + widget=forms.Textarea( + attrs={'placeholder': 'Mensaje'} + ), + min_length=10, + max_length=1000) |