Hermano Cabral
unread,Jul 3, 2016, 10:20:40 AM7/3/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hello guys and gals,
Assuming a simple django project where you have models Author and Book (pseudo code):
Author:
- Name = char field
- Birthdate = date field
Book:
- Name = char field
- Author = foreign key (Author)
Is there a way to freeze books in a way that changes to an author are not propagated to its books? I know I can denormalize the Book model to accomplish that, but I'm looking for another way to do that. I tried using some of the versioning apps out there but none of them work well for my case.
The scenario I have is that some of my models cannot be changed after they are entered into the system, for example, if the "Bible" Book is entered into the system with the Author "Jedus Christ", when someone catches the typo and changes the Author name to "Jesus Christ" the Book "Bible" would still need to have "Jebus Christ" as it's Author.
Thanks.
Sent from my iPhone