python3 fixes for djsngo admin pages

This commit is contained in:
Philip Sargent
2020-05-31 22:35:36 +01:00
parent c863bf6e1d
commit f949bb8dc0
3 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import os.path
import re
import django.db.models
from django.db.models import Min, Max
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, render_to_response
@@ -49,7 +50,7 @@ def personindex(request):
# From what I can tell, "persons" seems to be the table rows, while "personss" is the table columns. - AC 16 Feb 09
personss = [ ]
ncols = 4
nc = (len(persons) + ncols - 1) / ncols
nc = int((len(persons) + ncols - 1) / ncols)
for i in range(ncols):
personss.append(persons[i * nc: (i + 1) * nc])