-
Notifications
You must be signed in to change notification settings - Fork 1
/
urls.py
79 lines (61 loc) · 2.42 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.views.generic.list_detail import object_list
from django.contrib import admin
admin.autodiscover()
from xanip.apps.account.openid_consumer import xanipConsumer
from homepage.views import homepage
from package.views import package_autocomplete, category, packaginate
handler500 = "xanip.views.server_error"
urlpatterns = patterns("",
url(r"^$", homepage, name="home"),
url(r"^admin/invite_user/$", "xanip.apps.signup_codes.views.admin_invite_user", name="admin_invite_user"),
url(r"^admin/", include(admin.site.urls)),
url(r"^about/", include("about.urls")),
url(r"^account/", include("xanip.apps.account.urls")),
url(r"^openid/(.*)", xanipConsumer()),
url(r"^profiles/", include("idios.urls")),
url(r"^notices/", include("notification.urls")),
url(r"^announcements/", include("announcements.urls")),
url(r"^packages/", include("package.urls")),
url(r"^grids/", include("grid.urls")),
url(r"^search/", include("searchv1.urls")),
url(r"^feeds/", include("feeds.urls")),
url(r"^categories/(?P<slug>[-\w]+)/$", category, name="category"),
url(r"^categories/$", homepage, name="categories"),
url(r"^garbaginator/$",
direct_to_template,
{'template': 'package/garbaginator.html'},
name="garbaginator"),
url(r"^packaginate/$",
packaginate,
name="packaginate"),
url(
regex = '^autocomplete/package/$',
view = package_autocomplete,
name = 'package_autocomplete',
)
)
from apiv1.api import Api
from apiv1.resources import (
GotwResource, DpotwResource,
PackageResource, CategoryResource,
GridResource, PackageResourceBase,
UserResource
)
v1_api = Api()
v1_api.register(PackageResourceBase())
v1_api.register(PackageResource())
v1_api.register(CategoryResource())
v1_api.register(GridResource())
v1_api.register(GotwResource())
v1_api.register(DpotwResource())
v1_api.register(UserResource())
urlpatterns += patterns('',
url(r"^api/", include(v1_api.urls)),
)
if settings.SERVE_MEDIA:
urlpatterns += patterns("",
url(r"", include("staticfiles.urls")),
)