A simple ticketing application written in Python/Django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

urls.py 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # -*- coding: utf-8 -*-
  2. from django.conf.urls import patterns, include, url
  3. from django.contrib import admin
  4. import main.views
  5. from django.contrib.auth.decorators import login_required
  6. # to include media files at the end
  7. from django.conf import settings
  8. from django.conf.urls.static import static
  9. urlpatterns = patterns(
  10. '',
  11. # Login and settings pages
  12. url(r'^$', 'django.contrib.auth.views.login'),
  13. url(r'^logout/$', 'django.contrib.auth.views.logout_then_login'),
  14. url(r'^settings/$',
  15. login_required(main.views.usersettings_update_view),
  16. name='user-settings'),
  17. # Django admin
  18. url(r'^admin/', include(admin.site.urls)),
  19. # create new ticket
  20. url(r'^ticket/new/$',
  21. login_required(main.views.ticket_create_view),
  22. name='ticket_new'),
  23. # edit ticket
  24. url(r'^ticket/edit/(?P<pk>\d+)/$',
  25. login_required(main.views.ticket_edit_view),
  26. name='ticket_edit'),
  27. # view ticket
  28. url(r'^ticket/(?P<pk>\d+)/$',
  29. login_required(main.views.ticket_detail_view),
  30. name='ticket_detail'),
  31. # create new followup
  32. url(r'^followup/new/$',
  33. login_required(main.views.followup_create_view),
  34. name='followup_new'),
  35. # edit followup
  36. url(r'^followup/edit/(?P<pk>\d+)/$',
  37. login_required(main.views.followup_edit_view),
  38. name='followup_edit'),
  39. # create new attachment
  40. url(r'^attachment/new/$',
  41. login_required(main.views.attachment_create_view),
  42. name='attachment_new'),
  43. # ticket overviews
  44. url(r'^inbox/$',
  45. login_required(main.views.inbox_view),
  46. name='inbox'),
  47. url(r'^my-tickets/$',
  48. login_required(main.views.my_tickets_view),
  49. name='my-tickets'),
  50. url(r'^all-tickets/$',
  51. login_required(main.views.all_tickets_view),
  52. name='all-tickets'),
  53. url(r'^archive/$',
  54. login_required(main.views.archive_view),
  55. name='archive'),
  56. ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)