Mercurial > hg > agora
changeset 98:5a8f1dece263
Fix extra whitespace issues in Python file
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Fri, 31 Aug 2012 02:26:22 -0400 |
parents | bf731c77ddf9 |
children | d858aae811d0 |
files | apps/snippet/forms.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/apps/snippet/forms.py +++ b/apps/snippet/forms.py @@ -25,7 +25,6 @@ initial=LEXER_DEFAULT, label=_(u'Lexer'), ) - expire_options = forms.ChoiceField( choices=EXPIRE_CHOICES, initial=EXPIRE_DEFAULT, @@ -35,7 +34,7 @@ def __init__(self, request, *args, **kwargs): super(SnippetForm, self).__init__(*args, **kwargs) self.request = request - + try: if self.request.session['userprefs'].get('display_all_lexer', False): @@ -48,17 +47,17 @@ self.request.session['userprefs'].get('default_name', '') except KeyError: pass - + def save(self, parent=None, *args, **kwargs): # Set parent snippet if parent: self.instance.parent = parent - + # Add expire datestamp self.instance.expires = datetime.datetime.now() + \ datetime.timedelta(seconds=int(self.cleaned_data['expire_options'])) - + # Save snippet in the db super(SnippetForm, self).save(*args, **kwargs) @@ -101,7 +100,7 @@ default_name = forms.CharField(label=_(u'Default Name'), required=False) display_all_lexer = forms.BooleanField( - label=_(u'Display all lexer'), + label=_(u'Display all lexer'), required=False, widget=forms.CheckboxInput, help_text=_(u'This also enables the super secret ' \