mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 19:00:44 +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
|
||||
renders all staff-facing views.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from datetime import datetime, timedelta
|
||||
import sys
|
||||
|
||||
@ -1012,7 +1013,7 @@ def run_report(request, report):
|
||||
if report == 'userpriority':
|
||||
title = _('User by Priority')
|
||||
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'
|
||||
|
||||
elif report == 'userqueue':
|
||||
@ -1024,7 +1025,7 @@ def run_report(request, report):
|
||||
elif report == 'userstatus':
|
||||
title = _('User by Status')
|
||||
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'
|
||||
|
||||
elif report == 'usermonth':
|
||||
@ -1036,13 +1037,13 @@ def run_report(request, report):
|
||||
elif report == 'queuepriority':
|
||||
title = _('Queue by Priority')
|
||||
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'
|
||||
|
||||
elif report == 'queuestatus':
|
||||
title = _('Queue by Status')
|
||||
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'
|
||||
|
||||
elif report == 'queuemonth':
|
||||
|
Loading…
Reference in New Issue
Block a user