mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Allow import bank data from CSV files
This commit is contained in:
@@ -8,7 +8,7 @@ def contextprocessor(request):
|
||||
Adds data to all template contexts
|
||||
"""
|
||||
url = resolve(request.path_info)
|
||||
if url.namespace != 'control':
|
||||
if not request.path.startswith('/control'):
|
||||
return {}
|
||||
ctx = {
|
||||
'url_name': url.url_name,
|
||||
|
||||
@@ -24,9 +24,8 @@ class PermissionMiddleware:
|
||||
|
||||
def process_request(self, request):
|
||||
url = resolve(request.path_info)
|
||||
url_namespace = url.namespace
|
||||
url_name = url.url_name
|
||||
if url_namespace != 'control' or url_name in self.EXCEPTIONS:
|
||||
if not request.path.startswith('/control') or url_name in self.EXCEPTIONS:
|
||||
return
|
||||
if not request.user.is_authenticated():
|
||||
# Taken from django/contrib/auth/decorators.py
|
||||
@@ -47,7 +46,7 @@ class PermissionMiddleware:
|
||||
|
||||
request.user.events_cache = request.user.events.current.order_by(
|
||||
"organizer", "date_from").prefetch_related("organizer")
|
||||
if 'event.' in url_name and 'event' in url.kwargs:
|
||||
if 'event' in url.kwargs and 'organizer' in url.kwargs:
|
||||
try:
|
||||
request.event = Event.objects.current.filter(
|
||||
slug=url.kwargs['event'],
|
||||
|
||||
@@ -53,4 +53,15 @@ nav.navbar {
|
||||
}
|
||||
.container-fluid > .alert:first-child {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.flipped-scroll-wrapper {
|
||||
overflow-y: auto;
|
||||
}
|
||||
.flipped-scroll-wrapper, .flipped-scroll-inner {
|
||||
/* This nasty hack puts the scroll bar at the top, so the user really
|
||||
notices that there is one */
|
||||
transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg); /* IE 9 */
|
||||
-webkit-transform: rotateX(180deg); /* Safari and Chrome */
|
||||
}
|
||||
Reference in New Issue
Block a user