aboutsummaryrefslogtreecommitdiffstats
path: root/README.rst
diff options
context:
space:
mode:
authorVladimir Gorej2012-09-17 12:41:06 +0200
committerVladimir Gorej2012-09-17 12:41:06 +0200
commita99fc53d8ae3928ddb68bc3f2d6875f670c3cd1b (patch)
tree536ec7e90ce620fa7587cfd0ddd184eaf0762b27 /README.rst
parentf1e930d2f718c781cabce4514071634dacf9e381 (diff)
downloaddjango-brevisurl-a99fc53d8ae3928ddb68bc3f2d6875f670c3cd1b.tar.bz2
Updated README and context processors values
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst20
1 files changed, 18 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index 78f88d3..7d9af20 100644
--- a/README.rst
+++ b/README.rst
@@ -61,6 +61,22 @@ Configuration
# but uses this settings insted to generate absolute urls
BREVISURL_BACKEND_LOCAL_DOMAIN = 'http://brevisurl.net/' # Default is None
+ # Characters that are used to generate tokens for local backend.
+ BREVISURL_LOCAL_BACKEND_TOKEN_CHARS = list(string.ascii_letters + string.digits)
+
+ # Settings for token length.
+ BREVISURL_LOCAL_BACKEND_TOKEN_LENGTH = 5
+
+ # Settings for url pattern.
+ BREVISURL_LOCAL_BACKEND_URL_PATTERN = r'^(?P<token>[a-zA-Z0-9]{' + str(LOCAL_BACKEND_TOKEN_LENGTH) + r'})$'
+
+ # Protocol for local backend.
+ BREVISURL_LOCAL_BACKEND_DOMAIN_PROTOCOL = getattr(settings, 'BREVISURL_LOCAL_BACKEND_DOMAIN_PROTOCOL', 'http')
+
+ # Do we need slash in newly generated token url ?
+ BREVISURL_LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = getattr(settings, 'BREVISURL_LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH', False)
+
+
**Append brevisurl url patterns to your urls.py at the end of module, if you're using local backend**
@@ -160,7 +176,7 @@ Tests
- Xubuntu Linux 12.04 LTS precise 64-bit
- python 2.7.3+
- python unittest
-- django 1.4
+- django 1.4.1
**Running tests**
@@ -175,7 +191,7 @@ Author
| char0n (VladimĂ­r Gorej, CodeScale s.r.o.)
| email: gorej@codescale.net
-| web: http://www.codescale.net
+| web: http://www.codescale.net/
References