diff -urN django-original/contrib/flatpages/views.py django/contrib/flatpages/views.py
old
|
new
|
|
5 | 5 | from django.conf import settings |
6 | 6 | from django.core.xheaders import populate_xheaders |
7 | 7 | from django.utils.safestring import mark_safe |
| 8 | from django.contrib.breadcrumbs.utils import breadcrumbs_for_flatpages |
8 | 9 | |
9 | 10 | DEFAULT_TEMPLATE = 'flatpages/default.html' |
10 | 11 | |
… |
… |
|
29 | 30 | if f.registration_required and not request.user.is_authenticated(): |
30 | 31 | from django.contrib.auth.views import redirect_to_login |
31 | 32 | return redirect_to_login(request.path) |
| 33 | # if user enabled contrib.breadcrumbs add page to breadcrumbs |
| 34 | if settings.BREADCRUMBS: |
| 35 | breadcrumbs_for_flatpages(request,f) |
32 | 36 | if f.template_name: |
33 | 37 | t = loader.select_template((f.template_name, DEFAULT_TEMPLATE)) |
34 | 38 | else: |