~cofob/AlfisViewer

6297c250316bfd50962d4ab1a159a07e94e8a52f — cofob 4 months ago 41a5349
Fixed latest domain info
2 files changed, 5 insertions(+), 3 deletions(-)

M alfisviewer/utils.py
M domain/views.py
M alfisviewer/utils.py => alfisviewer/utils.py +4 -2
@@ 25,7 25,9 @@ def serve_file(file, content_type):


def get_page(curr, max_val):
    out = curr / max_val
    if curr % max_val == 0 and curr > 0:
    if curr == 0:
        return 1
    out = int(curr / max_val)
    if curr % max_val == 0:
        out -= 1
    return out

M domain/views.py => domain/views.py +1 -1
@@ 30,7 30,7 @@ def domain(request, domain_id):
            do = Domain.objects.get(hash=d, zone=z)
    except Domain.DoesNotExist:
        raise Http404
    d_lst = Domains.select().filter(identity=unhexlify(do.hash))
    d_lst = reversed(list(Domains.select().filter(identity=unhexlify(do.hash))))
    for d in d_lst:
        data = json.loads(d.data)
        data_str = json.dumps(data, indent=2)