--- a/pytask/profile/forms.py Sat Jan 08 14:04:08 2011 +0530
+++ b/pytask/profile/forms.py Sat Jan 08 14:41:09 2011 +0530
@@ -89,7 +89,7 @@
class Meta:
model = Profile
- fields = ['full_name', 'aboutme', 'gender', 'dob', 'address', 'phonenum']
+ exclude = ['pynts', 'rights']
class EditProfileForm(forms.ModelForm):
--- a/pytask/profile/regbackend.py Sat Jan 08 14:04:08 2011 +0530
+++ b/pytask/profile/regbackend.py Sat Jan 08 14:41:09 2011 +0530
@@ -1,14 +1,14 @@
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
- data.update({"user": user, "uniq_key": make_key(Profile)})
+ data = request.POST.copy()
+ data.update({"user": user.id, "uniq_key": make_key(Profile)})
form = CreateProfileForm(data)
- form.is_valid()
form.save()
user_registered.connect(user_created)