From 5eee020da0b36596354c0a128f56c6e5c31cbc4f Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 17 Feb 2020 14:02:47 -0500 Subject: [PATCH] long --- libraryauth/models.py | 4 ++-- libraryauth/templatetags/libraryauthtags.py | 2 +- marc/views.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraryauth/models.py b/libraryauth/models.py index 42f46577..eb4a04f7 100644 --- a/libraryauth/models.py +++ b/libraryauth/models.py @@ -102,13 +102,13 @@ def ip_to_long(value): validators.validate_integer(value[i]) lower_validator(value[i]) upper_validator(value[i]) - output += long(value[i]) * (256**(3-i)) + output += int(value[i]) * (256**(3-i)) return output def long_to_ip(value): validators.validate_integer(value) - value = long(value) + value = int(value) validators.MinValueValidator(0)(value) validators.MaxValueValidator(4294967295)(value) diff --git a/libraryauth/templatetags/libraryauthtags.py b/libraryauth/templatetags/libraryauthtags.py index bcf29581..d95ce4b8 100644 --- a/libraryauth/templatetags/libraryauthtags.py +++ b/libraryauth/templatetags/libraryauthtags.py @@ -9,7 +9,7 @@ def libname(value): returns library name . """ try: - vl = long(value) + vl = int(value) lib = models.Library.objects.get(pk=vl) return lib.__str__() except models.Library.DoesNotExist: diff --git a/marc/views.py b/marc/views.py index 37cd2acb..6c07c1d0 100644 --- a/marc/views.py +++ b/marc/views.py @@ -58,14 +58,14 @@ def marc_records(request, selected_records=None): elif hasattr(record_name, 'edition'): record = models.MARCRecord(edition=record_name.edition) elif record_name.startswith('edition_'): - record_id = long(record_name[8:]) + record_id = int(record_name[8:]) try: edition = Edition.objects.get(pk=record_id) except Edition.DoesNotExist: continue record = models.MARCRecord(edition=edition) elif record_name.startswith('record_'): - record_id = long(record_name[7:]) + record_id = int(record_name[7:]) try: record = models.MARCRecord.objects.get(id=record_id ) except models.MARCRecord.DoesNotExist: