|
|
|
"""caremyway URL Configuration
|
|
|
|
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
|
|
https://docs.djangoproject.com/en/1.11/topics/http/urls/
|
|
|
|
Examples:
|
|
|
|
Function views
|
|
|
|
1. Add an import: from my_app import views
|
|
|
|
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
|
|
|
|
Class-based views
|
|
|
|
1. Add an import: from other_app.views import Home
|
|
|
|
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
|
|
|
Including another URLconf
|
|
|
|
1. Import the include() function: from django.conf.urls import url, include
|
|
|
|
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
|
|
|
"""
|
|
|
|
from django.conf.urls import url, include
|
|
|
|
from django.contrib import admin
|
|
|
|
from rest_framework import routers
|
|
|
|
from caremyway.api import views
|
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
router.register(r'user', views.UserViewSet, 'user')
|
|
|
|
router.register(r'userinfo', views.UserInfoViewSet, 'userinfo')
|
|
|
|
router.register(r'client', views.ClientViewSet, 'client')
|
|
|
|
router.register(r'provider', views.ProviderViewSet, 'provider')
|
|
|
|
router.register(r'worktype', views.WorkTypeViewSet, 'worktype')
|
|
|
|
router.register(r'employee', views.EmployeeViewSet, 'employee')
|
|
|
|
router.register(r'employer', views.EmployerViewSet, 'employer')
|
|
|
|
router.register(r'price', views.PriceViewSet, 'price')
|
|
|
|
router.register(r'cshift', views.CShiftViewSet, 'cshift')
|
|
|
|
router.register(r'pshift', views.PShiftViewSet, 'pshift')
|
|
|
|
|
|
|
|
# Wire up our API using automatic URL routing.
|
|
|
|
# Additionally, we include login URLs for the browsable API.
|
|
|
|
urlpatterns = [
|
|
|
|
url(r'^', include(router.urls)),
|
|
|
|
url(r'^report/(?P<type>.+)/$', views.ReportView.as_view()),
|
|
|
|
url(r'^admin/', include(admin.site.urls)),
|
|
|
|
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
|
|
|
url(r'^rest-auth/registration/account-email-verification-sent/', views.null_view, name='account_email_verification_sent'),
|
|
|
|
url(r'^rest-auth/registration/account-confirm-email/', views.null_view, name='account_confirm_email'),
|
|
|
|
url(r'^password-reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', views.null_view, name='password_reset_confirm'),
|
|
|
|
url(r'^rest-auth/', include('rest_auth.urls')),
|
|
|
|
url(r'^rest-auth/registration/', include('rest_auth.registration.urls'))
|
|
|
|
]
|