Beispiel #1
0
# -*-coding:utf-8-*-
from django.conf.urls import url
from apps.goods.views import IndexView, DetailView, ListView

app_name = 'apps.goods'
urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),  # 商品页作为首页
    url(r'^goods/(?P<goods_id>\d+)$', DetailView.as_view(),
        name='detail'),  # 详情页
    url(r'^list/(?P<type_id>\d+)/(?P<page>\d+)$',
        ListView.as_view(),
        name='list'),  # 列表页
]
Beispiel #2
0
from django.urls import path
from apps.goods.views import IndexView, DetailView, ListView

app_name = 'goods'

urlpatterns = [
    path('index', IndexView.as_view(), name='index'),
    path('goods/<goods_id>', DetailView.as_view(), name='detail'),
    # path('detail', DetailView.as_view(), name='detail'),
    # path('list', ListView.as_view(), name='list')
    path('list/<type_id>/<page>', ListView.as_view(), name='list')
]
Beispiel #3
0
from sys import path

from django.conf.urls import url

from apps.goods.views import IndexView, DetailView, ListView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'), # 首页
    url(r'^goods/(?P<goods_id>\d+)$', DetailView.as_view(), name='detail'),  # 详情页
    url(r'^list/(?P<type_id>\d+)/(?P<page>\d+)$', ListView.as_view(), name='list'),  # 列表页
]
Beispiel #4
0
from django.urls import path
from apps.goods.views import IndexView,ListView
from apps.goods.views import SKUSearchchView,DetailView,CategoryVisitCountView
urlpatterns = [
    path('index/',IndexView.as_view()),
    path('list/<category_id>/skus/',ListView.as_view()),
    path('search/',SKUSearchchView()),
    path('detail/<sku_id>/',DetailView.as_view()),
    path('detail/visit/<category_id>/',CategoryVisitCountView.as_view()),
]

Beispiel #5
0
# -*- coding:utf-8 -*-
from django.contrib import admin
from django.urls import path, include, re_path
from apps.goods import views
from apps.goods.views import IndexView, DetailView, ListView

app_name = 'goods'
urlpatterns = [
    path('index/', IndexView.as_view(), name='index'),  # 首页
    path('goods/<str:goods_id>', DetailView.as_view(), name='detail'),  # 详情页
    path('list/<int:type_id>/<int:page>', ListView.as_view(),
         name='list'),  # 列表页
]
Beispiel #6
0
from django.urls import path

from apps.goods import views
from apps.goods.views import IndexView, UploadView, DetailView, ListView

app_name = 'goods'

urlpatterns = [
	path('', IndexView.as_view(), name='index'),
	path('upload/', UploadView.as_view(), name='upload'),
	path('goods/<int:goods_id>', DetailView.as_view(), name='detail'),
	path('goods/list/<int:type_id>/<int:page>/', ListView.as_view(), name='list'),
]
Beispiel #7
0
from django.conf.urls import url
from apps.goods.views import IndexView

# 登录装饰器
from django.contrib.auth.decorators import login_required
from apps.goods.views import DetailView, ListView

# /index
urlpatterns = [
    # 跳转到首页显示
    url(r'^index$', IndexView.as_view(),name='index'),
    url(r'^goods/(?P<sku_id>\d+)$', DetailView.as_view(), name='detail'), # 详情页
    url(r'^list/(?P<type_id>\d+)/(?P<page>\d+)$', ListView.as_view(), name='list'), # 列表页

]