mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 20:06:35 +11:00
Set a max_length for all snippets. Nobody needs more than 256k of space.
This commit is contained in:
parent
a1e44486d2
commit
2ec3614693
1 changed files with 2 additions and 0 deletions
|
@ -17,11 +17,13 @@ EXPIRE_CHOICES = (
|
||||||
|
|
||||||
EXPIRE_DEFAULT = 3600 * 24 * 30
|
EXPIRE_DEFAULT = 3600 * 24 * 30
|
||||||
|
|
||||||
|
MAX_CONTENT_LENGTH = 250*1024*1024
|
||||||
|
|
||||||
class SnippetForm(forms.ModelForm):
|
class SnippetForm(forms.ModelForm):
|
||||||
content = forms.CharField(
|
content = forms.CharField(
|
||||||
label=_('Content'),
|
label=_('Content'),
|
||||||
widget=forms.Textarea(attrs={'placeholder': _('Awesome code goes here...')}),
|
widget=forms.Textarea(attrs={'placeholder': _('Awesome code goes here...')}),
|
||||||
|
max_length=MAX_CONTENT_LENGTH,
|
||||||
)
|
)
|
||||||
|
|
||||||
lexer = forms.ChoiceField(
|
lexer = forms.ChoiceField(
|
||||||
|
|
Loading…
Reference in a new issue