32 lines
1.2 KiB
Python
Executable File
32 lines
1.2 KiB
Python
Executable File
from django.conf.urls.defaults import *
|
|
from settings import PROJECT_PATH
|
|
from os.path import join
|
|
|
|
# Uncomment the next two lines to enable the admin:
|
|
from django.contrib import admin
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns('',
|
|
# Example:
|
|
# (r'^index/', include('index.foo.urls')),
|
|
(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
|
|
(r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}),
|
|
(r'^$', 'books.views.index'),
|
|
# (r'^addhardware/(.*)', 'hardware.views.addhardware'),
|
|
(r'^add/$', 'books.views.add'),
|
|
(r'^addlocation/$', 'books.views.addLocation'),
|
|
(r'addowner/$', 'books.views.addOwner'),
|
|
(r'^(\w+)/add/$', 'books.views.add'),
|
|
(r'^isbnlookup/$', 'books.views.isbnLookup'),
|
|
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
|
{'document_root': join(PROJECT_PATH, 'media')}),
|
|
|
|
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
|
|
# to INSTALLED_APPS to enable admin documentation:
|
|
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
# (r'^admin/', include('django.contrib.admin.urls')),
|
|
# Uncomment the next line to enable the admin:
|
|
(r'^admin/(.*)', admin.site.root),
|
|
|
|
)
|