aboutsummaryrefslogtreecommitdiffstats
path: root/django/project/forms.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-01-13 18:08:28 -0500
committerJesús <heckyel@hyperbola.info>2022-01-13 18:08:28 -0500
commit4317b0ba5d614fb6f9f3d3ee333848e9774700ba (patch)
treef474806ce968874db270926dcb0399b7f3139d18 /django/project/forms.py
parentb77c06257f9b650e2274c7dcb8937c237353c64d (diff)
downloadpersonal-site-4317b0ba5d614fb6f9f3d3ee333848e9774700ba.tar.lz
personal-site-4317b0ba5d614fb6f9f3d3ee333848e9774700ba.tar.xz
personal-site-4317b0ba5d614fb6f9f3d3ee333848e9774700ba.zip
Add docker support
Diffstat (limited to 'django/project/forms.py')
-rw-r--r--django/project/forms.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/django/project/forms.py b/django/project/forms.py
new file mode 100644
index 0000000..54cc5a5
--- /dev/null
+++ b/django/project/forms.py
@@ -0,0 +1,30 @@
+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)