Thats' because by default Django will name the field "model_set" on the
reverse relationship. So if you want to access it that way, you should
do entry.updates_set.all(). A nicer, more readable way, is to set
related_name on the ForeignKey. E.g: entry = models.ForeignKey(Entry,
I have an app that I'm building and I've run into a problem. I have 2
models "Entries" and "Updates" which points to "Entries" with a
ForeignKey. The idea is that an entry can be updated at multiple times
and I track the date and other meta information of the update within
the update model.
When
2 matches
Mail list logo