from timeslot.views import TimeSlotViewSet
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

print("inside urls")
router = routers.DefaultRouter()
router.register(r'user', UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth$', AuthUserViewSet.as_view()),
    url(r'^user/me$', MeViewSet.as_view()),
    # url(r'^', include('user.urls')),
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
    url(r'^$', include(router.urls)),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view()),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
]
Exemple #2
0
from timeslot.views import TimeSlotViewSet
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

print("inside urls")
router = routers.DefaultRouter()
router.register(r'user', UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth$', AuthUserViewSet.as_view()),
    url(r'^user/me$', MeViewSet.as_view()),
    # url(r'^', include('user.urls')),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^$', include(router.urls)),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view()),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
]
Exemple #3
0
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

router = routers.DefaultRouter()
router.register(r'user', views.UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth/$', AuthUserViewSet.as_view()),
    url(r'^user/me/(?P<email>[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)$',
        MeViewSet.as_view(),
        name="get"),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view(), name="get"),
    url(r'^user/appointment/(?P<a_id>[0-9]+)$',
        UserAppointmentViewSet.as_view(),
        name="delete"),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^', include(router.urls)),
]
from user.views import MeViewSet
from user.views import UserDetailViewSet
from rest_framework import routers
from timeslot.views import TimeSlotViewSet
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

router = routers.DefaultRouter()
router.register(r'user', views.UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth/$', AuthUserViewSet.as_view()),
    url(r'^user/me/(?P<email>[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)$', MeViewSet.as_view(),name="get"),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view(), name="get"),
    url(r'^user/appointment/(?P<a_id>[0-9]+)$', UserAppointmentViewSet.as_view(),name="delete"),
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
    url(r'^', include(router.urls)),
]