Question

How do I change the Pinax account app to get information like First name, Last Name? Since I cant find any particular solution is better to use django- registration. I am a newbie to django Pinax

here is the forms.py file

from django import forms
from django.forms.extras.widgets import SelectDateWidget

import account.forms
from django.forms.widgets import Widget


class SignupForm(account.forms.SignupForm):

    birthdate = forms.DateField(widget=SelectDateWidget(years=range(1910, 1991)))
    firstname = forms.CharField()





from .forms import SignupForm


class SignupView(account.views.SignupView):

    form_class = SignupForm

    def after_signup(self, form):
        self.create_profile(form)
        super(SignupView, self).after_signup(form)

    def create_profile(self, form):
        profile = self.created_user.profile

        profile.birthdate = form.cleaned_data["birthdate"]
        profile.save()
Was it helpful?

Solution

I dint notice but Visit http://django-user-accounts.readthedocs.org/en/latest/usage.html had the answer to the above question

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top