KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i am new to django and i want to make a simple form, according to the doc i can make a form using forms module from django from django import forms class CronForm(forms.Form): name = forms.CharField(max_length=100) email = forms.EmailField(required=False, label='Your e-mail address') message = forms.CharField(widget=forms.Textarea) def clean_message(self): message = self.cleaned_data['message'] num_words = len(message.split()) if num_words < 4: raise forms.ValidationError("Not enough words!") return message what i want to know is how to create a dropdown list of days in month i.e from 1 to 31? some have done it using javascript in their form template, can this be done in django?
Tags (comma-separated)
Save Edits
Cancel