funkybob  committed 00f81ed

Tweaked the feed class
Added site to Post model
Named blog list URL pattern
Removed leftover import

  • Participants
  • Parent commits 0814adb
  • Branches default

Comments (0)

Files changed (4)

File gnocchi/blog/

 from django.contrib.syndication.views import Feed
+from django.core.urlresolvers import reverse
 from import Post
 from taggit.models import TaggedItem
 class LatestBlogFeed(Feed):
     '''Basic feed configuration
-    You need to derive your own class from this to set link, and you will
-    probably also want to change description and title.
+    You need to derive your own class from this to set description and title.
-    See
+    See
     description = 'Blog Posts'
     title = 'Blog'
+    def link(self):
+        return reverse('blog-list')
     def categories(self):
         return TaggedItem.tags_for(Post)

File gnocchi/blog/

     published = models.BooleanField(default=False)
+    site = models.ForeignKey('sites.Site', null=True, blank=True)
     allow_comments = models.BooleanField(default=True)
     tags = TaggableManager(blank=True)

File gnocchi/blog/

-    url(r'^$', PostList.as_view(),),
+    url(r'^$', PostList.as_view(), name='blog-list'),

File gnocchi/blog/

 from django.views.generic.dates import ArchiveIndexView, DateDetailView
 from django.http import HttpResponseRedirect
-from django.db.models import Q
 from import models, forms
 # This will roll for django-1.3
             return request.META['REMOTE_ADDR']
     def post(self, request, *args, **kwargs):
+        '''Lookie, Maw!  We use POST for what it was originally meant!'''
         self.object = post = self.get_object()
         form = forms.CommentForm(self._get_remote_ip(self.request), request.POST)
         if form.is_valid():