Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
return CustomRegistrationForm
""" Given a username, firstname, lastname, email address and password, register a new user account, which will initially be inactive.
See django-registration docs for more info """ username, email, password, first, last = kwargs['username'], kwargs['email'], kwargs['password1'], \ kwargs['first_name'], kwargs['last_name'] if Site._meta.installed: site = Site.objects.get_current() else: site = RequestSite(request) new_user = RegistrationProfile.objects.create_inactive_user(username, email, password, site) new_user.first_name = first new_user.last_name = last new_user.is_active = False webreg_group = Group.objects.get(name=settings.GROUP_REGISTERED_BY_WEB) new_user.groups.add(webreg_group) new_user.save() signals.user_registered.send(sender=self.__class__, user=new_user, request=request) return new_user |