mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 17:42:21 +01:00
small fixes
This commit is contained in:
@ -107,11 +107,6 @@ CACHES = {
|
||||
'LOCATION': '/var/tmp/MarietjeDjango_cache/default',
|
||||
'OPTIONS': {'MAX_ENTRIES': 1500},
|
||||
},
|
||||
'userstats': {
|
||||
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
||||
'LOCATION': '/var/tmp/MarietjeDjango_cache/default',
|
||||
'OPTIONS': { 'MAX_ENTRIES': 1500 },
|
||||
},
|
||||
}
|
||||
|
||||
AUTH_USER_MODEL = 'marietje.User'
|
||||
|
||||
@ -216,7 +216,7 @@ def user_stats(request):
|
||||
total_played_uploads += x['total']
|
||||
total_played_user_uploads += x['user_total']
|
||||
most_played_uploads_list = sorted(most_played_uploads, key=lambda x: (x['song__artist'], x['song__title']))
|
||||
most_played_uploads_list = sorted(most_played_uploads_list, key=lambda x:x["total"], reverse=True)[:settings.STATS_TOP_COUNT]
|
||||
most_played_uploads_list = sorted(most_played_uploads_list, key=lambda x: x["total"], reverse=True)[:settings.STATS_TOP_COUNT]
|
||||
return {
|
||||
'last_updated': last_updated,
|
||||
'total_uploads': total_uploads,
|
||||
|
||||
Reference in New Issue
Block a user