コード例 #1
0
from django.conf.urls import url

from orders.views import OrdersList, OrdersDetails, OrderUpload, OrderLabel

urlpatterns = [
    url(r"^$", OrdersList.as_view(), name="list"),
    url(r"^(?P<pk>[\d]+)/$", OrdersDetails.as_view(), name="details"),
    url(r"^new/$", OrderUpload.as_view(), name="new"),
    url(r"^label/$", OrderLabel.as_view(), name="label")
]
コード例 #2
0
ファイル: urls.py プロジェクト: naamara/Web-store
from django.conf.urls import url, include

from . import views
from orders.views import AddressFormView, UserAddressCreateView, ConfirmOrderView, OrdersList

urlpatterns = [
    url(r'^$', views.CartCreateView.as_view(), name='create_cart'),
    url(r'^view/$', views.CartDetailView.as_view(), name='cart_detail'),
    url(r'^deco_detail/$',
        views.HomeDecoDetailView.as_view(),
        name='deco_detail'),
    url(r'^const_detail/$', views.const_detail, name='const_detail'),
    url(r'^elect_detail/$', views.elect_detail, name='elect_detail'),
    url(r'^art_detail/$', views.art_detail, name='art_detail'),
    url(r'^viewpay/$',
        views.CartDetailPayView.as_view(),
        name='cart_detail_pay'),
    url(r'^charge/$', views.charge, name='charge'),
    url(r'^address/$', AddressFormView.as_view(), name='address'),
    url(r'^address/add/$', UserAddressCreateView.as_view(),
        name='add_address'),
    url(r'^address/confirm/$',
        ConfirmOrderView.as_view(),
        name='confirm_order'),
    url(r'^orders/$', OrdersList.as_view(), name='order_list'),
    #url(r'^accounts/', include('registration.backends.default.urls')),
]
コード例 #3
0
from django.urls import path, re_path, include
from django.views.generic import TemplateView
from django.contrib.auth import views as auth_views

from . import views
from orders.views import OrdersList, OrderDetail

urlpatterns = [
    path("", views.index, name="index"),
    path('register/', views.register_view, name='register'),
    path('login/', views.login_view, name='login'),
    path('logout/', views.logout_view, name='logout'),
    path('profile/',
         TemplateView.as_view(template_name="orders/profile.html"),
         name='profile'),
    path('collect_pizza/', views.collect_pizza, name="collect_pizza"),
    path('collect_sub/', views.collect_sub, name="collect_sub"),
    path('collect_pasta/', views.collect_pasta, name="collect_pasta"),
    path('collect_salad/', views.collect_salad, name="collect_salad"),
    path('collect_dinner_platter/',
         views.collect_dinner_platter,
         name="collect_dinner_platter"),
    path('remove_from_card/', views.remove_from_card, name="remove_from_card"),
    path('submit_order/', views.submit_order, name="submit_order"),
    path('orders/', OrdersList.as_view(), name="orders"),
    path('order/<int:pk>/', OrderDetail.as_view(), name="order-detail"),
    path('order-done/', views.order_done, name="order-done"),
    # path('change-password/', auth_views.PasswordChangeView.as_view(template_name='orders/change-password.html')),
    # path('accounts/', include('django.contrib.auth.urls')),
]