change sources list format and add editor base + sources overlays

This commit is contained in:
Laura Klünder 2016-08-19 19:45:11 +02:00
parent 0d3187558e
commit b79f84f0b6
10 changed files with 127 additions and 45 deletions

View file

@ -1,7 +1,21 @@
from django.shortcuts import render
from django.contrib.admin.views.decorators import staff_member_required
from django.http import Http404
from django.shortcuts import redirect, render
from ..mapdata import mapmanager
def index(request):
return render(request, 'control/base.html')
@staff_member_required
def dashboard(request):
return render(request, 'control/dashboard.html')
# Create your views here.
@staff_member_required
def editor(request, level=None):
if not level:
return redirect('control.editor', level=mapmanager.levels[0])
if level not in mapmanager.levels:
raise Http404('Level does not exist')
return render(request, 'control/editor.html', {
'map': mapmanager
})