from django.conf.urls import url from apps.goods import views from apps.goods.views import IndexView, DetailView urlpatterns = [ url(r'^$', IndexView.as_view(), name='index'), # 首页 url(r'^index$', IndexView.as_view(), name='index'), # 首页 # url(r'^index.html$', IndexView.as_view(), name='index'), # 首页 url(r'^goods/(?P<goods_id>\d+)$', DetailView.as_view(), name='detail'), # 详情页 ]
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') ]
from django.urls import path, include, re_path from apps.goods.views import IndexView app_name = 'goods' urlpatterns = [ re_path(r'^$', IndexView.as_view(), name='index') #首页 ]
# -*-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'), # 列表页 ]
from django.conf.urls import url from apps.goods.views import IndexView urlpatterns = [url(r'^$', IndexView.as_view(), name='index')]
from apps.goods.views import IndexView, ArticleDetailsView from django.conf.urls import url urlpatterns = [ url(r'^detail/(?P<aricle_id>\d+)$', ArticleDetailsView.as_view(), name='detail'), url(r'^', IndexView.as_view(), name='index'), ]
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()), ]
from django.urls import path, re_path from apps.goods.views import IndexView, DetailView, ListView app_name = 'goods' urlpatterns = [ re_path(r'^index$', IndexView.as_view(), name='index'), # 首页 re_path(r'^goods/(?P<goods_id>\d+)$', DetailView.as_view(), name='detail'), # 详情页 re_path(r'^list/(?P<type_id>\d+)/(?P<page>\d+)$', ListView.as_view(), name='list') # 列表页 ]
from django.urls import path, re_path from apps.goods.views import IndexView, ListView, DetailView, static_index urlpatterns = [ path('', static_index, name='static_index'), # 网站首页 path('index', IndexView.as_view(), name='index'), # 登录用户访问网站首页 re_path(r'^list/(?P<type_id>\w*)/(?P<page>\d*)$', ListView.as_view(), name='list'), # 商品分类列表页 re_path(r'^detail/(?P<goods_id>\d*)$', DetailView.as_view(), name='detail'), # 商品详情页 ]
from django.urls import path from apps.goods.views import IndexView, DetailView, ListView urlpatterns = [ path('', IndexView.as_view(), name='index'), # 首页 path('index/', IndexView.as_view(), name='index'), # 首页 path('goods/<int:goods_id>', DetailView.as_view(), name='detail'), # 详情页 path('list/<int:type_id>/<int:page>', ListView.as_view(), name='list'), # 详情页 ]
from django.conf.urls import url from apps.goods.views import IndexView, DetailView, ListView urlpatterns = [ url("^index$", IndexView.as_view(), name='index'), url("^goods/(?P<goods_id>\d+)$", DetailView.as_view(), name='detail'), url("^list/(?P<type_id>\d+)/(?P<page>\d+)$", ListView.as_view(), name='list'), ]
from django.conf.urls import url from apps.goods import views from apps.goods.views import IndexView urlpatterns = [ # url(r'^$', views.index, name='index'), # 显示主页 url(r'^index/$', IndexView.as_view(), name='index'), # 显示主页 ]
from django.conf.urls import url from apps.goods.views import IndexView urlpatterns = [ url(r"^$", IndexView.as_view(), name='index'), # 商品首页 ]
from django.conf.urls import url from apps.goods.views import IndexView, DetailView, ListView from django.urls import path app_name = 'goods' urlpatterns = [ path(r'', IndexView.as_view(), name='index'), # 首页 # url(r'^index$', IndexView.as_view(), name='index'), # 首页 path(r'goods/<int:sku_id>', DetailView.as_view(), name='detail'), # 详情页 path(r'list/<int:type_id>/<int:page>', ListView.as_view(), name='list'), # 列表页 ]
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'), # 列表页 ]