Commit 6fd06873 authored by Florent Chehab's avatar Florent Chehab

prepare switch to autogeneration

parent f9b7200e
from django.conf.urls import url, include
from django.conf import settings
from rest_framework import routers
from backend.models.location import CountryViewSet
from backend.models.location import CityViewSet
from backend.models.module import CurrencyViewSet
from backend.models.otherCore import DepartmentViewSet
from backend.models.otherCore import OfferViewSet
from backend.models.otherCore import SemesterViewSet
from backend.models.otherCore import SpecialtyViewSet
from backend.models.location import CountryCultureViewSet
from backend.models.location import CountryHealthInsuranceViewSet
from backend.models.location import CountryOtherInsuranceViewSet
from backend.models.location import CountryTransportViewSet
from backend.models.location import CountryTourismViewSet
from backend.models.location import CountryOtherStuffViewSet
from backend.models.location import CountryVisaAdministrativeViewSet
from backend.models.location import CountryPhotoViewSet
from backend.models.location import CountryScholarshipViewSet
from backend.models.location import CountryDriViewSet
from backend.models.location import CityTransportViewSet
from backend.models.location import CityTourismViewSet
from backend.models.location import CityOtherStuffViewSet
from backend.models.location import CityPhotoViewSet
from backend.models.university import UniversityViewSet
from backend.models.university import CampusViewSet, MainCampusViewSet
from backend.models.university import UniversityScholarshipViewSet
from backend.models.university import UniversityInfoViewSet
from backend.models.university import UniversitySemestersDatesViewSet
from backend.models.university import UniversityInsuranceViewSet
from backend.models.university import UniversityCoursesViewSet
from backend.models.university import UniversityCultureViewSet
from backend.models.university import UniversityOtherStuffViewSet
from backend.models.university import UniversitySpecialOfferViewSet
from backend.models.university import UniversityPhotoViewSet
from backend.models.university import UniversityDriViewSet
from backend.models.university import UniversityModulesViewSet
from backend.models.university import CampusTransportViewSet
from backend.models.university import CampusAccommodationViewSet
from backend.models.university import CampusCultureAndStudentLifeViewSet
from backend.models.university import CampusOtherStuffViewSet
from backend.models.user import RecommendationViewSet
from backend.models.user import RecommendationListViewSet
from backend.models.user import PreviousDepartureViewSet
from backend.models.user import PreviousDepartureFeedbackViewSet
from backend.models.user import UserDataViewSet
from backend.models.my_model import PendingModerationViewSet
from backend.models.my_model import VersionViewSet
from rest_framework.documentation import include_docs_urls
urlpatterns = [
# url(r'^$', views.home, name='home'),
url(r'^api-docs/', include_docs_urls(title='Outgoing API'))
]
router = routers.DefaultRouter()
if settings.TESTING:
from backend.models.my_model import ForTestingModerationViewSet
from backend.models.my_model import ForTestingVersioningViewSet
router.register(r'test/moderation', ForTestingModerationViewSet)
router.register(r'test/versioning', ForTestingVersioningViewSet)
router.register(r'country', CountryViewSet)
router.register(r'city', CityViewSet)
router.register(r'campus', CampusViewSet)
router.register(r'main_campus', MainCampusViewSet)
router.register(r'university', UniversityViewSet)
router.register(r'country_more/culture', CountryCultureViewSet)
router.register(r'country_more/health_insurance',
CountryHealthInsuranceViewSet)
router.register(r'country_more/other_insurance', CountryOtherInsuranceViewSet)
router.register(r'country_more/transport', CountryTransportViewSet)
router.register(r'country_more/tourism', CountryTourismViewSet)
router.register(r'country_more/other_stuff', CountryOtherStuffViewSet)
router.register(r'country_more/visa_administrative',
CountryVisaAdministrativeViewSet)
router.register(r'country_more/photos', CountryPhotoViewSet)
router.register(r'country_more/scholarship', CountryScholarshipViewSet)
router.register(r'country_more/dri', CountryDriViewSet)
router.register(r'city_more/transport', CityTransportViewSet)
router.register(r'city_more/tourism', CityTourismViewSet)
router.register(r'city_more/other_stuff', CityOtherStuffViewSet)
router.register(r'city_more/photos', CityPhotoViewSet)
router.register(
r'university_more/all/(?P<univ_id>[0-9]+)', UniversityModulesViewSet, "university_details")
router.register(r'university_more/scholarship', UniversityScholarshipViewSet)
router.register(r'university_more/info', UniversityInfoViewSet)
router.register(r'university_more/insurance', UniversityInsuranceViewSet)
router.register(r'university_more/semesters_dates',
UniversitySemestersDatesViewSet)
router.register(r'university_more/courses', UniversityCoursesViewSet)
router.register(r'university_more/culture', UniversityCultureViewSet)
router.register(r'university_more/other_stuff', UniversityOtherStuffViewSet)
router.register(r'university_more/photos', UniversityPhotoViewSet)
router.register(r'university_more/special_offer',
UniversitySpecialOfferViewSet)
router.register(r'university_more/dri', UniversityDriViewSet)
router.register(r'campus_more/culture_and_sl',
CampusCultureAndStudentLifeViewSet)
router.register(r'campus_more/accomodation', CampusAccommodationViewSet)
router.register(r'campus_more/transport', CampusTransportViewSet)
router.register(r'campus_more/other_tuff', CampusOtherStuffViewSet)
router.register(r'other/currency', CurrencyViewSet)
router.register(r'other/semester', SemesterViewSet)
router.register(r'other/department', DepartmentViewSet)
router.register(r'other/specialty', SpecialtyViewSet)
router.register(r'other/offer', OfferViewSet)
router.register(r'university_more/previous_departure',
PreviousDepartureViewSet)
router.register(r'university_more/previous_departure_feedback',
PreviousDepartureFeedbackViewSet)
router.register(r'user/recommendation', RecommendationViewSet)
router.register(r'user/recommendations_list', RecommendationListViewSet)
router.register(r'user/data', UserDataViewSet, "user_data-detail")
router.register(r'pending_moderation', PendingModerationViewSet)
router.register(
r'version/(?P<content_type_id>[0-9]+)/(?P<object_pk>[0-9A-Za-z]+)', VersionViewSet, "versions-list")
urlpatterns += [url(r'^api/', include(router.urls))]
raise Exception(
"YOU NEED TO RUN THE PYTHON SCRIPT TO GENERATE THIS FILE : ./backend/generate/generate_all.py")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment