コード例 #1
0
ファイル: urls.py プロジェクト: rustanacexd/ecommerce2
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from carts.views import CartView

urlpatterns = [
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/$', 'newsletter.views.contact', name='contact'),
    url(r'^about/$', 'ecommerce2.views.about', name='about'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^categories/', include('products.url_categories')),
    url(r'^cart/$', CartView.as_view(), name='cart'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
コード例 #2
0
         name='staff-order-update'),
 re_path(r'^orders/staff/customer/(?P<pk>\d+)/$',
         StaffCustomerDetailView.as_view(),
         name='staff-customer-detail'),
 re_path(r'^orders/(?P<pk>\d+)/$',
         OrderDetail.as_view(),
         name='order_detail'),
 re_path(r'^orders/(?P<pk>\d+)/generate-invoice/$',
         GeneratePDF.as_view(),
         name='order-generate-invoice'),
 re_path(r'^orders/(?P<pk>\d+)/check-in/$',
         OrderCheckinUpdateView.as_view(),
         name='order-generate-check-in'),
 re_path(r'^stripe-orders/',
         include("orders.urls", namespace='stripe-orders')),
 re_path(r'^cart/$', CartView.as_view(), name='cart'),
 re_path(r'^cart/pickup/$', CartPickupView.as_view(), name='cart-pickup'),
 re_path(r'^cart/pickup-time/create/$',
         pickuptime_create,
         name='cart-pickup-create'),
 re_path(r'^cart/time/$', CartTimeDisplayView.as_view(), name='cart_time'),
 re_path(r'^cart/count/$', ItemCountView.as_view(), name='item_count'),
 re_path(r'^cart/pickup-time/$',
         PickupTimeListView.as_view(),
         name='pickup_time_select'),
 re_path(r'^checkout/$', CheckoutView.as_view(), name='checkout'),
 re_path(r'^checkout/address/$',
         AddressSelectFormView.as_view(),
         name='order_address'),
 re_path(r'^checkout/address/add/$',
         UserAddressCreateView.as_view(),
コード例 #3
0
from orders.views import(
    AddressSelectFormView,
    UserAdressCreateView,
    OrderList,
    OrderDetail
)
from products import views

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'teams.views.home', name='home'),
    url(r'^form/','teams.views.form',name='form'),
    url(r'^accounts/', include('registration.urls')),
    url(r'^pro/', include('products.urls')),
    url(r'^categories/', include('products.urls_categories')),
    url(r'^cart/$',CartView.as_view(),name='cartt'),
    url(r'^cart/count/$',ItemCountView.as_view(),name='item_count'),
    url(r'^checkout/$',CheckoutView.as_view(),name='checkout'),
    url(r'^checkout/address/$', AddressSelectFormView.as_view(), name='order_address'),
    url(r'^checkout/address/add/$', UserAdressCreateView.as_view(), name='user_address_create'),
    url(r'^checkout/final/$', CheckoutFinalView.as_view(), name='checkout_final'),
    url(r'^orders/$', OrderList.as_view(), name='orders'),
    url(r'^orders/(?P<pk>\d+)/$', OrderDetail.as_view(), name='order_detail'),
    url(r'^change-language/$',views.change_language,name='change-language'),

]
if settings.DEBUG :
    urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
    urlpatterns += staticfiles_urlpatterns()
コード例 #4
0
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/', 'newsletter.views.contact', name='contact'),
    url(r'^message_submitted/',
        'newsletter.views.message_submitted',
        name='contact_us_submitted'),
    url(r'^sign-up-successful/',
        'newsletter.views.sign_up_successful',
        name='sign_up_successful'),
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^categories/', include('products.urls_categories')),
    url(r'^orders/$', OrderList.as_view(), name="orders"),
    url(r'^cart/$', CartView.as_view(), name="cart"),
    url(r'^cart/count/$', ItemCountView.as_view(), name="item_count"),
    url(r'^checkout/$', CheckoutView.as_view(), name="checkout"),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(),
        name="order_address"),
    url(r'^checkout/address/add/$',
        UserAddressCreateView.as_view(),
        name="user_address_create"),
    url(r'^checkout/final/$',
        CheckoutFinalView.as_view(),
        name="checkout_final"),

    # API URLS
    url(r'^api/auth/token/$', 'rest_framework_jwt.views.obtain_jwt_token'),
    url(r'^api/$', APIHomeView.as_view(), name="home_api"),
コード例 #5
0
"""discovery 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 carts.views import CartView, Ordered, OrderView

urlpatterns = [
    path('products', include('products.urls')),
    path('order', OrderView.as_view()),
    path('cart', CartView.as_view()),
    path('ordered', Ordered.as_view()),
    path('users', include('users.urls'))
]
コード例 #6
0
ファイル: urls.py プロジェクト: vpolyakov/stepbox
from django.urls import path, include
from rest_framework.routers import DefaultRouter

from carts.views import CartView, CartItemViewSet

cart_item_router = DefaultRouter()
cart_item_router.register('', CartItemViewSet, basename='cart_item')
item_patterns = cart_item_router.urls

urlpatterns = [
    path('', CartView.as_view()),
    path('items/', include(item_patterns)),
]
コード例 #7
0
ファイル: urls.py プロジェクト: Abdulrahman-ahmed25/ecommerce
from django.conf.urls.static import static
from home.views import home_view
from signup.views import signup_view
from products.views import ProductListView
from carts.views import CartView
from django.contrib.auth import views as auth_view
urlpatterns = [
    path('admin/', admin.site.urls),
    # product
    path('products/', include('products.urls')),
    path('', home_view, name='home_view'),

    # category
    path('categories/', include('products.urls_categories')),
    # Cart
    path('cart/', CartView.as_view(), name='cart'),
    # authentications
    path('signup/', signup_view, name='signup'),
    path('accounts/', include("django.contrib.auth.urls")),
    path('change_password',
         auth_view.PasswordChangeView.as_view(
             template_name='registration/password_change.html',
             success_url='/'),
         name='change_password'),
    path('reset_password',
         auth_view.PasswordResetView.as_view(
             template_name='registration/password_reset.html',
             success_url='accounts/login'),
         name='reset_password'),
]
# media_url and static_url
コード例 #8
0
ファイル: urls.py プロジェクト: square84/ecommerce
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin

from carts.views import CartView,ItemCountView,CheckoutView,CheckoutFinalView
from orders.views import AddressSelectFormView,UserAddressCreateView,OrderList,OrderDetail

urlpatterns = [
    url(r'^$','newsletter.views.home',name='home'),
    url(r'^contact/$','newsletter.views.contact',name='contact'),
    url(r'^about/$','ecommerce2.views.about',name='about'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^categories/', include('products.urls_categories')),
    url(r'^orders/$',OrderList.as_view(), name="orders"),
    url(r'^orders/(?P<pk>\d+)$',OrderDetail.as_view(), name="order_detail"),
    url(r'^cart/$',CartView.as_view(), name="cart"),
    url(r'^cart/count/$',ItemCountView.as_view(), name="item_count"),
    url(r'^checkout/$',CheckoutView.as_view(), name="checkout"),
    url(r'^checkout/address/$', AddressSelectFormView.as_view(), name="order_address"),
    url(r'^checkout/address/add/$', UserAddressCreateView.as_view(), name="user_address_create"),
    url(r'^checkout/final/$', CheckoutFinalView.as_view(), name="checkout_final"),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
コード例 #9
0
urlpatterns = [
    url(r'^signup$', views.user_signup, name='user_signup'),
    url(r'^login$', views.user_signin, name='user_signin'),
    url(r'^logout$',
        logout, {
            'template_name': 'users/signin.html',
            'next_page': '/'
        },
        name='signout'),
    url(r'^forgot-password$', views.forgot_password, name='forgot_password'),
    url(r'^reset-password$', views.reset_password, name='rest_password'),
    url(r'^', include('products.urls')),
    url(r'^account/', include('users.urls')),
    url(r'^staff/', include('djecommerce.staffurls')),
    url(r'^admin/', include('djecommerce.adminurls')),
    url(r'^cart$', CartView.as_view(), name='add-to-cart'),
    url(r'^cart/count$', CartCountView.as_view(), name='cart_count'),
    url(r'^checkout/shipping-address$',
        ShippingAddressSelectView.as_view(),
        name='shipping-order-address'),
    url(r'^checkout/billing-address$',
        BillingAddressSelectView.as_view(),
        name='billing-order-address'),
    url(r'^checkout/address/add$',
        OrderAddressCreateView.as_view(),
        name='order-address-add'),
    url(r'^checkout/address/edit/(?P<pk>\d+)$',
        OrderAddressUpdateView.as_view(),
        name='order-address-update'),
    url(r'^checkout$', CheckoutView.as_view(), name='checkout'),
    url(r'^checkout/final/$',
コード例 #10
0
from carts.views import CartView, ItemCountView, CheckOutView, CheckoutFinalView
from orders.views import AddressSelectFormView, UserAddressCreateView, OrderList, OrderDetail

urlpatterns = [
    # Examples:
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/$', 'newsletter.views.contact', name='contact'),
    url(r'^about/$', 'ec2.views.about', name='about'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^category/', include('products.urls_category')),
    url(r'^orders/$', OrderList.as_view(), name='orders'),
    url(r'^orders/(?P<pk>\d+)/$', OrderDetail.as_view(), name='order_detail'),
    url(r'^carts/$', CartView.as_view(), name='carts'),
    url(r'^carts/count/$', ItemCountView.as_view(), name='item_count'),
    url(r'^checkout/$', CheckOutView.as_view(), name='checkout'),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(),
        name='order_address'),
    url(r'^checkout/address/create/$',
        UserAddressCreateView.as_view(),
        name='user_create_address'),
    url(r'^checkout/final/$',
        CheckoutFinalView.as_view(),
        name='checkout_final'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
コード例 #11
0
from django.conf.urls import url
from carts.views import CartView, ItemCountView, CheckoutView

urlpatterns = [
    url(r'^$', CartView.as_view(), name='cart'),
    url(r'^count/', ItemCountView.as_view(), name='cart_count'),
    url(r'^checkout/', CheckoutView.as_view(), name='checkout'),
]

コード例 #12
0
ファイル: urls.py プロジェクト: springkjw/socialup
 url(r'^dashboard/points/checkout/$',
     PointCheckoutAjaxView.as_view(),
     name='point_checkout'),
 url(r'^dashboard/points/validation/$',
     PointImpAjaxView.as_view(),
     name='point_validation'),
 url(r'^dashboard/point/charge/success$',
     charge_success,
     name='point_success'),
 url(r'^dashboard/point/charge/fail', charge_fail, name='point_fail'),
 url(r'^dashboard/points/history$', history_point, name='point_history'),
 url(r'^dashboard/purchase/(?P<cart_id>\d+)/$', purchase, name='purchase'),
 url(r'^dashboard/purchase/wishlist/$',
     WishListView.as_view(),
     name='wish_list'),
 url(r'^dashboard/purchase/cart/$', CartView.as_view(), name='cart'),
 url(r'^dashboard/purchase/checkout/$',
     CheckoutAjaxView.as_view(),
     name='checkout'),
 url(r'^dashboard/purchase/validation/$',
     ImpAjaxView.as_view(),
     name='validation'),
 url(r'^dashboard/purchase/list/$', purchase_list, name='purchase_list'),
 url(r'^dashboard/purchase/success/$', pay_success, name='pay_success'),
 url(r'^dashboard/purchase/fail/$', pay_fail, name='pay_fail'),
 url(r'^dashboard/seller/manage/$', product_manage, name='product_manage'),
 url(r'^dashboard/guide/$',
     TemplateView.as_view(template_name='account/dashboard_guide.html'),
     name='dashboard_guide'),
 url(r'^dashboard/question/$',
     TemplateView.as_view(template_name='account/dashboard_question.html'),