Django

Code

Changeset 17

Show
Ignore:
Timestamp:
07/14/05 11:11:15 (3 years ago)
Author:
adrian
Message:

Changed django_website blog.Entry.get_absolute_url to ensure lowercase

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • djangoproject.com/django_website/apps/blog/models/blog.py

    r14 r17  
    2222 
    2323    def get_absolute_url(self): 
    24         return "/weblog/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d"), self.slug) 
     24        return "/weblog/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) 
  • djangoproject.com/django_website/apps/blog/urls/blog.py

    r16 r17  
    88 
    99urlpatterns = patterns('django.views.generic.date_based', 
    10    (r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\w{2})/(?P<slug>\w+)/$', 'object_detail', dict(info_dict, slug_field='slug')), 
    11    (r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\w{2})/$', 'archive_day', info_dict), 
    12    (r'^(?P<year>\d{4})/(?P<month>\w{3})/$', 'archive_month', info_dict), 
     10   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{2})/(?P<slug>\w+)/$', 'object_detail', dict(info_dict, slug_field='slug')), 
     11   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{2})/$', 'archive_day', info_dict), 
     12   (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict), 
    1313   (r'^(?P<year>\d{4})/$', 'archive_year', info_dict), 
    1414   (r'^/?$', 'archive_index', info_dict),