diff --git a/docs/install.rst b/docs/install.rst index f386ea38..bb7d4334 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -46,11 +46,11 @@ Adding To Your Django Project 2. Make sure django-helpdesk is accessible via ``urls.py``. Add the following line to ``urls.py``:: - (r'helpdesk/', include('helpdesk.urls')), + url(r'helpdesk/', include('helpdesk.urls')), Note that you can change 'helpdesk/' to anything you like, such as 'support/' or 'help/'. If you want django-helpdesk to be available at the root of your site (for example at http://support.mysite.tld/) then the line will be as follows:: - (r'', include('helpdesk.urls')), + url(r'', include('helpdesk.urls')), This line will have to come *after* any other lines in your urls.py such as those used by the Django admin. diff --git a/helpdesk/migrations/0003_populate_usersettings.py b/helpdesk/migrations/0002_populate_usersettings.py similarity index 97% rename from helpdesk/migrations/0003_populate_usersettings.py rename to helpdesk/migrations/0002_populate_usersettings.py index 36b98310..ba2979be 100644 --- a/helpdesk/migrations/0003_populate_usersettings.py +++ b/helpdesk/migrations/0002_populate_usersettings.py @@ -43,7 +43,7 @@ noop = lambda *args, **kwargs: None class Migration(migrations.Migration): dependencies = [ - ('helpdesk', '0002_socks_proxy'), + ('helpdesk', '0001_initial'), ] operations = [ diff --git a/helpdesk/migrations/0002_socks_proxy.py b/helpdesk/migrations/0002_socks_proxy.py deleted file mode 100644 index 468af823..00000000 --- a/helpdesk/migrations/0002_socks_proxy.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('helpdesk', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='queue', - name='socks_proxy_host', - field=models.GenericIPAddressField(help_text='Socks proxy IP address. Default: 127.0.0.1', null=True, verbose_name='Socks Proxy Host', blank=True), - preserve_default=True, - ), - migrations.AddField( - model_name='queue', - name='socks_proxy_port', - field=models.IntegerField(help_text='Socks proxy port number. Default: 9150 (default TOR port)', null=True, verbose_name='Socks Proxy Port', blank=True), - preserve_default=True, - ), - migrations.AddField( - model_name='queue', - name='socks_proxy_type', - field=models.CharField(choices=[(b'socks4', 'SOCKS4'), (b'socks5', 'SOCKS5')], max_length=8, blank=True, help_text='SOCKS4 or SOCKS5 allows you to proxy your connections through a SOCKS server.', null=True, verbose_name='Socks Proxy Type'), - preserve_default=True, - ), - ] diff --git a/helpdesk/migrations/0004_initial_data_import.py b/helpdesk/migrations/0003_initial_data_import.py similarity index 95% rename from helpdesk/migrations/0004_initial_data_import.py rename to helpdesk/migrations/0003_initial_data_import.py index e64f4112..566993e0 100644 --- a/helpdesk/migrations/0004_initial_data_import.py +++ b/helpdesk/migrations/0003_initial_data_import.py @@ -36,7 +36,7 @@ def unload_fixture(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('helpdesk', '0003_populate_usersettings'), + ('helpdesk', '0002_populate_usersettings'), ] operations = [ diff --git a/helpdesk/templates/helpdesk/base.html b/helpdesk/templates/helpdesk/base.html index 9f9e1eb7..433c825c 100644 --- a/helpdesk/templates/helpdesk/base.html +++ b/helpdesk/templates/helpdesk/base.html @@ -1,6 +1,7 @@ {% load i18n %} {% load saved_queries %} {% load load_helpdesk_settings %} +{% load static from staticfiles %} {% with request|load_helpdesk_settings as helpdesk_settings %} {% with user|saved_queries as user_saved_queries_ %} @@ -9,11 +10,11 @@ {% block helpdesk_title %}Helpdesk{% endblock %} :: {% trans "Powered by django-helpdesk" %} - - + + - - + + @@ -58,7 +59,7 @@ diff --git a/helpdesk/templates/helpdesk/public_base.html b/helpdesk/templates/helpdesk/public_base.html index d1c4e265..b78c2fe3 100644 --- a/helpdesk/templates/helpdesk/public_base.html +++ b/helpdesk/templates/helpdesk/public_base.html @@ -1,6 +1,7 @@ {% load i18n %} {% load url from future %} {% load load_helpdesk_settings %} +{% load static from staticfiles %} {% with request|load_helpdesk_settings as helpdesk_settings %} @@ -8,7 +9,7 @@ - + {% block helpdesk_head %}{% endblock %} diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index b36bd5d5..0ea21497 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -1013,7 +1013,7 @@ def run_report(request, report): if report == 'userpriority': title = _('User by Priority') col1heading = _('User') - possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES] + possible_options = [t[1].title() for t in Ticket.PRIORITY_CHOICES] charttype = 'bar' elif report == 'userqueue': @@ -1025,7 +1025,7 @@ def run_report(request, report): elif report == 'userstatus': title = _('User by Status') col1heading = _('User') - possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES] + possible_options = [s[1].title() for s in Ticket.STATUS_CHOICES] charttype = 'bar' elif report == 'usermonth': @@ -1037,13 +1037,13 @@ def run_report(request, report): elif report == 'queuepriority': title = _('Queue by Priority') col1heading = _('Queue') - possible_options = [t[1].__str__() for t in Ticket.PRIORITY_CHOICES] + possible_options = [t[1].title() for t in Ticket.PRIORITY_CHOICES] charttype = 'bar' elif report == 'queuestatus': title = _('Queue by Status') col1heading = _('Queue') - possible_options = [s[1].__str__() for s in Ticket.STATUS_CHOICES] + possible_options = [s[1].title() for s in Ticket.STATUS_CHOICES] charttype = 'bar' elif report == 'queuemonth': diff --git a/quicktest.py b/quicktest.py index d49084b9..78724ec2 100644 --- a/quicktest.py +++ b/quicktest.py @@ -90,6 +90,7 @@ class QuickDjangoTest(object): INSTALLED_APPS = self.INSTALLED_APPS + self.apps, MIDDLEWARE_CLASSES = self.MIDDLEWARE_CLASSES, ROOT_URLCONF = self.apps[0] + '.urls', + STATIC_URL = '/static/' ) if django.VERSION >= (1, 7):