Exemplo n.º 1
0
"""jwt_knox urls.py

"""

from rest_framework import routers
from rest_framework.urlpatterns import include, url

from .viewsets import JWTKnoxAPIViewSet

app_name = 'jwt_knox'

router = routers.SimpleRouter(trailing_slash=False)
router.register(r'', JWTKnoxAPIViewSet, basename='jwt_knox')

urlpatterns = [url('^', include(router.urls)), ]
Exemplo n.º 2
0
Arquivo: urls.py Projeto: gpul-org/XEA
"""api URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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
from rest_framework import routers
from rest_framework.urlpatterns import include
from jwt_knox.viewsets import JWTKnoxAPIViewSet

router = routers.SimpleRouter(trailing_slash=False)
router.register(r'auth/jwt', JWTKnoxAPIViewSet, base_name='jwt_knox')

urlpatterns = [
    url(r'', include(router.urls)),
]
Exemplo n.º 3
0
from rest_framework.urlpatterns import format_suffix_patterns, include
from django.conf.urls import patterns, url, include
from iDrive import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register(r'baruser', views.BarUserViewSet, base_name='baruser')
router.register(r'promotion', views.PromotionViewSet, base_name='promotion')
router.register(r'party', views.PartyViewSet, base_name='party')
router.register(r'partyuser', views.PartyUserViewSet, base_name='partyuser')

urlpatterns = patterns(
    '',
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api-token-auth/',
        'rest_framework.authtoken.views.obtain_auth_token'),
)
Exemplo n.º 4
0
"""jwt_knox urls.py

"""

from rest_framework import routers
from rest_framework.urlpatterns import include, url

from .viewsets import JWTKnoxAPIViewSet

app_name = 'jwt_knox'

router = routers.SimpleRouter(trailing_slash=False)
router.register(r'', JWTKnoxAPIViewSet, basename='jwt_knox')

urlpatterns = [
    url('^', include(router.urls)),
]
Exemplo n.º 5
0
"""api URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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
from rest_framework import routers
from rest_framework.urlpatterns import include

from .views import schema_view
from jwt_knox.viewsets import JWTKnoxAPIViewSet

router = routers.SimpleRouter(trailing_slash=False)
router.register(r'auth/jwt', JWTKnoxAPIViewSet, base_name='jwt_knox')

urlpatterns = [
    url(r'docs', schema_view, name='swagger-ui'),
    url(r'', include(router.urls)),
    url(r'accounts/', include('accounts.urls')),
]
Exemplo n.º 6
0
#!/usr/bin/env python
# coding=utf-8

from django.urls import re_path

from rest_framework.urlpatterns import include
from rest_framework_nested import routers

from users import views

__all__ = [
    'users_urlpatterns',
    'auth_urlpatterns',
]

app_name = 'users'

auth_router = routers.DefaultRouter()
auth_router.register(r'', views.users.AuthViewSet, base_name='api-auth')
users_router = routers.DefaultRouter()
users_router.register(r'', views.users.UsersViewSet, base_name='api-users')

users_urlpatterns = [
    re_path(r'^', include(users_router.urls)),
]
auth_urlpatterns = [
    re_path(r'^', include(auth_router.urls)),
]
Exemplo n.º 7
0
from rest_framework.urlpatterns import format_suffix_patterns, include
from django.conf.urls import patterns, url, include
from iDrive import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register(r'baruser', views.BarUserViewSet, base_name='baruser')
router.register(r'promotion', views.PromotionViewSet, base_name='promotion')
router.register(r'party', views.PartyViewSet, base_name='party')
router.register(r'partyuser', views.PartyUserViewSet, base_name='partyuser')


urlpatterns = patterns('',
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls',
                                namespace='rest_framework')),
    url(r'^api-token-auth/', 'rest_framework.authtoken.views.obtain_auth_token'),
    )