The situation:
I have a database with thousands of users.
I have created a new application called ‘my_app‘.
my_app has one object called ‘my_Object‘.
my_object has an a relation one_to_one with the Django User.
class my_object(models.Model):
user = models.OneToOneField(User)
My question is:
How can I create a register for all users already on the database? I know I can use post_save for the new ones, but how can I relate / connect this new object backwards?
Thanks!
Run a SQL query in your favorite database manager that creates records for all the existing
Userrecords.