Site Sections: Satchmo Main | Wiki | Demo Store |

Changeset 842

Show
Ignore:
Timestamp:
10/24/07 21:48:01 (1 year ago)
Author:
jshaffer
Message:

blog: Clean up whitespace and set svn:eol-style.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • satchmoproject.com/satchmo_website/apps/blog/feeds.py

    • Property svn:eol-style set to native
    r841 r842  
    1212    def items(self): 
    1313        return Entry.objects.published().order_by('-pub_date')[:5] 
    14              
     14 
    1515 
    1616class LatestEntriesByTag(Feed): 
    17      
     17 
    1818    def get_object(self, bits): 
    1919        # In case of "/rss/beats/0613/foo/bar/baz/", or other such clutter, 
     
    2323        entry_tag = Tag.objects.get(name=bits[0]) 
    2424        return TaggedItem.objects.get_by_model(Entry, entry_tag), bits[0] 
    25      
     25 
    2626    def title(self, obj): 
    2727        return "Latest satchmo project news by tag" 
     
    3232        except TypeError: 
    3333            return "http://www.satchmoproject.com/blog/tag/" 
    34          
     34 
    3535    def description(self, obj): 
    3636        try: 
     
    3838        except TypeError: 
    3939            return "Unknown tag" 
    40          
     40 
    4141    def items(self, obj): 
    4242        if obj: 
  • satchmoproject.com/satchmo_website/apps/blog/models.py

    • Property svn:eol-style set to native
    r841 r842  
    88    def published(self): 
    99        return self.filter(is_published=True) 
    10          
     10 
    1111    def not_published(self): 
    1212        return self.filter(is_published=False) 
    13      
     13 
    1414class Entry(models.Model): 
    1515    pub_date = models.DateTimeField() 
     
    4040        else: 
    4141            return u"/blog/preview/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) 
    42          
     42 
    4343    def save(self): 
    4444        # Add the currently logged in user as the author 
     
    5353    view_entry.allow_tags = True 
    5454 
    55  
    5655class EntryModerator(CommentModerator): 
    5756        akismet = True 
     
    6059moderator.register(Entry, EntryModerator) 
    6160 
    62      
  • satchmoproject.com/satchmo_website/apps/blog/readme.txt

    r717 r842  
    55This application is the blog used on the Satchmo site.  It would not have 
    66been possible without a lot of help from folks on the web.  I have attempted 
    7 to make sure I credited everyone but if for some reason, I haven't  
     7to make sure I credited everyone but if for some reason, I haven't 
    88recognized your contribution, please let me know. 
    99 
  • satchmoproject.com/satchmo_website/apps/blog/urls.py

    • Property svn:eol-style set to native
    r841 r842  
    88        'date_field' : 'pub_date', 
    99} 
    10  
    1110 
    1211preview_dict = { 
     
    2019   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$','archive_month', dict(published_dict, allow_empty=True)), 
    2120   (r'^(?P<year>\d{4})/$','archive_year',  dict(published_dict, allow_empty=True)), 
    22    (r'^tag/(?P<tag>[^/]+(?u))/$', tagged_object_list,  
     21   (r'^tag/(?P<tag>[^/]+(?u))/$', tagged_object_list, 
    2322                dict(model=Entry, paginate_by=10, allow_empty=True, 
    2423                template_object_name="entry", template_name="blog/tag_list.html")), 
     
    2726 
    2827urlpatterns += patterns('blog.views', 
    29     (r'^preview/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[0-9A-Za-z-]+)/$',  
     28    (r'^preview/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[0-9A-Za-z-]+)/$', 
    3029    'preview_entry', dict(preview_dict, slug_field='slug')), 
    3130    (r'^preview/?$','preview_all', dict(preview_dict, allow_empty=True)), 
    3231    ) 
    33      
     32 
    3433feeds = { 
    3534    'latest': LatestEntries,