from django.conf.urls import url from django.contrib.auth.views import LogoutView from account.views import RegisterUserView, LoginUserView, DashboardView urlpatterns = [ url(r'^signup/$', view=RegisterUserView.as_view(), name='signup'), url(r'^login/$', view=LoginUserView.as_view(), name='login'), url(r'^logout/$', view=LogoutView.as_view(), name='logout'), url(r'^admin-panel/$', view=DashboardView.as_view(), name='admin_panel'), ]
def get_user_login_factories(): create_user_interactor = LoginUserInreractorFactory().create() return LoginUserView(create_user_interactor)
from django.urls import path from account.views import RegisterUserView, LoginUserView, LogoutUserView, RetrieveUserView urlpatterns = [ path('register/', RegisterUserView.as_view(template_name='user/register.html'), name='register'), path('login/', LoginUserView.as_view(template_name='user/login.html'), name='login'), path('logout/', LogoutUserView.as_view(), name='logout'), path('profile/<str:username>/', RetrieveUserView.as_view(), name='retrieve'), ]
OrderMealListView, LunchView, UserProfileDetailView, ) from django.contrib.auth.views import logout from django.urls import path app_name = 'account' urlpatterns = [ # /account/register #url(r'^home/$', views.home, name='home'), url(r'^register/$', view=RegisterUserView.as_view(), name='register'), path('login/', view=LoginUserView.as_view(), name='login'), #url(r'^logout/$', auth_views.logout), url(r'^logout/$', logout, {'next_page': settings.LOGOUT_REDIRECT_URL}, name='logout'), #url(r'^logout/$', view=LogoutView.as_view(), name='logout'), url(r'^orders/$', view=OrderMealView.as_view(), name='orders'), url(r'^dashboard/$', view=DashboardView.as_view(), name='dashboard'), # url(r'^dashboard/myorders$', view=OrderMealListView.as_view(), name='myorders'), url(r'^myprofile/(?P<pk>\d+)$', view=UserProfileDetailView.as_view(), name='myprofile'), # url(r'user/<int:pk>/', views=UserProfileDetailView.as_view(), name='user_detail'), url(r'^lunch/$', view=LunchView.as_view(), name='lunch'), url(r'^password_reset/$', auth_views.password_reset,