def get_archive_part_value(self, part):
        """Return archive part for today"""
        parts_dict = {'year': '%Y',
                      'month': self.month_format,
                      'week': self.week_format,
                      'day': '%d'}
        if self.today is None:
            today = timezone.now()
            if timezone.is_aware(today):
                today = timezone.localtime(today)
            self.today = today
        return self.today.strftime(parts_dict[part])
def get_archive_part_value ( self , part ) : parts_dict = { 'year' : '%Y' , 'month' : self . month_format , 'week' : self . week_format , 'day' : '%d' } if self . today is None : today = timezone . now ( ) if timezone . is_aware ( today ) : today = timezone . localtime ( today ) self . today = today return self . today . strftime ( parts_dict [ part ] )
Return archive part for today