~roadmr/canonical-identity-provider/fix-deprecation-warnings-1

« back to all changes in this revision

Viewing changes to src/webui/decorators.py

  • Committer: Ubuntu One Auto Copilot
  • Author(s): Tom Wardill
  • Date: 2018-02-26 10:27:50 UTC
  • mfrom: (1597.1.68 canonical-identity-provider)
  • Revision ID: otto-copilot@canonical.com-20180226102750-i14x4w85e1stu1su
Update to django 1.11.

Merged from https://code.launchpad.net/~tom-howrandom/canonical-identity-provider/django-1.11/+merge/338452

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    HttpResponseForbidden,
23
23
    HttpResponseRedirect,
24
24
)
25
 
from django.template import RequestContext
26
25
from django.template.loader import render_to_string
27
26
from django.template.response import TemplateResponse
28
27
from django.utils.decorators import available_attrs
156
155
            html = render_to_string(
157
156
                'readonly.html',
158
157
                {'readonly': False},
159
 
                context_instance=RequestContext(request)
 
158
                request=request
160
159
            )
161
160
            return HttpResponseForbidden(html)
162
161
        return func(request, *args, **kwargs)