aboutsummaryrefslogtreecommitdiffstats
path: root/src/shorturls/urls.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss2009-04-12 16:25:05 -0500
committerJacob Kaplan-Moss2009-04-12 16:25:05 -0500
commitb5ee253b28673fcfad49f09d9d2687e86ed520b7 (patch)
tree32f3f5939bf8d69503f443573414ea80567d095e /src/shorturls/urls.py
parent4391a39ee4cde31ff9c9a56cd8d452b934136b4e (diff)
downloaddjango-shorturls-b5ee253b28673fcfad49f09d9d2687e86ed520b7.tar.bz2
Added a working shorturl redirect view, with tests.
Diffstat (limited to 'src/shorturls/urls.py')
-rw-r--r--src/shorturls/urls.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shorturls/urls.py b/src/shorturls/urls.py
new file mode 100644
index 0000000..b81e24d
--- /dev/null
+++ b/src/shorturls/urls.py
@@ -0,0 +1,9 @@
+from django.conf import settings
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ url(
+ regex = '^(?P<prefix>%s)(?P<tiny>\w+)$' % '|'.join(settings.SHORTEN_MODELS.keys()),
+ view = 'shorturls.views.redirect',
+ ),
+) \ No newline at end of file