from django.conf.urls import url from orders.views import CheckoutView, ConfirmationView, CartView from . import views # Create your views here. urlpatterns = [ url(r'^checkout/', CheckoutView.as_view(), name='Checkout Page'), url(r'^confirmation/', ConfirmationView.as_view(), name='Order Confirmation Page'), url(r'^cart/', CartView.as_view(), name='Shopping Cart Page') ]
""" from django.contrib import admin from django.contrib.auth.views import LoginView, LogoutView from django.urls import path, re_path from orders.views import CartView, SubOrderView, PizzaOrderView, PastaOrderView, SaladOrderView, DinnerOrderView, \ ProductDeleteView, ProductUpdateView, ConfirmationView, OrderView from orders import views as order_views from accounts.views import RegistrationView from pizza.views import IndexView urlpatterns = [ path('admin/', admin.site.urls), path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('register/', RegistrationView.as_view(), name='registration'), path('order/pizza', PizzaOrderView.as_view(), name='pizza_order'), path('order/sub', SubOrderView.as_view(), name='sub_order'), path('order/pasta', PastaOrderView.as_view(), name='pasta_order'), path('order/salad', SaladOrderView.as_view(), name='salad_order'), path('order/dinner', DinnerOrderView.as_view(), name='dinner_order'), path('check/price', order_views.check_price, name='check_price'), path('cart', CartView.as_view(), name='cart'), path('confirmation', ConfirmationView.as_view(), name='confirmation'), path('orders', OrderView.as_view(), name='order_list'), path('delete/<int:pk>', ProductDeleteView.as_view(), name='delete_product'), path('update/<int:pk>', ProductUpdateView.as_view(), name='update_product'), re_path('^$', IndexView.as_view(), name='index'), ]
"""project_health_vitamin_backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.urls import path,include from orders.views import CartView urlpatterns = [ path('products',include('products.urls')), path('carts', CartView.as_view()), path('users',include('users.urls')), path('orders', include('orders.urls')) ]
from django.conf.urls import url from orders.views import ( CartView, CheckoutView, OrderDetail, OrderInvoiceDetail, OrderAddressView, OrderTimeView, PaymentMethodView, PayUzcard, ) urlpatterns = [ url(r'^cart/$', CartView.as_view(), name='cart', ), url(r'^delivery-address/$', OrderAddressView.as_view(), name='address', ), url(r'^delivery-time/$', OrderTimeView.as_view(), name='time', ), url(r'^payment-method/$', PaymentMethodView.as_view(), name='payment_method', ), url(r'^checkout/$', CheckoutView.as_view(), name='checkout', ), url(r'^(?P<phone>[\w]+)/(?P<order_unique_id>[-\w]+)/$', OrderDetail.as_view(), name='order_detail', ), url(r'^(?P<phone>[\w]+)/(?P<order_unique_id>[-\w]+)/invoice/$',OrderInvoiceDetail.as_view(), name='order_invoice_detail', ), url(r'^(?P<phone>[\w]+)/(?P<order_unique_id>[-\w]+)/pay/$', PayUzcard.as_view(), name='payment_uzcard', ), ]
from django.urls import path from orders.views import CreateOrderView, OrdersDetailsView, ShippingAdressView, CartView urlpatterns = [ path('create_order', CreateOrderView.as_view(), name="create_order"), path('order_details/<int:pk>/', OrdersDetailsView.as_view(), name="order_details"), path('shipping_address', ShippingAdressView.as_view(), name="shipping_address"), path('cart', CartView.as_view(), name="cart"), ]
from django.conf.urls import url from orders.views import OrderView, CartView, CartCheckoutView urlpatterns = [ url(r'^orders/', OrderView.as_view()), url(r'^cart/', CartView.as_view()), url(r'^cart/addproduct/', CartView.as_view()), url(r'^cart/removeproduct/', CartView.as_view()), url(r'^order-checkout/', CartCheckoutView.as_view()), ]
from django.conf.urls import url from orders.views import (CartView, CheckoutView, OrderDetailView, ThankYouView) urlpatterns = [ url( r'^cart/$', CartView.as_view(), name='cart', ), url( r'^checkout/$', CheckoutView.as_view(), name='checkout', ), url( r'^thank-you/$', ThankYouView.as_view(), name='thank_you', ), url( r'^(?P<order_unique_id>[-\w]+)/$', OrderDetailView.as_view(), name='order_detail', ), ]