from django.conf.urls import patterns, url from django.views.generic.base import TemplateView from authentication.views import UserCreateView, LoginView urlpatterns = patterns( '', url('^api/v1/users/$', UserCreateView.as_view(), name='user-create'), url('^api/v1/auth/login/$', LoginView.as_view(), name='login'), url('^.*$', TemplateView.as_view(template_name='index.html'), name='index'), )
from django.conf.urls import patterns, url from django.views.generic.base import TemplateView from authentication.views import LoginView, LogoutView, UserCreateView, \ UserDestroyView, UserProfileRetrieveUpdateView from thoughts.views import ThoughtListCreateView, \ ThoughtRetrieveUpdateDestroyView urlpatterns = patterns( '', url(r'^api/v1/users/$', UserCreateView.as_view(), name='user-create'), url(r'^api/v1/users/(?P<pk>[0-9]+)/$', UserDestroyView.as_view(), name='user-destroy'), url(r'^api/v1/users/(?P<user__username>[a-zA-Z0-9_@+-]+)/$', UserProfileRetrieveUpdateView.as_view(), name='profile'), url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'), url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'), url(r'^api/v1/thoughts/$', ThoughtListCreateView.as_view(), name='thoughts'), url(r'^api/v1/thoughts/(?P<pk>[0-9]+)/$', ThoughtRetrieveUpdateDestroyView.as_view(), name='thought'), url(r'^.*$', TemplateView.as_view(template_name='index.html'), name='index'), )
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from authentication.views import UserCreateView, LoginView urlpatterns = patterns( '', url('^api/v1/auth/register/$', UserCreateView.as_view(), name='create_user'), url('^api/v1/auth/login/$', LoginView.as_view(), name='login_user'), # Static should be last url(r'^', TemplateView.as_view(template_name='index.html')), )
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView from authentication.views import UserCreateView, LoginView urlpatterns = patterns('', url('^api/v1/auth/register/$', UserCreateView.as_view(), name='create_user'), url('^api/v1/auth/login/$', LoginView.as_view(), name='login_user'), # Static should be last url(r'^', TemplateView.as_view(template_name='index.html')), )
from django.urls import path from authentication.views import UserListView, UserCreateView, UserUpdateView, \ UserDeleteView, UserDetailView, ChangePassword, SecurityQuestionCreateView, \ UserAdminDetailView, UserAdminUpdateView, RestoreDataUser, UserDetailApiView, \ BackupBDView, BackupBDAPiView app_name = "authentication" urlpatterns = [ # path('', UserListView.as_view(), name="list"), path('create/', UserCreateView.as_view(), name="create"), path('detail/<pk>/', UserDetailView.as_view(), name="detail"), path('update/<pk>/', UserUpdateView.as_view(), name="update"), path('delete/<pk>/', UserDeleteView.as_view(), name="delete"), path('detail/<pk>/security-question/create/', SecurityQuestionCreateView.as_view(), name="security_question"), # change password path('change-password/', ChangePassword.as_view(), name="change_password"), # Profile path('detail/', UserAdminDetailView.as_view(), name='detail_profile'), path('update/', UserAdminUpdateView.as_view(), name='update_profile'), path('restore-data/', RestoreDataUser.as_view(), name="restore_data"), # api path('api/detail/', UserDetailApiView.as_view(), name="api_detail_user"), # BD backup o restore
from django.conf.urls import url from authentication.forms import LoginForm from django.contrib.auth import views as auth_views from authentication.views import UserCreateView app_name = "authentication" urlpatterns = [ url(r'^$', auth_views.login, { 'template_name': 'system/login.html', 'authentication_form': LoginForm }, name="login"), url(r'^logout/$', auth_views.logout, name="logout"), url(r'^register/$', UserCreateView.as_view(), name="register"), ]