mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 10:51:21 +01:00
convert reverse-URL lookups to helpdesk namespace
in views.staff, this fixes: -run_report's no-tickets-found redirect to report_index -del_attachment's redirect to parent ticket view after deletion
This commit is contained in:
parent
7eceb35d43
commit
ebfea8274d
@ -1124,7 +1124,7 @@ def run_report(request, report):
|
|||||||
if Ticket.objects.all().count() == 0 or report not in (
|
if Ticket.objects.all().count() == 0 or report not in (
|
||||||
'queuemonth', 'usermonth', 'queuestatus', 'queuepriority', 'userstatus',
|
'queuemonth', 'usermonth', 'queuestatus', 'queuepriority', 'userstatus',
|
||||||
'userpriority', 'userqueue', 'daysuntilticketclosedbymonth'):
|
'userpriority', 'userqueue', 'daysuntilticketclosedbymonth'):
|
||||||
return HttpResponseRedirect(reverse("helpdesk_report_index"))
|
return HttpResponseRedirect(reverse("helpdesk:report_index"))
|
||||||
|
|
||||||
report_queryset = Ticket.objects.all().select_related().filter(
|
report_queryset = Ticket.objects.all().select_related().filter(
|
||||||
queue__in=_get_user_queues(request.user)
|
queue__in=_get_user_queues(request.user)
|
||||||
@ -1475,7 +1475,7 @@ def attachment_del(request, ticket_id, attachment_id):
|
|||||||
attachment = get_object_or_404(Attachment, id=attachment_id)
|
attachment = get_object_or_404(Attachment, id=attachment_id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
attachment.delete()
|
attachment.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket_id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket_id]))
|
||||||
return render(request, 'helpdesk/ticket_attachment_del.html', {
|
return render(request, 'helpdesk/ticket_attachment_del.html', {
|
||||||
'attachment': attachment,
|
'attachment': attachment,
|
||||||
'filename': attachment.filename,
|
'filename': attachment.filename,
|
||||||
|
Loading…
Reference in New Issue
Block a user