Its Django 1.7, I have User model with date_joined
field. I have another related model Userprofile
. Also, the database is already existing with few thousand entries already.
Now, i want to add this date_joined
field to userprofile
date_joined = models.DateTimeField(auto_now_add=True, null=True)
And for the already existing rows in the Userprofile model, i want to put the value already there in the User model.
Although i can write a simple function to do this, I was curious if there is a simpler way to do that through models directly during creating that column only.