mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-17 11:21:11 +02:00
Changed render_to_response() to render() - this should work for django1.9.4 plus django1.10
Without this change, django1.10 is missing the 'user' object from the context, which results in a very hard to track down bug manifesting in ; "NoReverseMatch: Reverse for 'helpdesk_rss_user' with arguments '('',)' and keyword arguments '{}' not found." At first glance users may think this is the dots-in-usernames bug, but the username is totally missing.
This commit is contained in:
@ -19,7 +19,7 @@ try:
|
||||
except ImportError:
|
||||
from django.contrib.auth.models import User
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import render_to_response
|
||||
from django.shortcuts import render
|
||||
from django.template import loader, Context
|
||||
import simplejson
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
@ -64,7 +64,7 @@ def api(request, method):
|
||||
warnings.warn("django-helpdesk API will be removed in January 2016. See https://github.com/rossp/django-helpdesk/issues/198 for details.", category=DeprecationWarning)
|
||||
|
||||
if method == 'help':
|
||||
return render_to_response('helpdesk/help_api.html')
|
||||
return render(request, template_name='helpdesk/help_api.html')
|
||||
|
||||
if request.method != 'POST':
|
||||
return api_return(STATUS_ERROR_BADMETHOD)
|
||||
|
Reference in New Issue
Block a user