Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.conf.urls import patterns, include, url
- from django.views.generic import ListView, DetailView
- from blogger.models import Post
- urlpatterns = patterns('blogger.views',
- url(r'^$', ListView.as_view(
- queryset=Post.objects.all().order_by('-created')[:3],
- template_name="blogger/blog.html")),
- url(r'^(?P<pk>\d+)$', DetailView.as_view(
- model = Post,
- template_name="blogger/post.html")),
- url(r'^archives/$', ListView.as_view(
- queryset=Post.objects.all().order_by('-created'),
- template_name="blogger/archives.html")),
- url(r'^tag/(?P<tag>\w+)$', 'tagpage'),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement