示例#1
0
from django.conf.urls import url
from apps.usuario.views import RegistroUsuario,UserAPI
#wwww.django-rest-framework.org
urlpatterns = [
	url(r'^registrar',RegistroUsuario.as_view(),name="registrar"),
	url(r'^api',UserAPI.as_view(),name="api"),


]
示例#2
0
from django.conf.urls import url
from django.urls import path

from apps.usuario.views import RegistroUsuario, UserAPI

app_name = 'apps'

urlpatterns = [
    path('registrar', RegistroUsuario.as_view(), name='registrar'),
    path('api', UserAPI.as_view(), name='api'),
]
示例#3
0
from django.conf.urls import url

from apps.usuario.views import RegistroUsuario
from apps.usuario.views import UserAPI
from django.contrib.auth.decorators import login_required
from django.urls import path

urlpatterns = [
    path('registrar',
         login_required(RegistroUsuario.as_view()),
         name="registrar"),
    path('api', UserAPI.as_view(), name="api"),
]
示例#4
0
from django.conf.urls import url
from apps.usuario.views import RegistroUsuario, UserAPI

urlpatterns = [
    url(r'^registrar', RegistroUsuario.as_view(), name='registrar'),
    url(r'^api', UserAPI.as_view(), name='api'),
]
示例#5
0
文件: urls.py 项目: dehors/Django-CF
from django.conf.urls import url
from apps.usuario.views import RegistroUsuario, UserAPI

urlpatterns = [
	url(r'^registrar', RegistroUsuario.as_view(), name='registrar'),
	url(r'^api', UserAPI.as_view(), name='api'),
]
示例#6
0
from django.urls import path
from django.conf.urls import url, include
from django.contrib.auth.decorators import login_required

from apps.usuario.views import RegistroUsuario, listadousuarios, UserAPI

urlpatterns = [
    path('registrar/', RegistroUsuario.as_view(), name='usuario_registrar'),
    path('listado/', login_required(listadousuarios), name='usuario_listado'),
    path('api/', login_required(UserAPI.as_view()), name='api'),
]