Changed the way the context is passed to render() - this was required

to enable django 1.7 to work (otherwise 1.8, 1.9 pass all tests, but 1.7 fails)
This commit is contained in:
Daryl 2016-06-21 20:56:43 +12:00
parent 558f140bfb
commit 8a7fe5fcbf
2 changed files with 10 additions and 10 deletions

View File

@ -63,8 +63,8 @@ def homepage(request):
knowledgebase_categories = KBCategory.objects.all()
return render(request, template_name='helpdesk/public_homepage.html',
context = {
return render(request, 'helpdesk/public_homepage.html',
{
'form': form,
'helpdesk_settings': helpdesk_settings,
'kb_categories': knowledgebase_categories
@ -117,8 +117,8 @@ def view_ticket(request):
if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED:
redirect_url = reverse('helpdesk_view', args=[ticket_id])
return render(request, template_name='helpdesk/public_view_ticket.html',
context = {
return render(request, 'helpdesk/public_view_ticket.html',
{
'ticket': ticket,
'helpdesk_settings': helpdesk_settings,
'next': redirect_url,

View File

@ -153,8 +153,8 @@ def dashboard(request):
dash_tickets = query_to_dict(cursor.fetchall(), cursor.description)
return render(request, template_name='helpdesk/dashboard.html',
context = {
return render(request, 'helpdesk/dashboard.html',
{
'user_tickets': tickets,
'user_tickets_closed_resolved': tickets_closed_resolved,
'unassigned_tickets': unassigned_tickets,
@ -892,8 +892,8 @@ def ticket_list(request):
querydict.pop('page', 1)
return render(request, template_name='helpdesk/ticket_list.html',
context = dict(
return render(request, 'helpdesk/ticket_list.html',
dict(
context,
query_string=querydict.urlencode(),
tickets=tickets,
@ -1198,8 +1198,8 @@ def run_report(request, report):
data.append(summarytable[item, hdr])
table.append([item] + data)
return render(request, template_name='helpdesk/report_output.html',
context = {
return render(request, 'helpdesk/report_output.html',
{
'title': title,
'charttype': charttype,
'data': table,