Add a user guide on payments

This commit is contained in:
Raphael Michel
2017-05-02 18:59:18 +02:00
parent f95b77fd7a
commit 2fcd561ff7
32 changed files with 250 additions and 137 deletions

View File

@@ -1,27 +0,0 @@
from django import template
from django.http import Http404
from django.shortcuts import render
from django.views.generic import View
from pretix.base.models import Organizer
class HelpView(View):
model = Organizer
context_object_name = 'organizers'
template_name = 'pretixcontrol/organizers/index.html'
paginate_by = 30
def get(self, request, *args, **kwargs):
# In a security review, this came up as a possible path traversal issue. However, the URL regex
# does not allow any dots in the argument (which forbids traversing upwards in the directory tree).
# Even if it *was* possbile, it'd be loaded through django's template loader and therefore limited
# to TEMPLATE_DIR.
try:
locale = request.LANGUAGE_CODE
return render(request, 'pretixcontrol/help/%s.%s.html' % (kwargs.get('topic'), locale), {})
except template.TemplateDoesNotExist:
try:
return render(request, 'pretixcontrol/help/%s.html' % kwargs.get('topic'), {})
except template.TemplateDoesNotExist:
raise Http404('')