urls.py 1.17 KB
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
5
6
7
8
9
from rex.models.location import CountryViewSet
from rex.models.location import CityViewSet
from rex.models.university import UniversityViewSet
from rex.models.university import CampusViewSet
from rex.models.university import UniversityScholarshipViewSet
from rex.models.university import UniversityInfoViewSet
Florent Chehab's avatar
Florent Chehab committed
10
from rex.models.university import SemestersDatesViewSet
11
from rex.models.tools import CurrencyViewSet
Florent Chehab's avatar
Florent Chehab committed
12
from rest_framework.documentation import include_docs_urls
Florent Chehab's avatar
Florent Chehab committed
13

Florent Chehab's avatar
Florent Chehab committed
14

Florent Chehab's avatar
Florent Chehab committed
15
urlpatterns = [
16
    url(r'^$', views.home, name='home'),
Florent Chehab's avatar
Florent Chehab committed
17
    url(r'^api-docs/', include_docs_urls(title='Outgoing API'))
Florent Chehab's avatar
linting    
Florent Chehab committed
18
]
Florent Chehab's avatar
Florent Chehab committed
19
20
21
22


router = routers.DefaultRouter()
router.register(r'country', CountryViewSet)
Florent Chehab's avatar
Florent Chehab committed
23
router.register(r'city', CityViewSet)
24
router.register(r'campus', CampusViewSet)
Florent Chehab's avatar
Florent Chehab committed
25
router.register(r'university', UniversityViewSet)
Florent Chehab's avatar
Florent Chehab committed
26
router.register(r'university_scholarship', UniversityScholarshipViewSet)
27
router.register(r'university_info', UniversityInfoViewSet)
Florent Chehab's avatar
Florent Chehab committed
28
router.register(r'semesters_dates', SemestersDatesViewSet)
Florent Chehab's avatar
Florent Chehab committed
29
router.register(r'currency', CurrencyViewSet)
Florent Chehab's avatar
Florent Chehab committed
30
31

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