示例#1
0
from django.conf.urls import url, include
from django.contrib.auth.decorators import login_required

from accounts.views import AccountView, AccountDeleteView, AccountUpdateView


urlpatterns = [
    url(r'^create$', login_required(AccountView.as_view()), name='account_create'),
    url(r'^(?P<pk>\d+)/edit$', login_required(AccountUpdateView.as_view()), name='account_edit'),
    url(r'^(?P<pk>\d+)/delete$', login_required(AccountDeleteView.as_view()), name='account_delete'),
]
示例#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'),
]
示例#3
0
    UpdateCommentView,
    DeleteCommentView,
    AddAttachmentView,
    DeleteAttachmentsView,
    create_mail,  # get_account_details,
    get_contacts_for_account,
    get_email_data_for_account,
    get_teams_and_users)

app_name = 'accounts'

urlpatterns = [
    path('', AccountsListView.as_view(), name='list'),
    path('create/', CreateAccountView.as_view(), name='new_account'),
    path('<int:pk>/view/', AccountDetailView.as_view(), name="view_account"),
    path('<int:pk>/edit/', AccountUpdateView.as_view(), name="edit_account"),
    path('<int:pk>/delete/',
         AccountDeleteView.as_view(),
         name="remove_account"),
    path('delete/', AccountDeleteView.as_view(), name="remove_account"),
    path('comment/add/', AddCommentView.as_view(), name="add_comment"),
    path('comment/edit/', UpdateCommentView.as_view(), name="edit_comment"),
    path('comment/remove/', DeleteCommentView.as_view(),
         name="remove_comment"),
    path('attachment/add/', AddAttachmentView.as_view(),
         name="add_attachment"),
    path('attachment/remove/',
         DeleteAttachmentsView.as_view(),
         name="remove_attachment"),
    path('create-mail', create_mail, name="create_mail"),
    path('get_contacts_for_account/',
示例#4
0
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path

from accounts.views import AccountSignupView, AccountDetailView, AccountUpdateView

app_name = "accounts"

urlpatterns = [
    path('signup/', AccountSignupView.as_view(), name='signup'),
    path('login/',
         LoginView.as_view(template_name='accounts/login.html'),
         name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('detail/<int:pk>', AccountDetailView.as_view(), name='detail'),
    path('update/<int:pk>', AccountUpdateView.as_view(), name='update'),
]
示例#5
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'
                       ), )
示例#6
0
from accounts.views import AccountCreateView, AccountListView, AccountLoginView, AccountLogoutView, \
    AccountPasswordChangeView, AccountUpdateView, ContactView, LeaderboardListView, TrialLessonView


from django.urls import path


app_name = 'accounts'

urlpatterns = [
    path('', AccountListView.as_view(), name='users'),
    path('register/', AccountCreateView.as_view(), name='register'),
    path('login/', AccountLoginView.as_view(), name='login'),
    path('logout/', AccountLogoutView.as_view(), name='logout'),
    path('profile/', AccountUpdateView.as_view(), name='profile'),
    path('password/', AccountPasswordChangeView.as_view(), name='password'),
    path('leaderboard/', LeaderboardListView.as_view(), name='leaderboard'),
    path('contact_us/', ContactView.as_view(), name='contact_us'),
    path('trial_lesson/', TrialLessonView.as_view(), name='trial_lesson'),
    ]
示例#7
0
文件: urls.py 项目: bot242/djangocrm
    UpdateCommentView,
    DeleteCommentView,
    AddAttachmentView,
    DeleteAttachmentsView,
    create_mail,  # get_account_details,
    get_contacts_for_account,
    get_email_data_for_account)

app_name = 'accounts'

urlpatterns = [
    path('', AccountsListView.as_view(), name='list'),
    path('create/', CreateAccountView.as_view(), name='new_account'),
    path('<int:pk>/view/', AccountDetailView.as_view(), name="view_account"),
    path('<int:pk>/edit_account/',
         AccountUpdateView.as_view(),
         name="edit_account"),
    path('<int:pk>/delete/',
         AccountDeleteView.as_view(),
         name="remove_account"),
    path('comment/add/', AddCommentView.as_view(), name="add_comment"),
    path('comment/edit/', UpdateCommentView.as_view(), name="edit_comment"),
    path('comment/remove/', DeleteCommentView.as_view(),
         name="remove_comment"),
    path('attachment/add/', AddAttachmentView.as_view(),
         name="add_attachment"),
    path('attachment/remove/',
         DeleteAttachmentsView.as_view(),
         name="remove_attachment"),
    path('create-mail', create_mail, name="create_mail"),
    path('get_contacts_for_account/',