mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-19 00:09:21 +11:00
No longer strip the beginning of a paste!
This commit is contained in:
parent
1c8a4ae0bf
commit
b4f2afa03a
1 changed files with 4 additions and 1 deletions
|
@ -65,7 +65,10 @@ class SnippetForm(forms.ModelForm):
|
|||
|
||||
|
||||
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):
|
||||
# The `title` field is a hidden honeypot field. If its filled,
|
||||
|
|
Loading…
Reference in a new issue