Ticket #6932: flatpages_list.diff
File flatpages_list.diff, 1003 bytes (added by , 17 years ago) |
---|
-
django/contrib/flatpages/views.py
22 22 if not url.startswith('/'): 23 23 url = "/" + url 24 24 f = get_object_or_404(FlatPage, url__exact=url, sites__id__exact=settings.SITE_ID) 25 26 flatpages = FlatPage.objects.filter(sites__id__exact=settings.SITE_ID) 27 if not request.user.is_authenticated(): 28 flatpages = flatpages.filter(registration_required=False) 29 25 30 # If registration is required for accessing this page, and the user isn't 26 31 # logged in, redirect to the login page. 27 32 if f.registration_required and not request.user.is_authenticated(): … … 40 45 41 46 c = RequestContext(request, { 42 47 'flatpage': f, 48 'flatpages': flatpages, 43 49 }) 44 50 response = HttpResponse(t.render(c)) 45 51 populate_xheaders(request, response, FlatPage, f.id)