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
50
51
52
53
54
55
56
57
58
59
60
61
|
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
# Use "linaro-openid" to allow peaceful coexistence of both
# python-apache-openid and django-openid authentication on the
# same server. When we get rid of apache openid protection,
# we can go back to using just "openid" here.
url(r'^linaro-openid/', include('django_openid_auth.urls')),
url(r'^logout/$', 'django.contrib.auth.views.logout'),
# Handle JS libs and CSS.
url(r'^js/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.JS_PATH}),
url(r'^css/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.CSS_PATH}),
url(r'^get-remote-static',
'license_protected_downloads.views.get_remote_static',
name='get_remote_static'),
# The license page...
url(r'^license$',
'license_protected_downloads.views.show_license',
name='show_license'),
# Exceptions redirected to root...
url(r'^license',
'license_protected_downloads.views.redirect_to_root',
name='redirect_to_root'),
# Accept the license
url(r'^accept-license',
'license_protected_downloads.views.accept_license',
name='accept_license'),
# Recursively get files for rendering (async calls accepted only).
url(r'^get-textile-files',
'license_protected_downloads.views.get_textile_files',
name='get_textile_files'),
url(r'^api/ls/(?P<path>.*)$',
'license_protected_downloads.views.list_files_api'),
url(r'^api/license/(?P<path>.*)$',
'license_protected_downloads.views.get_license_api'),
url(r'^api/request_key$',
'license_protected_downloads.uploads.api_request_key'),
# Catch-all. We always return a file (or try to) if it exists.
# This handler does that.
url(r'(?P<path>.*)', 'license_protected_downloads.views.file_server'),
)
|