aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--src/shorturls/views.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index fd54d38..fb81c73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
.installed.cfg
bin
develop-eggs
+dist
downloads
eggs
parts
diff --git a/src/shorturls/views.py b/src/shorturls/views.py
index d56ee1f..1737472 100644
--- a/src/shorturls/views.py
+++ b/src/shorturls/views.py
@@ -34,7 +34,7 @@ def redirect(request, prefix, tiny):
# actually returns a domain-relative URL -- into a fully qualified one.
# If we got a fully-qualified URL, sweet.
- if urlparse.urlsplit(url).scheme:
+ if urlparse.urlsplit(url)[0]:
return HttpResponsePermanentRedirect(url)
# Otherwise, we need to make a full URL by prepending a base URL.