pytask/profile/regbackend.py
author Nishanth Amuluru <nishanth@fossee.in>
Sun, 09 Jan 2011 19:45:42 +0530
changeset 129 13e171f09941
parent 77 c63a9519dc37
permissions -rw-r--r--
added unpublished tasks to home_page

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)})
    form = CreateProfileForm(data)
    form.save()

user_registered.connect(user_created)