2008-02-06 05:36:07 +01:00
|
|
|
"""
|
2011-01-26 00:08:41 +01:00
|
|
|
django-helpdesk - A Django powered ticket tracker for small enterprise.
|
2007-12-27 01:29:17 +01:00
|
|
|
|
2008-02-06 05:36:07 +01:00
|
|
|
(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details.
|
2007-12-27 01:29:17 +01:00
|
|
|
|
2008-08-19 10:50:38 +02:00
|
|
|
urls.py - Mapping of URL's to our various views. Note we always used NAMED
|
2008-02-06 05:36:07 +01:00
|
|
|
views for simplicity in linking later on.
|
2007-12-27 01:29:17 +01:00
|
|
|
"""
|
|
|
|
|
2008-11-18 00:51:09 +01:00
|
|
|
from django.conf import settings
|
2007-12-27 01:29:17 +01:00
|
|
|
from django.conf.urls.defaults import *
|
2008-02-08 06:29:51 +01:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2008-08-19 10:50:38 +02:00
|
|
|
from django.contrib.syndication.views import feed as django_feed
|
2008-02-08 06:29:51 +01:00
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
from helpdesk.views.feeds import feed_setup
|
2008-02-08 06:29:51 +01:00
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
urlpatterns = patterns('helpdesk.views.staff',
|
2008-08-19 10:50:38 +02:00
|
|
|
url(r'^dashboard/$',
|
2007-12-27 01:29:17 +01:00
|
|
|
'dashboard',
|
2008-05-21 23:16:44 +02:00
|
|
|
name='helpdesk_dashboard'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
|
|
|
url(r'^tickets/$',
|
2007-12-27 01:29:17 +01:00
|
|
|
'ticket_list',
|
|
|
|
name='helpdesk_list'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2009-03-08 06:58:26 +01:00
|
|
|
url(r'^tickets/update/$',
|
|
|
|
'mass_update',
|
|
|
|
name='helpdesk_mass_update'),
|
|
|
|
|
2008-08-19 10:50:38 +02:00
|
|
|
url(r'^tickets/submit/$',
|
2007-12-27 01:29:17 +01:00
|
|
|
'create_ticket',
|
|
|
|
name='helpdesk_submit'),
|
|
|
|
|
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/$',
|
|
|
|
'view_ticket',
|
|
|
|
name='helpdesk_view'),
|
2011-01-29 07:02:03 +01:00
|
|
|
|
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/followup_edit/(?P<followup_id>[0-9]+)/$',
|
|
|
|
'followup_edit',
|
|
|
|
name='helpdesk_followup_edit'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2009-06-03 13:43:46 +02:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/edit/$',
|
|
|
|
'edit_ticket',
|
|
|
|
name='helpdesk_edit'),
|
|
|
|
|
2007-12-27 01:29:17 +01:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/update/$',
|
|
|
|
'update_ticket',
|
2008-01-07 21:22:13 +01:00
|
|
|
name='helpdesk_update'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-01-15 05:00:19 +01:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/delete/$',
|
|
|
|
'delete_ticket',
|
|
|
|
name='helpdesk_delete'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-01-16 05:52:30 +01:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/hold/$',
|
|
|
|
'hold_ticket',
|
|
|
|
name='helpdesk_hold'),
|
2008-01-15 05:00:19 +01:00
|
|
|
|
2008-01-16 05:52:30 +01:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/unhold/$',
|
|
|
|
'unhold_ticket',
|
|
|
|
name='helpdesk_unhold'),
|
2008-01-11 02:00:01 +01:00
|
|
|
|
2009-09-09 10:47:48 +02:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/$',
|
|
|
|
'ticket_cc',
|
|
|
|
name='helpdesk_ticket_cc'),
|
|
|
|
|
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/add/$',
|
|
|
|
'ticket_cc_add',
|
|
|
|
name='helpdesk_ticket_cc_add'),
|
|
|
|
|
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/delete/(?P<cc_id>[0-9]+)/$',
|
|
|
|
'ticket_cc_del',
|
|
|
|
name='helpdesk_ticket_cc_del'),
|
2011-05-10 11:27:11 +02:00
|
|
|
|
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/add/$',
|
|
|
|
'ticket_dependency_add',
|
|
|
|
name='helpdesk_ticket_dependency_add'),
|
2009-09-09 10:47:48 +02:00
|
|
|
|
2011-05-10 11:27:11 +02:00
|
|
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/delete/(?P<dependency_id>[0-9]+)/$',
|
|
|
|
'ticket_dependency_del',
|
|
|
|
name='helpdesk_ticket_dependency_del'),
|
|
|
|
|
2008-01-11 02:00:01 +01:00
|
|
|
url(r'^raw/(?P<type>\w+)/$',
|
|
|
|
'raw_details',
|
|
|
|
name='helpdesk_raw'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-02-08 06:29:51 +01:00
|
|
|
url(r'^rss/$',
|
|
|
|
'rss_list',
|
|
|
|
name='helpdesk_rss_index'),
|
2008-04-02 01:26:12 +02:00
|
|
|
|
|
|
|
url(r'^reports/$',
|
|
|
|
'report_index',
|
|
|
|
name='helpdesk_report_index'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-04-02 01:26:12 +02:00
|
|
|
url(r'^reports/(?P<report>\w+)/$',
|
|
|
|
'run_report',
|
|
|
|
name='helpdesk_run_report'),
|
2008-08-28 11:06:24 +02:00
|
|
|
|
|
|
|
url(r'^save_query/$',
|
|
|
|
'save_query',
|
|
|
|
name='helpdesk_savequery'),
|
|
|
|
|
|
|
|
url(r'^delete_query/(?P<id>[0-9]+)/$',
|
|
|
|
'delete_saved_query',
|
|
|
|
name='helpdesk_delete_query'),
|
2008-09-09 10:32:01 +02:00
|
|
|
|
|
|
|
url(r'^settings/$',
|
|
|
|
'user_settings',
|
|
|
|
name='helpdesk_user_settings'),
|
2008-10-25 00:52:34 +02:00
|
|
|
|
|
|
|
url(r'^ignore/$',
|
|
|
|
'email_ignore',
|
|
|
|
name='helpdesk_email_ignore'),
|
|
|
|
|
|
|
|
url(r'^ignore/add/$',
|
|
|
|
'email_ignore_add',
|
|
|
|
name='helpdesk_email_ignore_add'),
|
|
|
|
|
|
|
|
url(r'^ignore/delete/(?P<id>[0-9]+)/$',
|
|
|
|
'email_ignore_del',
|
|
|
|
name='helpdesk_email_ignore_del'),
|
2007-12-27 01:29:17 +01:00
|
|
|
)
|
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
urlpatterns += patterns('helpdesk.views.public',
|
2008-08-19 10:50:38 +02:00
|
|
|
url(r'^$',
|
2008-05-21 23:16:44 +02:00
|
|
|
'homepage',
|
|
|
|
name='helpdesk_home'),
|
|
|
|
|
|
|
|
url(r'^view/$',
|
|
|
|
'view_ticket',
|
|
|
|
name='helpdesk_public_view'),
|
|
|
|
)
|
|
|
|
|
2008-02-08 06:29:51 +01:00
|
|
|
urlpatterns += patterns('',
|
|
|
|
url(r'^rss/(?P<url>.*)/$',
|
|
|
|
login_required(django_feed),
|
|
|
|
{'feed_dict': feed_setup},
|
|
|
|
name='helpdesk_rss'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-02-06 05:36:07 +01:00
|
|
|
url(r'^api/(?P<method>[a-z_-]+)/$',
|
2008-05-21 23:16:44 +02:00
|
|
|
'helpdesk.views.api.api',
|
2008-02-06 05:36:07 +01:00
|
|
|
name='helpdesk_api'),
|
2008-04-02 01:34:24 +02:00
|
|
|
|
2008-02-06 05:36:07 +01:00
|
|
|
url(r'^login/$',
|
|
|
|
'django.contrib.auth.views.login',
|
2011-02-02 09:05:33 +01:00
|
|
|
{'template_name': 'helpdesk/registration/login.html'},
|
2008-02-06 05:36:07 +01:00
|
|
|
name='login'),
|
2007-12-27 01:29:17 +01:00
|
|
|
|
2008-02-06 05:36:07 +01:00
|
|
|
url(r'^logout/$',
|
|
|
|
'django.contrib.auth.views.logout',
|
2011-02-02 09:05:33 +01:00
|
|
|
{'template_name': 'helpdesk/registration/login.html', 'next_page': '../'},
|
2008-02-06 05:36:07 +01:00
|
|
|
name='logout'),
|
2007-12-27 01:29:17 +01:00
|
|
|
)
|
2008-05-21 23:16:44 +02:00
|
|
|
|
|
|
|
urlpatterns += patterns('helpdesk.views.kb',
|
|
|
|
url(r'^kb/$',
|
|
|
|
'index', name='helpdesk_kb_index'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
url(r'^kb/(?P<slug>[A-Za-z_-]+)/$',
|
|
|
|
'category', name='helpdesk_kb_category'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
url(r'^kb/(?P<item>[0-9]+)/$',
|
|
|
|
'item', name='helpdesk_kb_item'),
|
2008-08-19 10:50:38 +02:00
|
|
|
|
2008-05-21 23:16:44 +02:00
|
|
|
url(r'^kb/(?P<item>[0-9]+)/vote/$',
|
|
|
|
'vote', name='helpdesk_kb_vote'),
|
|
|
|
)
|
2008-08-29 11:11:02 +02:00
|
|
|
|
|
|
|
urlpatterns += patterns('',
|
|
|
|
url(r'^api/$',
|
|
|
|
'django.views.generic.simple.direct_to_template',
|
|
|
|
{'template': 'helpdesk/help_api.html',},
|
|
|
|
name='helpdesk_api_help'),
|
|
|
|
|
|
|
|
url(r'^help/context/$',
|
|
|
|
'django.views.generic.simple.direct_to_template',
|
|
|
|
{'template': 'helpdesk/help_context.html',},
|
|
|
|
name='helpdesk_help_context'),
|
2008-10-25 00:52:34 +02:00
|
|
|
|
|
|
|
url(r'^system_settings/$',
|
|
|
|
'django.views.generic.simple.direct_to_template',
|
2008-11-18 00:51:09 +01:00
|
|
|
{
|
|
|
|
'template': 'helpdesk/system_settings.html',
|
|
|
|
'extra_context': {
|
|
|
|
'ADMIN_URL': getattr(settings, 'ADMIN_URL', '/admin/'),
|
|
|
|
},
|
|
|
|
},
|
2008-10-25 00:52:34 +02:00
|
|
|
name='helpdesk_system_settings'),
|
2008-08-29 11:11:02 +02:00
|
|
|
)
|