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)