author | Nishanth Amuluru <nishanth@fossee.in> |
Sat, 08 Jan 2011 14:43:40 +0530 | |
changeset 78 | 09178605d59e |
parent 77 | c63a9519dc37 |
permissions | -rw-r--r-- |
75 | 1 |
from pytask.profile.models import Profile |
2 |
from pytask.profile.forms import CreateProfileForm |
|
77 | 3 |
from pytask.utils import make_key |
75 | 4 |
|
5 |
from registration.signals import user_registered |
|
6 |
||
7 |
def user_created(sender, user, request, **kwargs): |
|
8 |
||
77 | 9 |
data = request.POST.copy() |
10 |
data.update({"user": user.id, "uniq_key": make_key(Profile)}) |
|
75 | 11 |
form = CreateProfileForm(data) |
12 |
form.save() |
|
13 |
||
14 |
user_registered.connect(user_created) |
|
15 |