From b4e62fca36dd54b3bb9b1cc73a2bc822b218eced Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Tue, 17 Dec 2013 18:10:19 +0100 Subject: [PATCH] Expire choices are not settable. --- dpaste/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dpaste/forms.py b/dpaste/forms.py index 4dc07ff..53af4fc 100644 --- a/dpaste/forms.py +++ b/dpaste/forms.py @@ -7,12 +7,12 @@ from django.utils.translation import ugettext_lazy as _ from dpaste.models import Snippet from dpaste.highlight import LEXER_LIST, LEXER_DEFAULT, LEXER_KEYS -EXPIRE_CHOICES = ( +EXPIRE_CHOICES = getattr(settings, 'DPASTE_EXPIRE_CHOICES', ( (3600, _(u'In one hour')), (3600 * 24 * 7, _(u'In one week')), (3600 * 24 * 30, _(u'In one month')), -) -EXPIRE_DEFAULT = EXPIRE_CHOICES[2][0] +)) +EXPIRE_DEFAULT = getattr(settings, 'DPASTE_EXPIRE_DEFAULT', EXPIRE_CHOICES[2][0]) MAX_CONTENT_LENGTH = getattr(settings, 'DPASTE_MAX_CONTENT_LENGTH', 250*1024*1024) MAX_SNIPPETS_PER_USER = getattr(settings, 'DPASTE_MAX_SNIPPETS_PER_USER', 15)