summaryrefslogtreecommitdiff
path: root/server/urls.py
blob: ab694ab93b38848f72986fb7e60fd7d37c32e8f9 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from django.conf.urls.defaults import *
from settings import here

# Databrowse registration:

from django.contrib.auth.decorators import login_required
from django.contrib import databrowse
from django.views.generic.simple import direct_to_template
import settings

from django.contrib import admin


urlpatterns = patterns('',
	(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}),

	(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'registration/login.html'}),
	(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'registration/logout.html'}),

	(r'^locations/$', 'locations.views.index'),
	(r'^locations/getlocation', 'locations.views.getlocation'),
	(r'^locations/addlocation', 'locations.views.addlocation'),
	(r'^locations/search', 'locations.views.search'),
	(r'^locations/locationdetails', 'locations.views.locationdetails'),

	(r'^materials/$', 'materials.views.index'),
	(r'^materials/search$', 'materials.views.search'),
	(r'^materials/categories$', 'materials.views.categories'),
	(r'^materials/properties$', 'materials.views.properties'),
	(r'^materials/compare$', 'materials.views.compare'),
	(r'^materials/tradenames$', 'materials.views.tradenames'),
	(r'^materials/tradenames$', 'materials.views.manufacturers'),

	(r'^objects/$', 'objects.views.index'),
	(r'^objects/ean_lookup$', 'objects.views.ean_lookup'),

	(r'^xml/location', 'locations.views.locationtoxml'),
	(r'^yaml/location', 'locations.views.locationtoyaml'),

	(r'^xmlrpc/$', 'xmlrpc.views.handle_xmlrpc'),

	(r'^admin/(.*)', admin.site.root),
	(r'^databrowse/(.*)', login_required(databrowse.site.root)),
)



if settings.DEBUG:
	urlpatterns += patterns('', (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': here('../media')}),)