Esempio n. 1
0
from django.urls import path, include
from accounts.views import AccountCreateView

app_name = 'accounts'

urlpatterns = [
    path('register/', AccountCreateView.as_view(), name='register'),
    path('accounts/', include('rest_registration.api.urls')),
]
Esempio n. 2
0
from django.contrib import admin
from django.urls import path

from accounts.views import AccountDeleteView, AccountDetailView, AccountListView, AccountCreateView, AccountUpdateView, SignUpView

urlpatterns = [

    # Account Views
    path('', AccountListView.as_view(), name='account_list'),
    path('<int:pk>', AccountDetailView.as_view(), name='account_detail'),
    path('add', AccountCreateView.as_view(), name='account_add'),
    path('<int:pk>/', AccountUpdateView.as_view(), name='account_edit'),
    path('<int:pk>/delete', AccountDeleteView.as_view(),
         name='account_delete'),

    # Sign Up
    path('signup/', SignUpView.as_view(), name='signup'),
]
Esempio n. 3
0
from django.urls import path, include
from django.views.generic import TemplateView
from accounts.views import AccountCreateView

urlpatterns = [
    path('', TemplateView.as_view(template_name='base.html')),
    path('signup/', AccountCreateView.as_view()),
]
Esempio n. 4
0
from django.conf.urls import patterns, url

from accounts.views import AccountListView, AccountCreateView, AccountUpdateView, AccountDeleteView


urlpatterns = patterns('',
                       url(
                           regex=r'^$',
                           view=AccountListView.as_view(),
                           name='account_list'
                       ),
                       url(
                           regex=r'^create/$',
                           view=AccountCreateView.as_view(),
                           name='account_create'
                       ),
                       url(
                           regex=r'^delete/$',
                           view=AccountDeleteView.delete_account,
                           name='account_delete'
                       ),
                       url(
                           regex=r'^update/(?P<pk>\d+)/$',
                           view=AccountUpdateView.as_view(),
                           name='account_update'
                       ), )
Esempio n. 5
0
from django.contrib import admin
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib.auth.views import LoginView, LogoutView

# from posts import views
from accounts.views import AccountCreateView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^register/', AccountCreateView.as_view(), name='register'),
    url(r'^login/',
        LoginView.as_view(template_name='form.html',
                          extra_context={'title': 'Login'}),
        name='login'),
    url(r'^logout/', LogoutView.as_view(), name='logout'),
    url(r'^', include(("posts.urls", "posts"), namespace='posts')),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    import debug_toolbar

    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
Esempio n. 6
0
from django.conf.urls import patterns, url

from accounts.views import (AccountCreateView, WelcomeTemplateView,
                            UserLoginView, UserLogoutView)
urlpatterns = patterns('',
    url(r'^signup/$', AccountCreateView.as_view(), name='signup'),
    url(r'^welcome/$', WelcomeTemplateView.as_view(), name='welcome'),
    url(r'^login/$', UserLoginView.as_view(), name='login'),
    url(r'^logout/$', UserLogoutView.as_view(), name='logout'),
)
Esempio n. 7
0
from django.contrib.auth.views import LogoutView
from django.urls import path

from accounts.views import AccountCreateView, AccountLoginView, AccountDetailView, AccountPWChangeView, \
    AccountDeleteView

app_name = 'accounts'

urlpatterns = [
    path('create/', AccountCreateView.as_view(), name='create'),
    path('login/', AccountLoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('detail/<int:pk>', AccountDetailView.as_view(), name='detail'),
    path('update/<int:pk>', AccountPWChangeView.as_view(), name='update'),
    path('delete/<int:pk>', AccountDeleteView.as_view(), name='delete'),  # DeleteView는 CBV가 아님 FBV
]
Esempio n. 8
0
File: urls.py Progetto: gxf1986/hub
from django.urls import path

from accounts.views import AccountListView, AccountCreateView, AccountNameRedirectView
from lib.constants import AccountUrlRoot

urlpatterns = [
    path("", AccountListView.as_view(), name="account_list"),
    path(
        AccountUrlRoot.create.value + "/",
        AccountCreateView.as_view(),
        name="account_create",
    ),
    path("<int:pk>/",
         AccountNameRedirectView.as_view(),
         name="account_redirect"),
    path(
        "<int:pk>/<path:path>",
        AccountNameRedirectView.as_view(),
        name="account_redirect_path",
    ),
]
Esempio n. 9
0
from django.conf.urls import patterns, url

from accounts.views import (AccountCreateView, WelcomeTemplateView,
                            UserLoginView, UserLogoutView)
urlpatterns = patterns(
    '',
    url(r'^signup/$', AccountCreateView.as_view(), name='signup'),
    url(r'^welcome/$', WelcomeTemplateView.as_view(), name='welcome'),
    url(r'^login/$', UserLoginView.as_view(), name='login'),
    url(r'^logout/$', UserLogoutView.as_view(), name='logout'),
)