from blog.views import ( IndexView, ArticleView, AllView, SearchView, ColumnView, UserView, NewsView, TagView, CategoryView, ) 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"^about/$", NewsView.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.conf.urls import url from blog.views import IndexView,ArticleView,AllView,SearchView,ColumnView,UserView,NewsView,TagView,CategoryView 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'^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.conf.urls import patterns, include, url from django.contrib import admin from blog.views import IndexView,CategoryView,TagsView,ShowPost from blog.feeds import LatestPostsFeed admin.autodiscover() urlpatterns = patterns('', url(r'^feed/latest/?(?P<count>[0-9]+)?/$',LatestPostsFeed(),name="feed"), url(r'^admin/', include(admin.site.urls)), url(r'^$',IndexView.as_view(), name='home'), url(r'^tag/(?P<tagslug>[-\w]+)/$',TagsView.as_view(),name='showtag'), url(r'^(?P<slug>[-\w]+)/$',CategoryView.as_view(),name='showcategory'), url(r'^(?P<catslug>[-\w]+)/(?P<postslug>[-\w]+)/$',ShowPost.as_view(),name='showpost'), url(r'^tinymce/', include('tinymce.urls')), )
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'^(?P<category>\w+)/$', CategoryView.as_view(), name='category-detail-view'), ] if settings.DEBUG: from django.conf.urls.static import static urlpatterns += static( settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout', kwargs={'next_page': '/'}), # Yandex access url(r'yandex_4176ffddb576e745.html$', 'webblog.views.yandex_access'), # robot.txt url(r'robots\.txt', 'webblog.views.robots'), url(r'^$', Home.as_view(), name='home'), url(r'^category/(?P<category>[_a-zA-Z0-9]+)/$', CategoryView.as_view(), name='category'), url(r'^tag/(?P<tag>[_a-zA-Z0-9]+)/$', TagView.as_view(), name='tag'), url(r'^post/(?P<post>[_a-zA-Z0-9/-]+)/$', PostView.as_view(), name='post'), # url(r'^webblog/', include('webblog.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), ) if settings.DEBUG: urlpatterns = patterns( '', url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
#coding=utf-8 from django.conf.urls import url from blog.views import IndexView,ArticleView,UserView,AllView,CategoryView,TagView,SearchView from django.views.generic import TemplateView,DetailView urlpatterns = [ url(r'^$',IndexView.as_view()), url(r'^article/(?P<pk>\d+).html$',ArticleView.as_view()), #url(r'^user/(?P<slug>\w+)$',UserView.as_view()), #url(r'^register/$',TemplateView.as_view(template_name="blog/register.html")), #url(r'^login/$',TemplateView.as_view(template_name="blog/login.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'^all/$',AllView.as_view()), url(r'^category/(?P<id>\d+)/$',CategoryView.as_view()), url(r'^tag/(?P<id>\d+)/$',TagView.as_view()), url(r'^search/$',SearchView.as_view()), ]
category_dict = { 'queryset':Category.objects.all(), } tags_dict = { 'queryset':Tags.objects.all(), } urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', HomeListView.as_view(),name="home-list"), url(r'^hakkimda/', AboutTemplateView.as_view(), name="about"), url(r'^iletisim/', ContactView.as_view(), name="about"), url(r'^blog/', BlogListView.as_view(), name="about"), url(r'^kategori/(?P<slug>[-\w]+)/', CategoryView.as_view(), name='list-detail'), url(r'^etiket/(?P<slug>[-\w]+)/$', TagsView.as_view(), name='tags'), url(r'^sitemap_post\.xml$', sitemap,{'sitemaps': {'blog': GenericSitemap(post_dict, priority=0.6)}}, name='django.contrib.sitemaps.views.sitemap'), url(r'^sitemap_category\.xml$', sitemap,{'sitemaps': {'blog': GenericSitemap(category_dict, priority=0.6)}}, name='django.contrib.sitemaps.views.sitemap'), url(r'^sitemap_tags\.xml$', sitemap, {'sitemaps': {'blog': GenericSitemap(tags_dict, priority=0.6)}}, name='django.contrib.sitemaps.views.sitemap'), url(r'^robots.txt/', RobotsView.as_view(), name="robots"), url(r'^ckeditor/', include('ckeditor_uploader.urls')), url(r'^feed/$', LatestEntriesFeed()),
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 django.urls import path, include, re_path from blog.views import post_list, PostDetailView, IndexView, CategoryView, TagView, SearchView, AuthorView from config.views import LinkListView from comment.views import CommentView from typeidea.custom_site import custom_site urlpatterns = [ re_path(r'^$', IndexView.as_view(), name='index'), 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'^post/(?P<pk>\d+)$', PostDetailView.as_view(), name='post-detail'), re_path(r'^links/$', LinkListView.as_view(), name='links'), re_path(r'^super_admin/', admin.site.urls, name='super-admin'), re_path(r'^admin/', custom_site.urls, name='admin'), re_path(r'^search/$', SearchView.as_view(), name='search'), re_path(r'^author/(?P<owner_id>\d+)/$', AuthorView.as_view(), name='author'), re_path(r'^comment/$', CommentView.as_view(), name='comment'), ]