Remove the remaining occurences of uniq_key.
--- a/pytask/profile/regbackend.py Tue Jan 18 21:59:20 2011 +0530
+++ b/pytask/profile/regbackend.py Tue Jan 18 22:01:02 2011 +0530
@@ -1,15 +1,15 @@
-from pytask.profile.models import Profile
from pytask.profile.forms import CreateProfileForm
-from pytask.utils import make_key
from registration.signals import user_registered
+
def user_created(sender, user, request, **kwargs):
-
data = request.POST.copy()
- data.update({"user": user.id, "uniq_key": make_key(Profile)})
+ data.update({
+ "user": user.id,
+ })
form = CreateProfileForm(data)
form.save()
+
user_registered.connect(user_created)
-
--- a/pytask/profile/utils.py Tue Jan 18 21:59:20 2011 +0530
+++ b/pytask/profile/utils.py Tue Jan 18 22:01:02 2011 +0530
@@ -9,7 +9,7 @@
"""
user_notifications = user.notification_sent_to.filter(is_deleted=False).order_by('sent_date')
- current_notifications = user_notifications.filter(uniq_key=nid)
+ current_notifications = user_notifications.filter(pk=nid)
if user_notifications:
current_notification = current_notifications[0]