-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathurls.py
57 lines (49 loc) · 2.21 KB
/
urls.py
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Adriano Monteiro Marques
#
# Author: Piotrek Wasilewski <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
handler500 = 'djangotoolbox.errorviews.server_error'
urlpatterns = patterns('',
('^$', 'netadmin.views.home'),
('^about/$', 'django.views.generic.simple.direct_to_template',
{'template': 'about.html'}),
(r'^api/', include('netadmin.webapi.urls')),
(r'^network/', include('netadmin.networks.urls')),
(r'^event/', include('netadmin.events.urls')),
(r'^report/', include('netadmin.reportmeta.urls')),
(r'^user/', include('netadmin.users.urls')),
(r'^notifications/', include('netadmin.notifier.urls')),
(r'^plugins/', include('netadmin.plugins.urls')),
(r'^admin/', include(admin.site.urls)),
url(r'^search/', 'netadmin.views.search', name='search'),
url(r'login/', 'django.contrib.auth.views.login',
{'template_name': 'login.html'}, name='login_page'),
url(r'^logout/$', 'django.contrib.auth.views.logout',
{'next_page': '/'}, name='logout'),
url(r'^oauth/request_token/$','piston.authentication.oauth_request_token'),
url(r'^oauth/authorize/$','piston.authentication.oauth_user_auth'),
url(r'^oauth/access_token/$','netadmin.webapi.views.xauth_callback'),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT})
)