Re: Nested Foreign Key relationships in Admin?
I too have a similar issue. Any workarounds to achieve this...
On Saturday, 16 December 2006 09:52:39 UTC+5:30, Dan wrote:
I'd like to represent foreign key relationships inside the Admin--
interface when there are multiple nested one-to-many relationships.
Here's a simple example model to demonstrate, using the
edit_inline=models.TABULAR parameter:__________
class Root(models.Model):
name = models.CharField(maxlength=200)
class Admin:
passclass Model2(models.Model):
root = models.ForeignKey(Root, edit_inline=models.TABULAR,
num_in_admin=3)
description = models.CharField(maxlength=2048, core=True) class Model3(models.Model):
model2 = models.ForeignKey(Model2, edit_inline=models.TABULAR,
num_in_admin=3)
description = models.CharField(maxlength=500, core=True) __________
In the admin, when editing an instance of "Root", I can create/edit
associated "Model2" rows inline, but there is no inline interface or
link to create or view "Model3" rows. Is there a techinique available
to handle this? Strictly speaking, I don't necessarily need the nested
view to appear on the same page, as a link to the "Model3" view would
suffice.I'm just getting my feet wet with Django, and I am very impressed!
Thanks for any possible insight.Dan
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/y9nS1y2IyP8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home