fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dragging in excercises
[redakcja.git]
/
apps
/
catalogue
/
templatetags
/
book_list.py
diff --git
a/apps/catalogue/templatetags/book_list.py
b/apps/catalogue/templatetags/book_list.py
index
f7e7047
..
46cf87a
100755
(executable)
--- a/
apps/catalogue/templatetags/book_list.py
+++ b/
apps/catalogue/templatetags/book_list.py
@@
-125,9
+125,14
@@
def book_list(context, user=None):
new_context = {"viewed_user": user}
else:
filters = {}
new_context = {"viewed_user": user}
else:
filters = {}
- new_context = {"users": User.objects.annotate(
+ new_context = {
+ "users": User.objects.annotate(
count=Count('chunk')).filter(count__gt=0).order_by(
count=Count('chunk')).filter(count__gt=0).order_by(
- '-count', 'last_name', 'first_name')}
+ '-count', 'last_name', 'first_name'),
+ "other_users": User.objects.annotate(
+ count=Count('chunk')).filter(count=0).order_by(
+ 'last_name', 'first_name'),
+ }
new_context.update({
"filters": True,
new_context.update({
"filters": True,