urls.py 1.03 KB
Newer Older
Jean Michel Rouly's avatar
Jean Michel Rouly committed
1
from django.contrib import admin
Jean Michel Rouly's avatar
Jean Michel Rouly committed
2
from django.contrib import auth
Jean Michel Rouly's avatar
Jean Michel Rouly committed
3
4
5
6
7
8
from django.conf.urls import patterns, include, url

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

Jean Michel Rouly's avatar
Jean Michel Rouly committed
9
urlpatterns = patterns('website.views',
Jean Michel Rouly's avatar
Jean Michel Rouly committed
10
    # Examples:
11
12
13
14
    # url(r'^$', 'bookshare.views.home', name='home'),
    # url(r'^bookshare/', include('bookshare.foo.urls')),

    # home page
Jean Michel Rouly's avatar
Jean Michel Rouly committed
15
    url(r'^$', 'index', name = 'homepage'),
16

17
18
19
20
    # listing page
    url(r'^listing/(?P<slug>[^\.]+)', 'listing', name = 'listing'),

    # create new listing
Jean Michel Rouly's avatar
Jean Michel Rouly committed
21
    url(r'^create/', 'create_listing', name = 'new-listing'),
22
23

    # see your listings
24
    url(r'^my-listings/', 'my_listings', name = 'my-listings'),
25
26

    # your seller profile
Jean Michel Rouly's avatar
Jean Michel Rouly committed
27
    url(r'^profile/', 'my_profile', name = 'my-profile'),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
28
29

    # Uncomment the admin/doc line below to enable admin documentation:
Jean Michel Rouly's avatar
Jean Michel Rouly committed
30
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
31
32

    # Uncomment the next line to enable the admin:
Jean Michel Rouly's avatar
Jean Michel Rouly committed
33
    url(r'^admin/', include(admin.site.urls)),
Jean Michel Rouly's avatar
Jean Michel Rouly committed
34
)