aboutsummaryrefslogtreecommitdiffstats
path: root/project/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'project/forms.py')
-rw-r--r--project/forms.py25
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)