Hi I have a customUserProfile model which I will be using for storing user data specific to my app:
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
...
def __unicode__(self):
return self.user.username
I am using django-registration to resister and login users.
My question is – what is the best way to auto-save a UserProfile object when an auth.User is saved? I can assume that all custom fields on the UserProfile model can be saved as null and updated later.
Any help much appreciated.
Django Signals could be a good option. So, whenever the User object is saved it would create an User Profile