From 978c0665b869101fbcaf1cf75e696a7f1b3345c5 Mon Sep 17 00:00:00 2001 From: Issac Kelly Date: Tue, 15 Jul 2014 14:02:31 -0700 Subject: [PATCH] Custom User model changes. --- helpdesk/urls.py | 6 +++--- helpdesk/views/staff.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 9ea4fb99..caa1d3f5 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -160,11 +160,11 @@ urlpatterns += patterns('helpdesk.views.public', ) urlpatterns += patterns('', - url(r'^rss/user/(?P[\.\@A-Za-z0-9_-]+)/$', + url(r'^rss/user/(?P[^/]+)/$', login_required(feeds.OpenTicketsByUser()), name='helpdesk_rss_user'), - - url(r'^rss/user/(?P[\.\@A-Za-z0-9_-]+)/(?P[A-Za-z0-9_-]+)/$', + + url(r'^rss/user/(?P[^/]+)/(?P[A-Za-z0-9_-]+)/$', login_required(feeds.OpenTicketsByUser()), name='helpdesk_rss_user_queue'), diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 0a8a33cf..e491c2d8 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -237,9 +237,9 @@ def view_ticket(request, ticket_id): return update_ticket(request, ticket_id) if helpdesk_settings.HELPDESK_STAFF_ONLY_TICKET_OWNERS: - users = User.objects.filter(is_active=True, is_staff=True).order_by('username') + users = User.objects.filter(is_active=True, is_staff=True).order_by(User.USERNAME_FIELD) else: - users = User.objects.filter(is_active=True).order_by('username') + users = User.objects.filter(is_active=True).order_by(User.USERNAME_FIELD) # TODO: shouldn't this template get a form to begin with?