title: Django: Add birthday to a user profile
body: <p>I have a Register view for new users. Here the new user enters his E-Mail-address and Password (each twice), his first and his last name and his Birthday. Everything is working fine (it saves email address, Password and names), but I am not able to save his birthday with this form.</p>
  <p>I can add the date when logged in in /admin and there the date is saved.</p>
  <p>forms.py:</p>
  <pre><code>class UserRegisterForm(forms.ModelForm): 
      username=forms.EmailField(label='Email address')
      email=forms.EmailField(label='Confirm Email')
      password=forms.CharField(widget=forms.PasswordInput)
      password2=forms.CharField(widget=forms.PasswordInput)
      first_name=forms.CharField(label='First Name')
      last_name=forms.CharField(label='Last Name')
      birthday=forms.DateField(label='Birthday')
      class Meta:
          model=User
          fields=[
             'username',
             'email',
             'password',
             'password2',
             'first_name',
             'last_name',
             'birthday',
          ]
      def clean(self,*args,**kwargs):
          username=self.cleaned_data.get(&quot;username&quot;)
          email=self.cleaned_data.get(&quot;email&quot;)
          password=self.cleaned_data.get(&quot;password&quot;)
          password2=self.cleaned_data.get(&quot;password2&quot;)
          username=self.cleaned_data.get(&quot;username&quot;)
          birthday=self.cleaned_data.get(&quot;birthday&quot;)
          if username!=email:
              raise forms.ValidationError(&quot;Emails must match&quot;)
          email_qs=User.objects.filter(username=username)
          if email_qs.exists():
              raise forms.ValidationError(&quot;This Email has already been registered&quot;)
          if password!=password2:
              raise forms.ValidationError(&quot;Passwords must match&quot;)
          return super(UserRegisterForm,self).clean(*args,**kwargs)
  </code></pre>
  <p>models.py:</p>
  <pre><code> class UserTest(models.Model):
        username=models.OneToOneField(User, on_delete=models.CASCADE)
        email=models.EmailField(User)
        first_name=models.CharField(max_length=20)
        last_name=models.CharField(max_length=20)
        birthday=models.DateField(auto_now=False, null=True, blank=True)
  
        def __str__(self):
            return self.username.username
   
   def create_profile(sender, **kwargs):
       if kwargs['created']:
           user_profile=UserTest.objects.create(username=kwargs['instance'])
   
   post_save.connect(create_profile,sender=User)
  </code></pre>
  <p>views.py</p>
  <pre><code>def register_user_view(request):
      title=&quot;Register User&quot;
      form=UserRegisterForm(request.POST or None)
      if form.is_valid():
          user=form.save(commit=False)
          password=form.cleaned_data.get('password')
          birthday=form.cleaned_data.get('birthday')
          user.save(password)
          user.set_password(password)
          user.save()
          new_user=authenticate(username=user.username,password=password)
          login(request,user)
          return redirect(&quot;/register/done&quot;)
      context={
          &quot;form&quot;:form,
          &quot;title&quot;:title
      }
      return render(request,&quot;form.html&quot;,context)
  </code></pre>
  <p>Where exactly do I have to enter something (what?) more?</p>