"""my_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 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. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from article import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.home, name='home'), url(r'^(?P<id>\d+)/$', views.detail, name='detail'), url(r'^archives/$', views.archives, name = 'archives'), url(r'^aboutme/$', views.about_me, name = 'about_me'), url(r'^tag(?P<tag>\w+)/$', views.search_tag, name = 'search_tag'), url(r'^search/$', views.blog_search, name = 'search'), url(r'^feed/$', views.RSSFeed(), name = "RSS"), ]
"""my_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 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. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from article import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.home), url(r'^(?P<id>\d+)/$', views.detail, name='detail'), #username:root #password:rootroot url(r'^archives/$', views.archives, name='archives'), url(r'^tag(?P<tag>\w+)/$', views.search_tag, name='search_tag'), url(r'^search/$', views.blog_search, name='search'), url(r'^feed/$', views.RSSFeed(), name='RSS'), ]
"""my_newblog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/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.contrib import admin from django.urls import path, re_path from article import views urlpatterns = [ path('admin/', admin.site.urls), re_path(r'^$', views.home, name="home"), re_path(r'^(?P<id>\d+)/$', views.detail, name="detail"), re_path(r'^test/$', views.test, name="test"), re_path(r'^archives/$', views.archives, name="archives"), re_path(r'^aboutme/$', views.about_me, name="aboutme"), re_path(r'^tag(?P<tag>\w+)/$', views.search_tag, name="search_tag"), re_path(r'^search/$', views.blog_search, name="search"), re_path(r'^RSSFeed/$', views.RSSFeed(), name="RSS"), ]
# coding:utf-8 from django.urls import include, re_path # from django.contrib import admin from article import views urlpatterns = [ # url(r'^admin/', include(admin.site.urls)), re_path(r'^manager/', include("manager.urls")), re_path(r'^api/mysite/', include("api.urls")), re_path(r'^$', views.home, name="home"), # 主页 re_path(r'^about$', views.about, name="about"), # 关于我 re_path(r'^message$', views.message, name="message"), # 留言 re_path(r'^links$', views.links, name="links"), # 友情链接 re_path(r'^archive/$', views.archive, name="archive"), # 归档 re_path(r'^feed/$', views.RSSFeed(), name="RSS"), # rss订阅 re_path(r'^search/$', views.blog_search, name="search"), # 按文章标题搜索 re_path( r'^article/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<id>\d+)/$', views.detail, name="detail"), # 每篇文章 re_path(r'^article/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.archive_month, name="archive_month"), # 按月归档 re_path(r'^articleClassfi/(?P<classfi>\w+)/$', views.classfiDetail, name="classfiDetail"), # 每个分类页下面的文章 re_path(r'^articleTag/(?P<tag>\w+)/$', views.tagDetail, name="tagDetail"), # 每个标签页下面的文章 re_path(r'^love/?$', views.love), re_path(r'^my-resume/?$', views.my_resume, name='my_resume'), # 简历
https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 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. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from article import views from article.views import RSSFeed urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', views.home, name='home'), # url(r'^(?P<my_args>\d+)/$', views.detail), # url(r'^test/$', views.test), url(r'^(?P<id>\d+)/$', views.detail, name='detail'), url(r'^archives/$', views.archives, name='archives'), url(r'^aboutme/$', views.about_me, name='about_me'), url(r'^tag/(?P<tag>\w+)/$', views.search_tag, name='search_tag'), url(r'^search/$', views.blog_search, name='search'), url(r'^feed/$', views.RSSFeed(), name="RSS"), # 新添加的urlconf, 并将name设置为RSS, 方便在模板中使用url ]
# coding:utf-8 from django.conf.urls import include, url # from django.contrib import admin from article import views urlpatterns = [ # url(r'^manager/', include(admin.site.urls)), url(r'^manager/', include("manager.urls")), url(r'^api/mysite/', include("api.urls")), url(r'^$', views.home, name="home"), # 主页 url(r'^about$', views.about, name="about"), # 关于我 url(r'^message$', views.message, name="message"), # 留言 url(r'^links$', views.links, name="links"), # 友情链接 url(r'^archive/$', views.archive, name="archive"), # 归档 url(r'^feed/$', views.RSSFeed(), name="RSS"), # 新添加的urlconf, 并将name设置为RSS, 方便在模板中使用 url(r'^search/$', views.blog_search, name="search"), # 按文章标题搜索 url(r'^article/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<id>\d+)/$', views.detail, name="detail"), # 每篇文章 url(r'^article/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.archive_month, name="archive_month"), # 按月归档 url(r'^articleClassfi/(?P<classfi>\w+)/$', views.classfiDetail, name="classfiDetail"), # 每个分类页下面的文章 url(r'^articleTag/(?P<tag>\w+)/$', views.tagDetail, name="tagDetail"), # 每个标签页下面的文章 url(r'^love/?$', views.love), url(r'^my-resume/?$', views.my_resume, name='my_resume'), # 简历 url(r'^upload/$', views.upload_file, name='upload_file'), url(r'^upload-rich/$', views.upload_rich_file, name='upload_rich_file'), ]
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 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. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from article import views as article_views # from article.urls import router as blog_router urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', article_views.home), url(r'^(?P<id>\d+)/$', article_views.detail, name='detail'), url(r'^test/$', article_views.test), url(r'^archives/$', article_views.archives, name='archives'), url(r'^aboutme/$', article_views.about_me, name='about_me'), url(r'^tag(?P<tag>\w+)/$', article_views.search_tag, name='search_tag'), url(r'^search/$', article_views.blog_search, name='search'), url(r'^feed/$', article_views.RSSFeed(), name="RSS"), ]