No longer strip the beginning of a paste!

This commit is contained in:
Martin Mahner 2013-11-26 16:51:05 +01:00
parent 1c8a4ae0bf
commit b4f2afa03a

View file

@ -65,7 +65,10 @@ class SnippetForm(forms.ModelForm):
def clean_content(self): def clean_content(self):
return self.cleaned_data.get('content', '').strip() content = self.cleaned_data.get('content', '')
if content.strip() == '':
raise forms.ValidationError(_('Plesae fill out this field.'))
return content
def clean(self): def clean(self):
# The `title` field is a hidden honeypot field. If its filled, # The `title` field is a hidden honeypot field. If its filled,