remove info for podcast adv from / (anon and logged-in)
[mygpo.git] / mygpo / security.py
blobc094dd253ec118e75567555f590cf79729fe27fc
1 # -*- coding: utf-8 -*-
3 # This file is part of my.gpodder.org.
5 # my.gpodder.org is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or (at your
8 # option) any later version.
10 # my.gpodder.org is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
13 # License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with my.gpodder.org. If not, see <http://www.gnu.org/licenses/>.
19 from django.http import HttpResponse
20 from django.shortcuts import render_to_response
21 from django.template import RequestContext
22 from django.contrib.sites.models import Site
23 from django.utils.translation import ugettext as _
25 def csrf_failure(request, reason=""):
26 site = Site.objects.get_current()
27 return render_to_response('csrf.html', {
28 'site': site,
29 'method': request.method,
30 'referer': request.META.get('HTTP_REFERER', _('another site')),
31 'path': request.path,
32 'get': request.GET,
33 'post': request.POST,
34 }, context_instance=RequestContext(request))