Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (25 sloc) 1.135 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.views import login, logout

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'Stumpy.views.home', name='home'),
    # url(r'^Stumpy/', include('Stumpy.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
 
    # logging in and out handlers
    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    (r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
    
    # show the index from /
    url(r'^$', 'shortener.views.index'),
    # iframer bookmarklet
    url(r'^iframer/$', 'shortener.views.iframer'),
    # get a url for redirection /shorty
    url(r'^(?P<short>[0-9a-zA-Z]+)/$', 'shortener.views.detail'),
    # send a url to be shortened from /url/someencodedurl
    url(r'^url/$', 'shortener.views.submit'),

)
Something went wrong with that request. Please try again.