@@ -367,6 +367,8 @@ def project_versions(request, project_slug):
367
367
368
368
Shows the available versions and lets the user choose which ones to build.
369
369
"""
370
+ max_inactive_versions = 100
371
+
370
372
project = get_object_or_404 (
371
373
Project .objects .protected (request .user ),
372
374
slug = project_slug ,
@@ -385,7 +387,8 @@ def project_versions(request, project_slug):
385
387
version_filter = request .GET .get ('version_filter' , '' )
386
388
if version_filter :
387
389
inactive_versions = inactive_versions .filter (verbose_name__icontains = version_filter )
388
- inactive_versions = inactive_versions [:100 ]
390
+ total_inactive_versions_count = inactive_versions .count ()
391
+ inactive_versions = inactive_versions [:max_inactive_versions ]
389
392
390
393
# If there's a wiped query string, check the string against the versions
391
394
# list and display a success message. Deleting directories doesn't know how
@@ -405,6 +408,8 @@ def project_versions(request, project_slug):
405
408
'inactive_versions' : inactive_versions ,
406
409
'active_versions' : active_versions ,
407
410
'project' : project ,
411
+ 'max_inactive_versions' : max_inactive_versions ,
412
+ 'total_inactive_versions_count' : total_inactive_versions_count ,
408
413
},
409
414
)
410
415
0 commit comments