Allow import bank data from CSV files

This commit is contained in:
Raphael Michel
2015-03-21 22:03:39 +01:00
parent 8c97302e65
commit 9ec25d708b
13 changed files with 434 additions and 4 deletions

View File

@@ -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,

View File

@@ -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'],

View File

@@ -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 */
}