[Python] Django overwriting save_related & copying from linked sql tables

Discussão em 'Python' iniciado por Stack, Maio 30, 2025.

  1. Stack

    Stack Membro Participativo

    In django python, I am able to overwrite the save_related function (when save_as = True) so the instance I am trying to copy is saved and copied properly. When I save, though, I want other objects in other tables linked by an ID in the sql database that should be copied when the.

    For example we have table A, and I can copy instances in A, but I need B, a related sql table to A, to duplicate in B's table where a's id is equal to b's id.

    Continue reading...

Compartilhe esta Página