urls.py 1.29 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
Florent Chehab's avatar
Florent Chehab committed
11
from rex.models.university import UniversityInsuranceViewSet
12
from rex.models.tools import CurrencyViewSet
Florent Chehab's avatar
Florent Chehab committed
13
from rest_framework.documentation import include_docs_urls
Florent Chehab's avatar
Florent Chehab committed
14

Florent Chehab's avatar
Florent Chehab committed
15

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


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

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