from django.conf.urls import url from blog.views import IndexView,ArticleView,AllView,SearchView,ColumnView,UserView,NewsView,TagView,CategoryView,AboutView from django.views.generic import TemplateView,DetailView from blog.models import News urlpatterns = [ url(r'^$',IndexView.as_view()), url(r'^article/(?P<slug>\w+).html$',ArticleView.as_view()), url(r'^all/$',AllView.as_view()), url(r'^search/$',SearchView.as_view()), url(r'^login/$',TemplateView.as_view(template_name="blog/login.html")), url(r'^register/$',TemplateView.as_view(template_name="blog/register.html")), url(r'^forgetpassword/$',TemplateView.as_view(template_name="blog/forgetpassword.html")), url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',TemplateView.as_view(template_name="blog/resetpassword.html")), url(r'^column/(?P<column>\w+)$',ColumnView.as_view()), url(r'^user/(?P<slug>\w+)$',UserView.as_view()), url(r'^news/$',NewsView.as_view()), url(r'^about/$',AboutView.as_view()), url(r'^news/(?P<pk>\w+)$',DetailView.as_view(model=News)), url(r'^tag/(?P<tag>\w+)/$',TagView.as_view()), url(r'^category/(?P<category>\w+)/$',CategoryView.as_view()), ]
from django.contrib import admin from django.urls import path from blog.views import TopView, WorkView, BlogView, WorkDetailView, BlogDetailView, AboutView, CategoryListView, CategoryDetailView urlpatterns = [ path('', TopView.as_view(), name='top'), path('bloglist/', BlogView.as_view(), name='bloglist'), path('worklist/', WorkView.as_view(), name='worklist'), path('work/<int:pk>/', WorkDetailView.as_view(), name='workdetail'), path('blog/<int:pk>/', BlogDetailView.as_view(), name='blogdetail'), path('about/', AboutView.as_view(), name='about'), path('categories/', CategoryListView.as_view(), name='categorylist'), path('category/<str:slug>/', CategoryDetailView.as_view(), name='categorydetail'), ]
AboutView, postListView, postDetailView, CreatePostView, PostUpdateView, PostDeleteView, DraftListView, comment_approve, comment_remove, post_publish, add_comment_to_post, ) urlpatterns = [ path("", postListView.as_view(), name="post_list"), path("about/$", AboutView.as_view(), name="about"), path("posts/<int:pk>/$", postDetailView.as_view(), name="post_detail"), path("posts/new/$", CreatePostView.as_view(), name="post_new"), path("posts/<int:pk>/update$", PostUpdateView.as_view(), name="post_edit"), path("posts/<int:pk>/delete$", PostDeleteView.as_view(), name="post_remove"), path("draft/$", DraftListView.as_view(), name="post_draft_list"), path( "posts/<int:pk>/comment/$", views.add_comment_to_post, name="add_comment_to_post", ), path("comment/<int:pk>/approve/$", views.comment_approve, name="comment_approve"),
from django.contrib import admin from blog.views import AboutView from django.contrib.auth import views as auth_views from django.urls import path, include, re_path from users import views as user_views from users.views import MyLoginView, DeleteAccount from django.conf import settings from django.conf.urls.static import static from TagPost.views import TagManager from Mailchimp.views import email_list_signup urlpatterns = [ path('admin/', admin.site.urls), path('register/', user_views.register, name='register'), path('profile/', user_views.profile, name='profile'), path('login/', MyLoginView.as_view(template_name='users/login.html', redirect_authenticated_user=True), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='users/logout.html'), name='logout'), path('deleteAccount/<int:pk>', DeleteAccount.as_view(), name='delete-account'), path('ckeditor', include('ckeditor_uploader.urls')), path('tags/',include('TagPost.urls')), path('search/', include('searchEngine.urls')), path('about/', AboutView.as_view(), name="blog-about"), path('subscribe/', email_list_signup, name="postMailChimp"), path('', include('blog.urls')), re_path('djga/', include('google_analytics.urls')) ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import url from blog.views import (AboutView, PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, DraftListView, add_comments_to_post, comment_approve, comment_remove, post_publish) urlpatterns = [ url(r'^$', PostListView.as_view(), name='post_list'), url(r'^about/$', AboutView.as_view(), name='about'), url(r'^post/(?P<pk>\d+)/$', PostDetailView.as_view(), name='post_detail'), url(r'^post/new/$', PostCreateView.as_view(), name='post_new'), url(r'^post/(?P<pk>\d+)/edit/$', PostUpdateView.as_view(), name='post_edit'), url(r'^post/(?P<pk>\d+)/delete/$', PostDeleteView.as_view(), name='post_remove'), url(r'^drafts/$', DraftListView.as_view(), name='post_draft_list'), url(r'^post/(?P<pk>\d+)/comment/$', add_comments_to_post, name='add_comment_to_post'), url(r'^comment/(?P<pk>\d+)/approve/$', comment_approve, name='comment_approve'), url(r'^comment/(?P<pk>\d+)/delete/$', comment_remove, name='comment_remove'), url(r'^post/(?P<pk>\d+)/publish/$', post_publish, name='post_publish'), ]
from django.conf.urls import patterns, url, include from django.contrib import admin from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from blog.views import ContactView, PortfolioView, AboutView, HomeView from django.views.generic import TemplateView admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^$', HomeView.as_view(), name='home'), url(r'^about/$', AboutView.as_view(), name='blogabout'), url(r'^portfolio/$', PortfolioView.as_view(), name='blogportfolio'), url(r'^contact/$', ContactView.as_view(), name='blogcontact'), url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^portfolio/baxter/$', TemplateView.as_view(template_name='baxter/index.html'), name='baxter'), url(r'^portfolio/open-mint/$', TemplateView.as_view(template_name='open_mint/index.html'), name='open-mint'), # url(r'^portfolio/entergame/$', direct_to_template, { # 'template': 'entergame/index.html'}, # name='entergame'), url(r'^portfolio/ecological/$', TemplateView.as_view(template_name='ecological/index.html'), name='ecological'), url(r'^portfolio/exterior/$', TemplateView.as_view(template_name='exterior/index.html'), name='exterior'), url(r'^exterior/about/$', TemplateView.as_view(template_name='exterior/about.html'), name='about'),
""" from django.conf.urls import url from django.contrib import admin import xadmin from django.views.static import serve from blog.views import IndexView, PostView, AboutView, ArchiveView, CategoryView, CategoryPostView from .settings import MEDIA_ROOT urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), url(r'^$', IndexView.as_view(), name="index"), # 文章详情页 url(r'^post/(?P<post_id>\d+)/$', PostView.as_view(), name="post"), # 关于作者 url(r'^about/$', AboutView.as_view(), name="about"), # 登陆 url(r'^login/$', AboutView.as_view(), name="login"), # 注册 url(r'^register/$', AboutView.as_view(), name="register"), # 归档 url(r'^archives/$', ArchiveView.as_view(), name="archives"), # 分类 url(r'^categories/$', CategoryView.as_view(), name="categories"), # url(r'^static/(?P<path>.*)$', serve, {"document_root":STATIC_ROOT}), # 同种分类文章 url(r'^category/(?P<category_id>\d+)/$', CategoryPostView.as_view(), name="category_post"),
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from blog.views import HomeView, AboutView admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'minasidor.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', HomeView.as_view(), name='home'), url(r'^about$', AboutView.as_view(), name="about"), url(r'^admin/', include(admin.site.urls)), url(r'^ckeditor/', include('ckeditor.urls')), url(r'^blog/', include('blog.urls')), ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin admin.autodiscover() urlpatterns = patterns( "", # Examples: # url(r'^$', 'personal.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r"^$", IndexView.as_view(), name="index"), url(r"^index.*$", IndexView.as_view(), name="index"), url(r"^about/", AboutView.as_view(), name="about"), url(r"^project/((?P<slug>[-\w]+))/(?P<id>\d+)/$", ProjectView.as_view(), name="project"), url(r"^projects/$", ProjectsView.as_view(), name="projects"), url(r"^article/(?P<id>\d+)/$", ArticleView.as_view(), name="article"), url(r"^article/(?P<slug>[-\w]+)/(?P<id>\d+)/$", ArticleView.as_view(), name="article"), url(r"^articles/$", ArticlesView.as_view(), name="articles"), url(r"^articles/(?P<slug>[-\w]+)/(?P<id>\d+)/$", ArticlesView.as_view(), name="articles"), url(r"^resources/$", ResourcesView.as_view(), name="resources"), url(r"^code_snippets/$", CodeSnippetsView.as_view(), name="code_snippets"), url(r"^publications/$", PublicationsView.as_view(), name="publications"), url(r"^admin/", include(admin.site.urls)), url(r"^grappelli/", include("grappelli.urls")), # grappelli URLS url(r"^media/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.MEDIA_ROOT}), # url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes': True}), ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns = [ re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^admin/', xadmin.site.urls, name='xadmin'), re_path(r'^category/(?P<category_id>\d+)/$', CategoryView.as_view(), name='category-list'), re_path(r'^tag/(?P<tag_id>\d+)/$', TagView.as_view(), name='tag-list'), re_path(r'^links/$', LinkListView.as_view(), name='links'), re_path(r'^post/(?P<post_id>\d+).html$', PostDetailView.as_view(), name='post-detail'), re_path(r'^search/$', SearchView.as_view(), name='search'), re_path(r'^author/(?P<author_id>\d+)/$', AuthorView.as_view(), name='author'), re_path(r'^comment/$', CommentView.as_view(), name='comment'), re_path(r'^category-autocomplete/$', CategoryAutocomplete.as_view(), name='category-autocomplete'), re_path(r'^tag-autocomplete/$', TagAutocomplete.as_view(), name='tag-autocomplete'), re_path(r'^ckeditor/', include('ckeditor_uploader.urls')), re_path(r'^api/', include(router.urls)), re_path(r'^api/docs/', include_docs_urls(title='typeidea apis')), path('sitemap.xml', cache_page(60 * 20, key_prefix='sitemap_cache_')(views.sitemap), {'sitemaps': {'posts': PostSitemap}}, name='django.contrib.sitemaps.views.sitemap'), path('rss/', LatestPostFeed(), name='rss'), # path('about/', category_list, name='about'), path('about/', AboutView.as_view()), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: import debug_toolbar urlpatterns = [ path('__debug__/', include(debug_toolbar.urls)), path('silk/', include('silk.urls', namespace='silk')) ] + urlpatterns
import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from blog.views import AboutView urlpatterns = patterns('', # Example: #(r'^storyboard/', include('storyboard.foo.urls')), (r'^$', 'home.views.index'), (r'^auth/', include('account.urls')), (r'^settings$', 'account.views.settings'), (r'^member/(\w+)', 'account.views.member'), (r'^settings/', include('account.urls')), #(r'^about$', 'home.views.about'), (r'^about$', AboutView.as_view()), #(r'^board/', include('board.urls')), (r'^r/', include('board.urls')), (r'^note/', include('note.urls')), (r'^blog/', include('blog.urls')), (r'^photo/', include('storage.urls')), (r'^todo/', include('todo.urls')), # (r'^message/', include('message.urls')), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: #(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), (r'^minisite/add/(\w+)', 'home.views.add_page'),
url(r'^article/(?P<slug>\w+).html$', ArticleView.as_view(), name='article-detail-view'), url(r'^all/$', AllView.as_view(), name='all-view'), url(r'^search/$', SearchView.as_view()), url(r'^login/$', TemplateView.as_view(template_name="blog/login.html"), name='login-view'), url(r'^register/$', TemplateView.as_view(template_name="blog/register.html"), name='register-view'), url(r'^forgetpassword/$', TemplateView.as_view(template_name="blog/forgetpassword.html"), name='forgetpassword-view'), url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', TemplateView.as_view(template_name="blog/resetpassword.html"), name='resetpassword-view'), url(r'^column/(?P<column>\w+)/$', ColumnView.as_view(), name='column-detail-view'), url(r'^user/(?P<slug>\w+)$', UserView.as_view(), name='user-view'), url(r'^news/$', NewsView.as_view(), name='news-view'), url(r'^news/(?P<pk>\w+)$', DetailView.as_view(model=News), name='news-detail-view'), url(r'^tag/(?P<tag>\w+)/$', TagView.as_view(), name='tag-detail-view'), url(r'^category/(?P<category>\w+)/$', CategoryView.as_view(), name='category-detail-view'), url(r'^about/$',AboutView.as_view(), name='about-detail-view'), url(r'^down/$',DownView.as_view(), name='down-detail-view'), ]
from django.conf.urls import url from blog.views import IndexView, BlogView, AboutView, ContactView, DetailView, ArchivesView, CategoryView, TagView urlpatterns = [ url(r'^$', IndexView.as_view(), name='首页'), url(r'^detail/(?P<pk>[0-9]+)/$', DetailView.as_view(), name='详情'), url(r'^archives/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$', ArchivesView.as_view(), name='归档'), url(r'^category/(?P<pk>[0-9]+)/$', CategoryView.as_view(), name='分类'), url(r'^tag/(?P<pk>[0-9]+)/$', TagView.as_view(), name='标签'), url(r'^blog$', BlogView.as_view(), name='博客'), url(r'^about$', AboutView.as_view(), name='关于'), url(r'^contact$', ContactView.as_view(), name='联系'), ]
from django.conf.urls import url from blog.views import ( AboutView, CreatePostView, DraftListView, PostDetailView, PostDeleteView, PostListView, PostUpdateView, ) urlpatterns = [ url(r"^$", PostListView.as_view(), name="post_list"), url(r"^about/$", AboutView.as_view(), name="about"), url(r"^post/(?P<pk>\d+)$", PostDetailView.as_view(), name="post_detail"), url(r"^post/new/$", CreatePostView.as_view(), name="post_new"), url(r"^post/(?P<pk>\d+)/edit/$", PostUpdateView.as_view(), name="post_edit"), url(r"^post/(?P<pk>\d+)/remove/$", PostDeleteView.as_view(), name="post_remove"), url(r"^drafts/$", DraftListView.as_view(), name="post_drafts_list"), ]
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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. Add an import: from blog import urls as blog_urls 2. 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.views.generic import TemplateView from django.conf import settings from blog.views import AboutView urlpatterns = [ url(r"^admin/", include(admin.site.urls)), url(r"^blog/", include("blog.urls")), url(r"^$", TemplateView.as_view(template_name="index.html"), name="home"), url(r"^about/", AboutView.as_view()), ]
from django.conf.urls import url from blog.views import IndexView, ArticleView, AboutView, AllView, DownView, SearchView, ColumnView, UserView, TagView, CategoryView from django.views.generic import TemplateView, DetailView urlpatterns = [ url(r'^$', IndexView.as_view()), url(r'^article/(?P<slug>\w+).html$', ArticleView.as_view()), url(r'^all/$', AllView.as_view()), url(r'^search/$', SearchView.as_view()), url(r'^login/$', TemplateView.as_view(template_name="blog/login.html")), url(r'^register/$', TemplateView.as_view(template_name="blog/register.html")), url(r'^forgetpassword/$', TemplateView.as_view(template_name="blog/forgetpassword.html")), url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', TemplateView.as_view(template_name="blog/resetpassword.html")), url(r'^column/(?P<column>\w+)$', ColumnView.as_view()), url(r'^user/(?P<slug>\w+)$', UserView.as_view()), url(r'^tag/(?P<tag>\w+)/$', TagView.as_view()), url(r'^category/(?P<category>\w+)/$', CategoryView.as_view()), url(r'^about/$', AboutView.as_view()), url(r'^down/$', DownView.as_view()), ]
from django.conf.urls.defaults import * import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from blog.views import AboutView urlpatterns = patterns('', # Example: #(r'^storyboard/', include('storyboard.foo.urls')), (r'^$', 'home.views.index'), (r'^auth/', include('account.urls')), (r'^settings$', 'account.views.settings'), (r'^member/(\w+)', 'account.views.member'), (r'^settings/', include('account.urls')), #(r'^about$', 'home.views.about'), (r'^about$', AboutView.as_view()), #(r'^board/', include('board.urls')), (r'^r/', include('board.urls')), (r'^note/', include('note.urls')), (r'^blog/', include('blog.urls')), (r'^photo/', include('storage.urls')), # (r'^message/', include('message.urls')), #(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: #(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), )