- # Just need to add the section title to the breadcrumb
- section = BlogSection.objects.get(slug__exact=parts[1])
- breadcrumb.append({'url': section.get_absolute_url(), 'title': section.title})
+ # Just need to add the section title to the breadcrumb *if* we
+ # actually have a section
+ if len(parts) > 1:
+ try:
+ section = BlogSection.objects.get(slug__exact=parts[1])
+ breadcrumb.append({'url': section.get_absolute_url(), 'title': section.title})
+ except:
+ pass