summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/utils.py2
-rw-r--r--public/views.py11
2 files changed, 6 insertions, 7 deletions
diff --git a/public/utils.py b/public/utils.py
index 5900c674..30c76ac1 100644
--- a/public/utils.py
+++ b/public/utils.py
@@ -1,6 +1,6 @@
from operator import attrgetter
-from main.models import Arch, Package, Repo
+from main.models import Arch, Package
from main.utils import cache_function, groupby_preserve_order, PackageStandin
class RecentUpdate(object):
diff --git a/public/views.py b/public/views.py
index 821e4d5c..14dd6353 100644
--- a/public/views.py
+++ b/public/views.py
@@ -5,7 +5,6 @@ from . import utils
from django.conf import settings
from django.contrib.auth.models import User
-from django.db.models import Q
from django.http import Http404
from django.views.generic import list_detail
from django.views.generic.simple import direct_to_template
@@ -34,18 +33,18 @@ USER_LISTS = {
},
}
-def userlist(request, type='devs'):
+def userlist(request, user_type='devs'):
users = User.objects.order_by('username').select_related('userprofile')
- if type == 'devs':
+ if user_type == 'devs':
users = users.filter(is_active=True, groups__name="Developers")
- elif type == 'tus':
+ elif user_type == 'tus':
users = users.filter(is_active=True, groups__name="Trusted Users")
- elif type == 'fellows':
+ elif user_type == 'fellows':
users = users.filter(is_active=False, groups__name__in=["Developers", "Trusted Users"])
else:
raise Http404
- context = USER_LISTS[type].copy()
+ context = USER_LISTS[user_type].copy()
context['users'] = users
return direct_to_template(request, 'public/userlist.html', context)