git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made DateTimeField implementation for Gilbert more naive to avoid confusing autofill...
[philo.git]
/
contrib
/
sobol
/
utils.py
diff --git
a/contrib/sobol/utils.py
b/contrib/sobol/utils.py
index
723a463
..
3c5e537
100644
(file)
--- a/
contrib/sobol/utils.py
+++ b/
contrib/sobol/utils.py
@@
-1,8
+1,8
@@
from django.conf import settings
from django.http import QueryDict
from django.utils.encoding import smart_str
from django.conf import settings
from django.http import QueryDict
from django.utils.encoding import smart_str
-from django.utils.hashcompat import sha_constructor
from django.utils.http import urlquote_plus, urlquote
from django.utils.http import urlquote_plus, urlquote
+from hashlib import sha1
SEARCH_ARG_GET_KEY = 'q'
SEARCH_ARG_GET_KEY = 'q'
@@
-11,7
+11,7
@@
HASH_REDIRECT_GET_KEY = 's'
def make_redirect_hash(search_arg, url):
def make_redirect_hash(search_arg, url):
- return sha
_constructor
(smart_str(search_arg + url + settings.SECRET_KEY)).hexdigest()[::2]
+ return sha
1
(smart_str(search_arg + url + settings.SECRET_KEY)).hexdigest()[::2]
def check_redirect_hash(hash, search_arg, url):
def check_redirect_hash(hash, search_arg, url):