Created
October 28, 2013 11:32
-
-
Save fellipeh/7195319 to your computer and use it in GitHub Desktop.
Form Caixa
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 CRForm(ModelForm): | |
class Meta: | |
model = ContaReceber | |
def __init__(self, *args, **kwargs): | |
vUserProfile = kwargs.pop('vUserProfile', None) | |
super(CRForm, self).__init__(*args, **kwargs) | |
self.fields["dthr_cadastro"].widget.attrs['readonly'] = "True" | |
self.fields["valor"].localize = True | |
self.fields["valor"].widget.is_localized = True | |
self.fields["valor"].widget.attrs['class'] = "mascdecimal2" | |
self.fields["cliente"].widget.attrs['class'] = "chosen-select-no-results" | |
self.fields["sistema"].widget.attrs['class'] = "chosen-select-no-results" | |
def clean_dthr_cadastro(self): | |
data = datetime.now() | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment