from django.contrib.staticfiles.urls import staticfiles_urlpatterns from entry.views import PostListView, PostDetailView, PostListByCategoryView, CategoryListView from entry.feeds import LatestPostsFeed # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Examples: url(r'^$', PostListView.as_view(), name='home'), url(r'^post/(?P<slug>[-\w]+)/$', PostDetailView.as_view(), name='post'), # url(r'^nyarlathotep/', include('nyarlathotep.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), url(r'^feed/', LatestPostsFeed(), name='feeds'), url(r'^comments/', include('django.contrib.comments.urls')), url(r'^category/$', CategoryListView.as_view(), name="category_list"), url(r'^category/(?P<slug>[-\w]+)/$', PostListByCategoryView.as_view(), name="category"), url(r'^accounts/', include('registration.backends.default.urls')), ) urlpatterns += staticfiles_urlpatterns()
from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from entry.views import PostListView, PostDetailView, PostListByCategoryView, CategoryListView from entry.feeds import LatestPostsFeed # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', PostListView.as_view(), name='home'), url(r'^post/(?P<slug>[-\w]+)/$', PostDetailView.as_view(), name='post'), # url(r'^nyarlathotep/', include('nyarlathotep.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), url(r'^feed/', LatestPostsFeed(), name='feeds'), url(r'^comments/', include('django.contrib.comments.urls')), url(r'^category/$', CategoryListView.as_view(), name="category_list"), url(r'^category/(?P<slug>[-\w]+)/$', PostListByCategoryView.as_view(), name="category"), url(r'^accounts/', include('registration.backends.default.urls')), ) urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.defaults import * from entry.views import EntryListView, EntryDetailView from entry.views import CategoryListView, CategoryDetailView from entry.views import EntryTagListView, EntryTagDetailView from django.views.generic import TemplateView urlpatterns = patterns('', url(r'tags/$', EntryTagListView.as_view(), name='entry_tag_list'), url(r'tags/(?P<pk>[-\d]+)/$', EntryTagDetailView.as_view(), name='entry_tag_detail'), url(r'category/$', CategoryListView.as_view(), name='entry_category_list'), url(r'category/(?P<slug>[-\w]+)/$', CategoryDetailView.as_view(), name='entry_category_detail'), url(r'(?P<slug>[-\w]+)/$', EntryDetailView.as_view(), name='entry_detail'), url(r'^$', EntryListView.as_view(), name='entry_list'), )