Add first round of proper documentation. Mostly taken from the README at this stage.

This commit is contained in:
Ross Poulton
2011-02-04 23:13:37 +00:00
parent d6602e96d7
commit ac37198e3f
49 changed files with 4008 additions and 173 deletions

6
docs/source/api.rst Normal file
View File

@ -0,0 +1,6 @@
django-helpdesk Ticket API
==========================
django-helpdesk includes an API accessible via HTTP POST requests, allowing 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/.

216
docs/source/conf.py Normal file
View File

@ -0,0 +1,216 @@
# -*- coding: utf-8 -*-
#
# django-helpdesk documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 4 00:19:32 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'django-helpdesk'
copyright = u'2011, Ross Poulton + Contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1'
# The full version, including alpha/beta/rc tags.
release = '0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'django-helpdeskdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'django-helpdesk.tex', u'django-helpdesk Documentation',
u'Ross Poulton + Contributors', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'django-helpdesk', u'django-helpdesk Documentation',
[u'Ross Poulton + Contributors'], 1)
]

View File

@ -0,0 +1,42 @@
django-helpdesk Configuration
=============================
Before django-helpdesk will be much use, you need to do some basic configuration. Most of this is done via the Django admin screens.
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 whatever 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 the management command on a regular basis.
Don't forget to set the relevant Django environment variables in your crontab::
*/5 * * * * /path/to/helpdesksite/manage.py get_email
This will run the e-mail import every 5 minutes
**IMPORTANT NOTE**: Any tickets created via POP3 or IMAP mailboxes will DELETE the original e-mail from the mail server.
4. If you wish to automatically escalate tickets based on their age, set up a cronjob to run the escalation command on a regular basis::
0 * * * * /path/to/helpdesksite/manage.py escalate_tickets
This will run the escalation process hourly, using the 'Escalation Hours' setting for each queue to determine which tickets to escalate.
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 a management command on a regular basis::
0 0 * * 0 /path/to/helpdesksite/manage.py create_escalation_exclusions --days saturday,sunday --escalate-verbosely
This will, on a weekly basis, create exclusions for the coming weekend.
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'
You're now up and running! Happy ticketing.

View File

@ -0,0 +1,10 @@
django-helpdesk custom fields
=============================
As of February 2011, django-helpdesk supports custom fields on the ``Ticket`` model. These fields are created by using the Django administration tool, and are shown on both the public and staff submission forms.
You can use most Django field types including text, integer, boolean, and list.
The demo at http://demo.jutdahelpdesk.com contains an example of each type of custom field, including a mix of mandatory and optional fields.
Note that this feature is still in beta - it needs quite a bit of testing and no doubt has bugs!

72
docs/source/index.rst Normal file
View File

@ -0,0 +1,72 @@
Welcome to django-helpdesk's documentation!
===========================================
django-helpdesk is a Django application to manage helpdesk tickets for your internal helpdesk. It was formerly known as Jutda Helpdesk.
How Does It Look?
-----------------
You can see a demo installation at http://demo.jutdahelpdesk.com
Quick Start
-----------
django-helpdesk is just a Django application with models, views, templates, and some media. If you're comfortable with Django just try ``pip install django-helpdesk``. If not, continue to read the Installation document.
Key Features
------------
django-helpdesk has been designed for small businesses who need to recieve, manage and respond to requests for help from customers. In this context *'customers'* may be external users, or other people within your company.
* Tickets can be opened vi a email
* Multiple queues / categories of tickets
* Integrated FAQ / knowledgebase
Customer-facing Capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Customers (who are not 'staff' users in Django) can:
1. Browse your knowledgebase / FAQ
2. Submit support requests via web/email
3. Review open and closed requests they submitted
Staff Capabilities
~~~~~~~~~~~~~~~~~~~~
If a user is a staff member, they get general helpdesk access, including:
1. See the ticket dashboard showing unassigned tickets and basic status of the helpdesk
2. Review the tickets assigned to them
3. Search through all tickets, open and closed
4. Save their searches for future use
5. Follow up or respond to tickets
6. Assign tickets to themselves or other staff members
7. Resolve tickets
Licensing
---------
django-helpdesk is released under the BSD license, however it packages 3rd party applications which may be using a different license. See the files LICENSE and LICENSE.3RDPARTY for more details.
Dependencies
------------
1. Python 2.4+
2. Django (1.2 or newer)
3. An existing **working** Django project with database etc. If you cannot log into the Admin, you won't get this product working!
Contents:
---------
.. toctree::
:maxdepth: 2
:glob:
install
configuration
settings
spam
custom_fields
api

78
docs/source/install.rst Normal file
View File

@ -0,0 +1,78 @@
Installation
============
django-helpdesk installation isn't difficult, but it requires you have a bit of existing know-how about Django.
Getting The Code
----------------
Installing using PIP
~~~~~~~~~~~~~~~~~~~~
Try using ``pip install django-helpdesk``. Go and have a beer to celebrate Python packaging.
GIT Checkout (Cutting Edge)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
``git clone git://github.com/rossp/django-helpdesk.git``
Copy the ``helpdesk`` folder into your ``PYTHONPATH``.
I just want a .tar.gz!
~~~~~~~~~~~~~~~~~~~~~~
You can download the latest PyPi package from http://pypi.python.org/pypi/django-helpdesk/
Download, extract, and drop ``helpdesk`` into your ``PYTHONPATH``
Adding To Your Django Project
-----------------------------
1. Edit your ``settings.py`` file and add ``helpdesk`` to the ``INSTALLED_APPS`` setting. You also need ``django.contrib.admin`` in ``INSTALLED_APPS`` if you haven't already added it. eg::
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin', # Required for helpdesk admin/maintenance
'django.contrib.markup', # Required for text display
'helpdesk', # This is new!
)
2. Make sure django-helpdesk is accessible via ``urls.py``. Add the following line to ``urls.py``::
(r'helpdesk/', include('helpdesk.urls')),
3. Create the required database tables. I'd suggest using *South*, however the following will work::
./manage.py syncdb
4. 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``
5. 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')
If all else fails ensure all users can write to it:
``chmod 777 attachments/``
This is NOT recommended, especially if you're on a shared server.
6. 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.

20
docs/source/settings.rst Normal file
View File

@ -0,0 +1,20 @@
django-helpdesk settings
========================
The following settings can be changed in your ``settings.py`` file to help change the way django-helpdesk operates.
HELPDESK_DEFAULT_SETTINGS
-------------------------
django-helpdesk has a built in ``UserSettings`` entity with per-use options that they will want to configure themselves. When you create a new user, a set of options is automatically created for them which they can then change themselves.
If you want to override the default settings for your users, create ``HELPDESK_DEFAULT_SETTINGS`` as a dictionary in ``settings.py``. The default is below::
HELPDESK_DEFAULT_SETTINGS = {
'use_email_as_submitter': True,
'email_on_ticket_assign': True,
'email_on_ticket_change': True,
'login_view_ticketlist': True,
'email_on_ticket_apichange': True,
'tickets_per_page': 25
}

31
docs/source/spam.rst Normal file
View File

@ -0,0 +1,31 @@
django-helpdesk spam filtering
==============================
django-helpdesk includes a copy of ``akismet.py`` by Michael Foord, which lets 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
~~~~~~~
* Sign up at 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
~~~~~~~~~~~~~~~~
* Sign up at 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
~~~~~~~
A sample configuration in ``settings.py`` may be:
TYPEPAD_ANTISPAM_API_KEY = 'abc123'