forked from django-json-api/django-rest-framework-json-api
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
18 lines (14 loc) · 571 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fromdjango.conf.urlsimportinclude, url
fromrest_frameworkimportrouters
fromexample.viewsimport (
BlogViewSet, EntryViewSet, AuthorViewSet, CommentViewSet, CompanyViewset, ProjectViewset)
router=routers.DefaultRouter(trailing_slash=False)
router.register(r'blogs', BlogViewSet)
router.register(r'entries', EntryViewSet)
router.register(r'authors', AuthorViewSet)
router.register(r'comments', CommentViewSet)
router.register(r'companies', CompanyViewset)
router.register(r'projects', ProjectViewset)
urlpatterns= [
url(r'^', include(router.urls)),
]