On Fri, Oct 10, 2008 at 4:02 PM, NoviceSortOf <[EMAIL PROTECTED]> wrote:

>
>
> I'm trying to add first_name and last_name to the registration form.
>
> Under class RegistrationForm(forms.Form)
>
> I add
>
>   first_name = forms.RegexField(regex=r'^\w+$',
>                                max_length=30,
>
> widget=forms.TextInput(attrs=attrs_dict),
>                                label=_(u'First Name'))
> ...same for last name....
>
> Then I attempt to add under the save function,
> to add first_name and last_name
>
> def save(self, profile_callback=None):
> new_user =
>
> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
>
> password=self.cleaned_data['password1'],
>
> first_name=self.cleaned_data['first_name'],
>
> last_name=self.cleaned_data['last_name'],
>
> email=self.cleaned_data['email'],
>
> profile_callback=profile_callback)
>
> This though returns an error,
>
> I try a couple of other syntactical permutations of last_name and
> first_name with
> out much luck. I can get first and last name to appear in the form,
> but can't get
> them to save.
>
> What steps am I missing?
>

Well, you missed telling us exactly what the error is you get.  I could take
a wild guess and speculate that you are modifying your models without
updating the database, but that's a wild guess.  Specifics of the error you
see would help people help you.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to