aboutsummaryrefslogtreecommitdiffstats
path: root/demo/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'demo/forms.py')
-rw-r--r--demo/forms.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/demo/forms.py b/demo/forms.py
new file mode 100644
index 0000000..aea1ce7
--- /dev/null
+++ b/demo/forms.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django import forms
+
+from bootstrap3.tests import TestForm
+
+RADIO_CHOICES = (
+ ('1', 'Radio 1'),
+ ('2', 'Radio 2'),
+)
+
+MEDIA_CHOICES = (
+ ('Audio', (
+ ('vinyl', 'Vinyl'),
+ ('cd', 'CD'),
+ )
+ ),
+ ('Video', (
+ ('vhs', 'VHS Tape'),
+ ('dvd', 'DVD'),
+ )
+ ),
+ ('unknown', 'Unknown'),
+)
+
+
+class ContactForm(TestForm):
+ pass
+
+
+class FilesForm(forms.Form):
+ text1 = forms.CharField()
+ file1 = forms.FileField()
+ file2 = forms.FileField(required=False)
+ file3 = forms.FileField(widget=forms.ClearableFileInput)
+ file4 = forms.FileField(required=False, widget=forms.ClearableFileInput)