diff options
author | Dan McGee <dan@archlinux.org> | 2011-11-21 17:08:23 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-11-21 17:08:23 +0100 |
commit | 85657db05d7f65604340699cfcb9967c9e81a0ef (patch) | |
tree | f46f3903be174d7e1e726a4226384e664f111828 /public | |
parent | 2cb4f97bb235217d6e56deded1444f5e84f08b71 (diff) | |
download | archweb-85657db05d7f65604340699cfcb9967c9e81a0ef.tar.gz archweb-85657db05d7f65604340699cfcb9967c9e81a0ef.tar.xz |
Better support for non-latin full names
Add a 'latin_name' field to the user profile so we can better support
those developers with names in non-Latin scripts, and yet still show a
Latin name as necessary on the developer profile page. This field only
shows up if populated.
Also, use consistent sorting everywhere- rather than using username,
always use first_name and last_name fields.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/views.py b/public/views.py index 14dd635..c28fd30 100644 --- a/public/views.py +++ b/public/views.py @@ -34,13 +34,15 @@ USER_LISTS = { } def userlist(request, user_type='devs'): - users = User.objects.order_by('username').select_related('userprofile') + users = User.objects.order_by( + 'first_name', 'last_name').select_related('userprofile') if user_type == 'devs': users = users.filter(is_active=True, groups__name="Developers") elif user_type == 'tus': users = users.filter(is_active=True, groups__name="Trusted Users") elif user_type == 'fellows': - users = users.filter(is_active=False, groups__name__in=["Developers", "Trusted Users"]) + users = users.filter(is_active=False, + groups__name__in=["Developers", "Trusted Users"]) else: raise Http404 |