2011-01-26 00:10:30 +01:00
|
|
|
django-helpdesk - A Django powered ticket tracker for small enterprise.
|
2008-02-06 05:36:07 +01:00
|
|
|
|
2009-01-23 11:35:53 +01:00
|
|
|
(c) Copyright 2009 Jutda. All Rights Reserved. See LICENSE for details.
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2011-01-26 00:10:30 +01:00
|
|
|
django-helpdesk was formerly known as Jutda Helpdesk, named after the
|
|
|
|
company who originally created it. As of January 2011 the name has been
|
|
|
|
changed to reflect what it really is: a Django-powered ticket tracker with
|
|
|
|
contributors reaching far beyond Jutda.
|
|
|
|
|
2008-01-07 21:22:13 +01:00
|
|
|
#########################
|
|
|
|
0. Table of Contents
|
|
|
|
#########################
|
|
|
|
|
|
|
|
1. Licensing
|
|
|
|
2. Dependencies (pre-flight checklist)
|
2009-01-23 11:35:53 +01:00
|
|
|
3. Upgrading from previous versions
|
|
|
|
4. Installation
|
|
|
|
5. Initial Configuration
|
2009-06-25 13:22:53 +02:00
|
|
|
6. Spam filtering
|
|
|
|
7. API Usage
|
|
|
|
8. Thank You
|
2008-01-07 21:22:13 +01:00
|
|
|
|
|
|
|
#########################
|
|
|
|
1. Licensing
|
|
|
|
#########################
|
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
See the file 'LICENSE' for licensing terms. Note that django-helpdesk is
|
2009-01-23 11:35:53 +01:00
|
|
|
distributed with 3rd party products which have their own licenses. See
|
2009-01-20 09:13:54 +01:00
|
|
|
LICENSE.3RDPARTY for license terms for included packages.
|
2008-01-07 21:22:13 +01:00
|
|
|
|
|
|
|
#########################
|
|
|
|
2. Dependencies (pre-flight checklist)
|
|
|
|
#########################
|
2011-01-26 00:08:41 +01:00
|
|
|
1. Python 2.4+
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
2. Django (1.2 or newer)
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2008-01-16 04:23:43 +01:00
|
|
|
3. An existing WORKING Django project with database etc. If you
|
2008-01-15 00:12:27 +01:00
|
|
|
cannot log into the Admin, you won't get this product working.
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2009-01-22 08:33:30 +01:00
|
|
|
NOTE REGARDING SQLITE AND SEARCHING:
|
|
|
|
If you use sqlite as your database, the search function will not work as
|
|
|
|
effectively as it will with other databases due to its inability to do
|
|
|
|
case-insensitive searches. It's recommended that you use PostgreSQL or MySQL
|
|
|
|
if possible. For more information, see this note in the Django documentation:
|
|
|
|
http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching
|
|
|
|
|
2009-03-08 06:49:08 +01:00
|
|
|
When you try to do a keyword search using sqlite, a message will be displayed
|
|
|
|
to alert you to this shortcoming. There is no way around it, sorry.
|
|
|
|
|
2008-01-07 21:22:13 +01:00
|
|
|
#########################
|
2009-01-23 11:35:53 +01:00
|
|
|
3. Upgrading from previous versions
|
|
|
|
#########################
|
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
If you are upgrading from a previous version of django-helpdesk, you should
|
2009-01-23 11:35:53 +01:00
|
|
|
read the UPGRADING file to learn what changes you will need to make to get
|
2011-01-26 00:08:41 +01:00
|
|
|
the current version of django-helpdesk working.
|
2009-01-23 11:35:53 +01:00
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
1. Find out your current version of django-helpdesk. In the 'helpdesk' folder,
|
2009-01-23 11:35:53 +01:00
|
|
|
use the 'svn' command to find the current revision:
|
|
|
|
|
|
|
|
svn info .
|
|
|
|
|
|
|
|
Look for the 'Revision' line, eg:
|
|
|
|
|
|
|
|
Revision: 92
|
|
|
|
|
|
|
|
2. Read through the UPGRADE file, looking for any changse made _after_ that
|
|
|
|
revision. Apply the commands provided in order from oldest to most recent.
|
|
|
|
|
|
|
|
3. Restart your web server software (eg Apache) or FastCGI instance, to ensure
|
|
|
|
the latest changes are in use.
|
|
|
|
|
|
|
|
4. Continue to the 'Initial Configuration' area, if needed.
|
|
|
|
|
|
|
|
#########################
|
|
|
|
4. Installation
|
2008-01-07 21:22:13 +01:00
|
|
|
#########################
|
|
|
|
|
2008-01-21 02:07:46 +01:00
|
|
|
1. Place 'helpdesk' in your Python path. I use /var/django, others may use
|
2011-01-26 00:08:41 +01:00
|
|
|
/usr/lib/python2.4/site-packages/ or a similar path.
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2008-01-15 00:12:27 +01:00
|
|
|
2. In your projects' settings.py file, add these lines to the INSTALLED_APPS
|
|
|
|
setting:
|
2008-01-07 21:22:13 +01:00
|
|
|
'helpdesk',
|
|
|
|
'django.contrib.admin',
|
|
|
|
|
|
|
|
3. In your projects' urls.py file, add this line:
|
|
|
|
(r'helpdesk/', include('helpdesk.urls')),
|
|
|
|
|
|
|
|
You can substitute 'helpdesk/' for something else, eg 'support/' or even ''.
|
|
|
|
|
|
|
|
4. Ensure the admin line is un-hashed in urls.py:
|
|
|
|
# Uncomment this for admin:
|
2008-08-12 01:24:18 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
admin.autodiscover()
|
|
|
|
(r'^admin/(.*)', admin.site.root),
|
2008-01-07 21:22:13 +01:00
|
|
|
|
|
|
|
If you use helpdesk at the top of your domain (at /), ensure the admin
|
|
|
|
line comes BEFORE the helpdesk line.
|
|
|
|
|
|
|
|
5. In your project directory (NOT the helpdesk directory) run
|
|
|
|
./manage.py syncdb
|
|
|
|
to create database tables
|
|
|
|
|
2008-01-08 01:02:52 +01:00
|
|
|
6. Inside your MEDIA_ROOT folder, create a new folder called 'helpdesk' and
|
|
|
|
copy the contents of helpdesk/htdocs/ into it. Alternatively, create a
|
|
|
|
symlink:
|
|
|
|
ln -s /path/to/helpdesk/htdocs /path/to/media/helpdesk
|
|
|
|
|
2008-01-21 02:07:46 +01:00
|
|
|
This application assumes all helpdesk media will be accessible at
|
2009-07-16 00:39:18 +02:00
|
|
|
http://MEDIA_URL/helpdesk/
|
2008-01-21 02:07:46 +01:00
|
|
|
|
2008-02-08 01:19:58 +01:00
|
|
|
7. Inside your MEDIA_ROOT folder, inside the 'helpdesk' folder, is a folder
|
|
|
|
called 'attachments'. Ensure your web server software can write to this
|
|
|
|
folder - something like this should do the trick:
|
|
|
|
|
|
|
|
chown www-data:www-data attachments/; chmod 700 attachments
|
|
|
|
(substitute www-data for the user / group that your web server runs
|
|
|
|
as, eg 'apache' or 'httpd')
|
|
|
|
|
2009-07-16 00:58:57 +02:00
|
|
|
If all else fails ensure all users can write to it:
|
2008-02-08 01:19:58 +01:00
|
|
|
|
|
|
|
chmod 777 attachments/
|
|
|
|
|
2009-07-16 00:58:57 +02:00
|
|
|
This is NOT recommended, especially if you're on a shared server.
|
|
|
|
|
|
|
|
8. Ensure that your 'attachments' folder has directory listings turned off,
|
|
|
|
to ensure users don't download files that they are not specifically linked
|
|
|
|
to from their tickets.
|
|
|
|
|
|
|
|
If you are using Apache, put a .htaccess file in the 'attachments' folder
|
|
|
|
with the following content:
|
|
|
|
|
|
|
|
Options -Indexes
|
|
|
|
|
|
|
|
You will also have to make sure that .htaccess files aren't being ignored.
|
|
|
|
|
|
|
|
Ideally, accessing http://MEDIA_URL/helpdesk/attachments/ will give you a
|
|
|
|
403 access denied error.
|
2008-02-08 01:19:58 +01:00
|
|
|
|
2008-01-07 21:22:13 +01:00
|
|
|
#########################
|
2009-01-23 11:35:53 +01:00
|
|
|
5. Initial Configuration
|
2008-01-07 21:22:13 +01:00
|
|
|
#########################
|
|
|
|
|
|
|
|
1. Visit http://yoursite/admin/ and add a Helpdesk Queue. If you wish,
|
|
|
|
enter your POP3 or IMAP server details.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: Any tickets created via POP3 or IMAP mailboxes will DELETE
|
|
|
|
the original e-mail from the mail server.
|
|
|
|
|
|
|
|
2. Visit http://yoursite/helpdesk/ (or other path as defined in your urls.py)
|
|
|
|
|
|
|
|
3. If you wish to automatically create tickets from the contents of an e-mail
|
|
|
|
inbox, set up a cronjob to run scripts/get_email.py on a regular basis.
|
|
|
|
|
|
|
|
Don't forget to set the relevant Django environment variables in your
|
2008-01-16 05:38:24 +01:00
|
|
|
crontab:
|
2008-01-07 21:22:13 +01:00
|
|
|
|
2008-08-18 23:29:31 +02:00
|
|
|
*/5 * * * * /path/to/helpdesksite/manage.py get_email
|
2008-01-16 05:38:24 +01:00
|
|
|
|
|
|
|
This will run the e-mail import every 5 minutes
|
2008-01-07 21:22:13 +01:00
|
|
|
|
|
|
|
IMPORTANT NOTE: Any tickets created via POP3 or IMAP mailboxes will DELETE
|
|
|
|
the original e-mail from the mail server.
|
|
|
|
|
2008-01-16 05:38:24 +01:00
|
|
|
4. If you wish to automatically escalate tickets based on their age, set up
|
|
|
|
a cronjob to run scripts/escalate_tickets.py on a regular basis:
|
|
|
|
|
2009-07-16 00:39:18 +02:00
|
|
|
0 * * * * /path/to/helpdesksite/manage.py escalate_tickets
|
2008-01-16 05:38:24 +01:00
|
|
|
|
|
|
|
This will run the escalation process hourly, using the 'Escalation Hours'
|
|
|
|
setting for each queue to determine which tickets to escalate.
|
|
|
|
|
2008-01-22 06:54:22 +01:00
|
|
|
5. If you wish to exclude some days (eg, weekends) from escalation calculations, enter
|
|
|
|
the dates manually via the Admin, or setup a cronjob to run
|
2009-07-16 00:39:18 +02:00
|
|
|
scripts/create_escalation_exclusions on a regular basis:
|
2008-01-22 06:54:22 +01:00
|
|
|
|
2008-11-18 01:00:36 +01:00
|
|
|
0 0 * * 0 /path/to/helpdesksite/manage.py create_escalation_exclusions.py --days saturday,sunday --escalate-verbosely
|
2008-01-22 06:54:22 +01:00
|
|
|
|
|
|
|
This will, on a weekly basis, create exclusions for the coming weekend.
|
|
|
|
|
2009-01-11 02:53:04 +01:00
|
|
|
6. Log in to your Django admin screen, and go to the 'Sites' module. If the
|
|
|
|
site 'example.com' is listed, click it and update the details so they are
|
|
|
|
relevant for your website.
|
|
|
|
|
|
|
|
7. If you do not send mail directly from your web server (eg, you need to
|
|
|
|
use an SMTP server) then edit your settings.py file so it contains your
|
|
|
|
mail server details:
|
|
|
|
|
|
|
|
EMAIL_HOST = 'XXXXX'
|
|
|
|
EMAIL_HOST_USER = 'YYYYYY@ZZZZ.PPP'
|
|
|
|
EMAIL_HOST_PASSWORD = '123456'
|
|
|
|
|
2008-01-07 21:22:13 +01:00
|
|
|
You're now up and running!
|
2008-02-08 01:19:58 +01:00
|
|
|
|
|
|
|
#########################
|
2009-06-25 13:22:53 +02:00
|
|
|
7. Spam filtering
|
|
|
|
#########################
|
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
django-helpdesk includes a copy of `akismet.py' by Michael Foord, which lets
|
2009-06-25 13:22:53 +02:00
|
|
|
incoming ticket submissions be automatically checked against either the
|
|
|
|
Akismet or TypePad Anti-Spam services.
|
|
|
|
|
|
|
|
To enable this functionality, sign up for an API key with one of the following
|
|
|
|
serviceS:
|
|
|
|
|
|
|
|
Akismet: http://akismet.com/
|
|
|
|
Save your API key in settings.py as AKISMET_API_KEY
|
|
|
|
Note: Akismet is only free for personal use. Paid commercial accounts are
|
|
|
|
available.
|
|
|
|
|
|
|
|
TypePad AntiSpam: http://antispam.typepad.com/
|
|
|
|
Save your API key in settings.py as TYPEPAD_ANTISPAM_API_KEY
|
|
|
|
This service is free to use, within their terms and conditions.
|
|
|
|
|
|
|
|
If you have either of these settings enabled, the spam filtering will be
|
|
|
|
done automatically. If you have *both* settings configured, TypePad will
|
|
|
|
be used instead of Akismet.
|
|
|
|
|
|
|
|
Example configuration in settings.py:
|
|
|
|
|
|
|
|
TYPEPAD_ANTISPAM_API_KEY = 'abc123'
|
|
|
|
|
|
|
|
#########################
|
|
|
|
7. API Usage
|
2008-02-08 01:19:58 +01:00
|
|
|
#########################
|
|
|
|
|
2011-01-26 00:08:41 +01:00
|
|
|
django-helpdesk includes an API accessible via HTTP POST requests, allowing
|
2008-02-08 01:19:58 +01:00
|
|
|
you to create and alter tickets from 3rd party software and systems.
|
|
|
|
|
|
|
|
For usage instructions and command syntax, see the file
|
|
|
|
templates/helpdesk/api_help.html, or visit http://helpdesk/api/help/.
|
2008-08-18 23:29:31 +02:00
|
|
|
|
|
|
|
#########################
|
2009-06-25 13:22:53 +02:00
|
|
|
8. Thank You
|
2008-08-18 23:29:31 +02:00
|
|
|
#########################
|
|
|
|
|
|
|
|
While this started as a project to suit my own needs, since publishing the
|
|
|
|
code a number of people have made some fantastic improvements and provided
|
|
|
|
bug fixes and updates as the Django codebase has moved on and caused small
|
|
|
|
portions of this application to break.
|
|
|
|
|
|
|
|
To these people, my sincere thanks:
|
|
|
|
|
|
|
|
David Clymer <http://djangopeople.net/vezult/>
|
|
|
|
Chris Etcp
|
|
|
|
Nikolay Panov
|