~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to notification/views.py

  • Committer: franku
  • Date: 2018-04-26 20:18:55 UTC
  • mfrom: (489.1.28 widelands)
  • Revision ID: somal@arcor.de-20180426201855-uwt3b8gptpav6wrm
updated code base to fit with django 1.11.12; replaced app tracking with a new middleware

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from django.shortcuts import render_to_response
2
 
from django.template import RequestContext
 
1
from django.shortcuts import render
3
2
from django.contrib.auth.decorators import login_required
4
3
from collections import OrderedDict
5
4
from notification.models import *
28
27
 
29
28
        app_tables[app].append({'notice_type': notice_type, 'html_values': checkbox_values})
30
29
 
31
 
    return render_to_response('notification/notice_settings.html', {
 
30
    return render(request, 'notification/notice_settings.html', {
32
31
        'column_headers': [medium_display for medium_id, medium_display in NOTICE_MEDIA],
33
32
        'app_tables': OrderedDict(sorted(app_tables.items(), key=lambda t: t[0]))
34
 
    }, context_instance=RequestContext(request))
 
33
    })