diff --git a/www/conservancy/__init__.py b/www/conservancy/__init__.py index dba7ab716b934932260d77d0feb544b890c43668..1a64ad37c44a5aa12e40cde924561e2a11276270 100644 --- a/www/conservancy/__init__.py +++ b/www/conservancy/__init__.py @@ -1,14 +1,13 @@ -from past.builtins import basestring from builtins import object import hashlib from django.conf import settings -from django.template import RequestContext # This is backwards compatibilty support for a custom function we wrote # ourselves that is no longer necessary in modern Django. from django.shortcuts import render as render_template_with_context + class ParameterValidator(object): def __init__(self, given_hash_or_params, params_hash_key=None): if params_hash_key is None: @@ -17,7 +16,7 @@ class ParameterValidator(object): self.given_hash = given_hash_or_params.get(params_hash_key) seed = getattr(settings, 'CONSERVANCY_SECRET_KEY', '').encode('utf-8') self.hasher = hashlib.sha256(seed) - if isinstance(self.given_hash, basestring): + if isinstance(self.given_hash, str): self.hash_type = type(self.given_hash) else: self.hash_type = type(self.hasher.hexdigest())