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'), ]
from django.conf.urls import url from django.conf.urls import include # this does the static file loading when in dev mode, not needed for production from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .views import HomeView from .views import NotFoundView from accounts.views import AccountDetailView urlpatterns = [ url( r'^$', HomeView.as_view(), name='home', ), url(r'^accounts/', include('accounts.urls', namespace='accounts')), url( r'^(?P<username>[-\w.@]+)/$', AccountDetailView.as_view(), name='account_detail', ) ] # add the static file patterns to url patterns urlpatterns += staticfiles_urlpatterns() handler404 = NotFoundView.as_view()
AddCommentView, 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"),
from django.contrib.auth.decorators import login_required from accounts.views import AccountDetailView, NewApiKey from django.conf.urls import * from django.contrib.auth.urls import urlpatterns as auth_url_patterns urlpatterns = patterns( '', (r'^$', login_required(AccountDetailView.as_view()), {}, 'account'), (r'^generate/$', login_required(NewApiKey.as_view()), {}, 'generate-key'), ) urlpatterns += auth_url_patterns
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'), ]
__author__ = 'mjeffrey' from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required as auth from accounts.views import AccountDetailView, UserProfileEditView, ListAccountView urlpatterns = patterns('', url(r'^$', ListAccountView.as_view(), name='list'), url(r'^(?P<slug>\w+)/$', AccountDetailView.as_view(), name='view'), url(r'^(?P<slug>\w+)/edit/$', auth(UserProfileEditView.as_view()), name='edit'), )
from django.contrib.auth.decorators import login_required from accounts.views import AccountDetailView, NewApiKey from django.conf.urls import * from django.contrib.auth.urls import urlpatterns as auth_url_patterns urlpatterns = patterns('', (r'^$', login_required(AccountDetailView.as_view()), {}, 'account'), (r'^generate/$', login_required(NewApiKey.as_view()), {}, 'generate-key'), ) urlpatterns += auth_url_patterns
__author__ = 'mjeffrey' from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required as auth from accounts.views import AccountDetailView, UserProfileEditView, ListAccountView urlpatterns = patterns( '', url(r'^$', ListAccountView.as_view(), name='list'), url(r'^(?P<slug>\w+)/$', AccountDetailView.as_view(), name='view'), url(r'^(?P<slug>\w+)/edit/$', auth(UserProfileEditView.as_view()), name='edit'), )
from django.urls import path, include from accounts.models import Account from accounts.views import ( AccountViewSet, AccountDetailViewSet, AccountDetailView, AddressViewSet, AddressDetailViewSet, ) from rest_framework.urlpatterns import format_suffix_patterns """ url to access the accounts""" urlpatterns = [ # to add an account or get all accounts path("all/", AccountViewSet.as_view(), name="accounts"), # to get an account or update or delete one path("detail/<int:pk>/", AccountDetailViewSet.as_view(), name="account_detail"), # to get an detail list of an account like its address , cards etc path( "detail_list/<int:pk>/", AccountDetailView.as_view(), name="account_detail_list" ), # to get all the address or add an address path("address/all/", AddressViewSet.as_view(), name="address"), # to get , update , delete a specific address path("address/<int:pk>/", AddressDetailViewSet.as_view(), name="address_detail"), ]