diff options
author | Leif Johansson <leifj@sunet.se> | 2010-07-07 22:15:37 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2010-07-07 22:15:37 +0200 |
commit | 5a58664f5cf03995c6f35f71812cfcf5637ba76e (patch) | |
tree | 09e25792f621e85ab4948663ede8c49aa440f5ce /coip/apps/userprofile | |
parent | 75d3084f8e1bf30df65b5c221388218c05fa5933 (diff) |
break out nonce and anonymous id methods - they need better implementations
Diffstat (limited to 'coip/apps/userprofile')
-rw-r--r-- | coip/apps/userprofile/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coip/apps/userprofile/views.py b/coip/apps/userprofile/views.py index 36f6a48..fe943d8 100644 --- a/coip/apps/userprofile/views.py +++ b/coip/apps/userprofile/views.py @@ -6,12 +6,12 @@ Created on Jul 6, 2010 from django.contrib.auth.decorators import login_required from coip.apps.userprofile.models import PKey from django.http import HttpResponseRedirect -from uuid import uuid4 from coip.multiresponse import respond_to from coip.apps.membership.models import Membership from coip.apps.userprofile.utils import user_profile from django.core.exceptions import ObjectDoesNotExist from pprint import pprint +from coip.apps.auth.utils import nonce @login_required def merge(request,pkey=None): @@ -26,7 +26,7 @@ def merge(request,pkey=None): return HttpResponseRedirect("/user/home") else: profile = profile(request) - k = PKey(profile=profile,key=uuid4().hex) + k = PKey(profile=profile,key=nonce()) k.save() return HttpResponseRedirect("/accounts/login?next=/user/merge/"+k.key) |