Rodrigo,
I've found this to be a common use-case among many projects of mine.
The admin becomes completely unusable if you have hundreds of
thousands of possibilities for ForeignKey and/or ManyToMany
relations. I've created a `ModelAdmin` (newforms-admin) subclass
called `LimitedRelatedAdmin` th
Richard,
I see your point, but there could be many, many issues for each
magazine, and over a hundred magazines total, so I don't want to make
the users wade through a few thousand issues each time. I'd like to be
able to drill down, first pick a magazine, then one of its issues.
What I'm thinki
This is where I would suggest you rethink your data model. Is there a
reason to link Article to both Issues and Magazine?
Why not something like:
Issues has FK (magazine) to Magazine
Articles has FK (issue) to Issues
Issues could be configured to return its magazine.title and
self.issue_number
I have 3 models: Magazine, Issue and Article.
Each Magazine has 1 or more Issues and each Issue has 1 or more
Articles.
Article has models.ForeignKey(Issue) and models.ForeignKey(Magazine).
Issue has models.ForeignKey(Magazine)).
In the admin, when creating a new article, I choose which Magazine i
4 matches
Mail list logo