Created
April 17, 2012 16:15
-
-
Save Gautier/2407244 to your computer and use it in GitHub Desktop.
DatePickerMixIn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DatePickerMixIn(object): | |
def prepare_datefields(self): | |
for field in self.fields: | |
if isinstance(self.fields[field], forms.fields.DateField): | |
self.fields[field].widget.attrs.update({'class':'datepicker'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment