def colloquial_date_filter(value, arg=None):
    """
    Formats a date using colloquial words when within last week. 

    value - date or datetime
    arg   - date format in python or django date format
    
    Formats a date using colloquial words when within last week. 
    Otherwise uses settings.DATE_FORMAT
    """
    if not value:
        return u''
    if arg is None:
        arg = settings.DATE_FORMAT
    return colloquial_date(value, arg)
Example #2
0
 def __unicode__(self):
     return colloquial_date(self.pub_date,
                            settings.DRESS_BLOG_DIARY_DATE_FORMAT)
Example #3
0
 def __unicode__(self):
     return colloquial_date(self.pub_date, 
                            settings.DRESS_BLOG_DIARY_DATE_FORMAT)
Example #4
0
 def __unicode__(self):
     return colloquial_date(self.pub_date, diary_date_format)