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"), ]
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'), ]
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"), ]
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'), ]
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'), ]