urls.py 524 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
2
3
from django.conf.urls import url, include
from rex import views
from rest_framework import routers
4
from rex.models.localization import CountryViewSet, RegionViewSet
Florent Chehab's avatar
Florent Chehab committed
5
from rest_framework.documentation import include_docs_urls
Florent Chehab's avatar
Florent Chehab committed
6

Florent Chehab's avatar
Florent Chehab committed
7

Florent Chehab's avatar
Florent Chehab committed
8
urlpatterns = [
9
    url(r'^$', views.home, name='home'),
Florent Chehab's avatar
Florent Chehab committed
10
    url(r'^api-docs/', include_docs_urls(title='Outgoing API'))
Florent Chehab's avatar
linting    
Florent Chehab committed
11
]
Florent Chehab's avatar
Florent Chehab committed
12
13
14
15


router = routers.DefaultRouter()
router.register(r'country', CountryViewSet)
Florent Chehab's avatar
Florent Chehab committed
16
router.register(r'region', RegionViewSet)
Florent Chehab's avatar
Florent Chehab committed
17
18

urlpatterns += [url(r'^api/', include(router.urls))]