Signals with update()

18 views
Skip to first unread message

Yoo

unread,
Jun 25, 2019, 10:34:25 AM6/25/19
to Django users
Hi, I have a problem with updating in Django signals regarding a specific use-case hierarchy:


Hi, so here's the problem: once the objects for Public1 are created, I need to update each object in the queryset of Private1 of a1 to have their publicized_id be equal to the new object's id. Like a ForeignKey. So for Object 1 of a1, a new record in Public1 should be made that have the exact same fields as Object 1; this new record will be called NewObj 1. So, once the new record is saved, I need to update Object 1's publicized_id to be equal to the id of NewObj1. This goes on forever with Object 2 having publicized_id equal to NewObj 2's id. Maybe, instead of publicized_id being a CharField, it can be a ForeignKey?


How would I implement this update() into the signal?

Yoo

unread,
Jun 25, 2019, 3:13:24 PM6/25/19
to Django users
If what I said is confusing, let me know where. I've been stuck on this for a looonngg time. 
Reply all
Reply to author
Forward
0 new messages