How can I create a relationship between two models, using a ForeignKey
in the second to take advantage of the Admin interface ability to add
an arbitrary number of them, but then also have the ability to create a
public view for adding objects based off the first model AND the
second?
So:
class ModelA(models.Model):
first_name = models.CharField(...)
last_name = models.CharField(...)
class ModelB(models.Model):
model_a = models.ForeignKey(ModelA, edit_inline=models.STACKED,
num_in_admin=4)
field_of_interest = models.CharField(...)
The above example works great for the Admin interfact, but how can I
access the ModelB fields via
django.views.generic.create_update.create_object and
django.views.generic.create_update.update_object? Is it even possible,
or will I need to create a custom view?
If I do have to create a custom view, how can I add two manipulators to
access the POST data to validate both objects?
Thanks,
Dave Worley
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---