mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-15 03:10:55 +01:00
Fix statistics for python 3 (still compatible with python 2)
This commit is contained in:
parent
f84da6c443
commit
eb3beb0dc9
@ -6,7 +6,8 @@ django-helpdesk - A Django powered ticket tracker for small enterprise.
|
|||||||
views/staff.py - The bulk of the application - provides most business logic and
|
views/staff.py - The bulk of the application - provides most business logic and
|
||||||
renders all staff-facing views.
|
renders all staff-facing views.
|
||||||
"""
|
"""
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -1012,7 +1013,7 @@ def run_report(request, report):
|
|||||||
if report == 'userpriority':
|
if report == 'userpriority':
|
||||||
title = _('User by Priority')
|
title = _('User by Priority')
|
||||||
col1heading = _('User')
|
col1heading = _('User')
|
||||||
possible_options = [t[1].__unicode__() for t in Ticket.PRIORITY_CHOICES]
|
possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES]
|
||||||
charttype = 'bar'
|
charttype = 'bar'
|
||||||
|
|
||||||
elif report == 'userqueue':
|
elif report == 'userqueue':
|
||||||
@ -1024,7 +1025,7 @@ def run_report(request, report):
|
|||||||
elif report == 'userstatus':
|
elif report == 'userstatus':
|
||||||
title = _('User by Status')
|
title = _('User by Status')
|
||||||
col1heading = _('User')
|
col1heading = _('User')
|
||||||
possible_options = [s[1].__unicode__() for s in Ticket.STATUS_CHOICES]
|
possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES]
|
||||||
charttype = 'bar'
|
charttype = 'bar'
|
||||||
|
|
||||||
elif report == 'usermonth':
|
elif report == 'usermonth':
|
||||||
@ -1036,13 +1037,13 @@ def run_report(request, report):
|
|||||||
elif report == 'queuepriority':
|
elif report == 'queuepriority':
|
||||||
title = _('Queue by Priority')
|
title = _('Queue by Priority')
|
||||||
col1heading = _('Queue')
|
col1heading = _('Queue')
|
||||||
possible_options = [t[1].__unicode__() for t in Ticket.PRIORITY_CHOICES]
|
possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES]
|
||||||
charttype = 'bar'
|
charttype = 'bar'
|
||||||
|
|
||||||
elif report == 'queuestatus':
|
elif report == 'queuestatus':
|
||||||
title = _('Queue by Status')
|
title = _('Queue by Status')
|
||||||
col1heading = _('Queue')
|
col1heading = _('Queue')
|
||||||
possible_options = [s[1].__unicode__() for s in Ticket.STATUS_CHOICES]
|
possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES]
|
||||||
charttype = 'bar'
|
charttype = 'bar'
|
||||||
|
|
||||||
elif report == 'queuemonth':
|
elif report == 'queuemonth':
|
||||||
|
Loading…
Reference in New Issue
Block a user