Beispiel #1
0
from django.conf.urls import url
from home.views import IndexView, DetailView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^detail/', DetailView.as_view(), name='detail'),
]
Beispiel #2
0
from django.urls import path
from home.views import IndexView, DetailView
urlpatterns = [
    # 首页的路由
    path('', IndexView.as_view(), name='index'),
    #详情视图的路由
    path('detail/', DetailView.as_view(), name='detail'),
]
Beispiel #3
0
Datei: urls.py Projekt: JQ-1/blog
from django.urls import path
from home.views import IndexView, DetailView

urlpatterns = [
    path("", IndexView.as_view(), name="index"),
    path("detail/", DetailView.as_view(), name='detail')
]
Beispiel #4
0
#coding = utf-8
'''
    标题
    @name:
    @function:
    @author: Mr.Fan
    @date:2020--  
'''
from django.urls import path
from home.views import IndexView,ListView,PublishView,DetailView,ReplyView,QuoteView

urlpatterns = [
    #参数1:路由
    #参数2:视图函数名
    # path('hello/',HelloView.as_view()),
    #首页
    path('',IndexView.as_view(),name = 'index'),
    #列表页面
    path('list/',ListView.as_view(),name = 'list'),
    #发帖页面
    path('publish/',PublishView.as_view(),name = 'publish'),
    # 详情页面
    path('detail/<int:id>/',DetailView.as_view(),name = 'detail'),
    #评论页面
    path('reply/',ReplyView.as_view(),name = 'reply'),
    #回复功能
    path('quote/',QuoteView.as_view(),name = 'quote'),
]
Beispiel #5
0
#-*- codeing = utf-8 -*-
from django.urls import path
from home.views import IndexView, WriteBlogView, DetailView

app_name = 'home'
urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('write/', WriteBlogView.as_view(), name='write'),
    path('index/', DetailView.as_view(), name='detail'),
]
Beispiel #6
0
from django.urls import path
from home.views import IndexView, DetailView
urlpatterns = [
    # 首页路由
    path('', IndexView.as_view(), name='index'),
    # 博客详情路由
    path('detail/', DetailView.as_view(), name='detail'),
]
Beispiel #7
0
from django.urls import path
from home.views import HomeTemplateView, DetailView, ListTemplateView, Obrigado

app_name = 'home'

urlpatterns = [
  path('', HomeTemplateView.as_view()),
  path('detalhes/', DetailView.as_view(), name="detalhe"),
  path('lista/', ListTemplateView.as_view(), name="list"),
  path('obrigado/', Obrigado.as_view(), name="home")
]