diff options
| author | Vladimir Gorej | 2012-09-17 12:41:06 +0200 |
|---|---|---|
| committer | Vladimir Gorej | 2012-09-17 12:41:06 +0200 |
| commit | a99fc53d8ae3928ddb68bc3f2d6875f670c3cd1b (patch) | |
| tree | 536ec7e90ce620fa7587cfd0ddd184eaf0762b27 /brevisurl/settings.py | |
| parent | f1e930d2f718c781cabce4514071634dacf9e381 (diff) | |
| download | django-brevisurl-a99fc53d8ae3928ddb68bc3f2d6875f670c3cd1b.tar.bz2 | |
Updated README and context processors values
Diffstat (limited to 'brevisurl/settings.py')
| -rw-r--r-- | brevisurl/settings.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/brevisurl/settings.py b/brevisurl/settings.py index 80b3989..641020b 100644 --- a/brevisurl/settings.py +++ b/brevisurl/settings.py @@ -3,22 +3,22 @@ import string from django.conf import settings -# Default backend used to for get_connection() fuction +# Default backend used to for get_connection() function. DEFAULT_BACKEND = getattr(settings, 'BREVISURL_BACKEND', 'brevisurl.backends.local.BrevisUrlBackend') -# Domain that is used to create shortened urls -LOCAL_BACKEND_DOMAIN = getattr(settings, 'BREVISURL_BACKEND_LOCAL_DOMAIN', None) +# Domain that is used to create shortened urls. +LOCAL_BACKEND_DOMAIN = getattr(settings, 'BREVISURL_BACKEND_LOCAL_DOMAIN', None) or getattr(settings, 'BREVISURL_LOCAL_BACKEND_DOMAIN', None) -# Characters that are used to generate tokens for local backend +# Characters that are used to generate tokens for local backend. LOCAL_BACKEND_TOKEN_CHARS = getattr(settings, 'BREVISURL_LOCAL_BACKEND_TOKEN_CHARS', list(string.ascii_letters + string.digits)) -# Settings for token length +# Settings for token length. LOCAL_BACKEND_TOKEN_LENGTH = getattr(settings, 'BREVISURL_LOCAL_BACKEND_TOKEN_LENGTH', 5) -# Settings for url pattern +# Settings for url pattern. LOCAL_BACKEND_URL_PATTERN = getattr(settings, 'BREVISURL_LOCAL_BACKEND_URL_PATTERN', r'^(?P<token>[a-zA-Z0-9]{' + str(LOCAL_BACKEND_TOKEN_LENGTH) + r'})$') -# Protocol for local backend +# Protocol for local backend. LOCAL_BACKEND_DOMAIN_PROTOCOL = getattr(settings, 'BREVISURL_LOCAL_BACKEND_DOMAIN_PROTOCOL', 'http') # Do we need slash in newly generated token url ? |
