Hi All,

I'm creating an application to track field-trial results for hounds.
Does anyone know of an easy way to edit multiple related tables inline
on one form in the Admin app?

Ideally, I want the hound "Groupings" edited inline with trials (which
works as expected), but I also want the "Standings" to be edited inline
with the "Groupings" (as they are added)... all on the same form. This
is where I have hit the wall.

Currently the admin gives me one or the other, but not both. If I come
in at the "Trial" level in admin, I can specify the groupings just fine
using the edit_inline argument. Likewise, if I come it at the
"Grouping" level in admin, I can add the standings just fine. Ideally,
I would like to edit everything on the same form to avoid binding the
standings manually to the trial in the admin.

In short, is there a way to edit_inline all three objects/tables from
one form?

Thanks in advance
Darin Lee

- - - -

Here is a shortened version of my model:

class Trial (models.Model):
    location = models.ForeignKey(Club, help_text='Select the hosting
club')
    common_name = models.CharField('Event Name', maxlength=100,
blank=True)
    start_date_time = models.DateTimeField('Starting Date and Time')
    end_date_time = models.DateTimeField('Ending Date and Time')
    presiding_secretary = models.ForeignKey(Beagler,
verbose_name="Secretary")
    class Admin: pass

class Grouping (models.Model):
    trial = models.ForeignKey(Trial)
    type = models.CharField(maxlength=12, choices=CLASS_TYPES,
core=True)
    num_entries = models.IntegerField('Entries in Class', core=True)
    num_starters = models.IntegerField('Actual Starters in Class',
core=True)
    class Admin: pass

class Standing (models.Model):
    trialclass = models.ForeignKey(Grouping,
edit_inline=models.TABULAR, num_in_admin=5)
    rank = models.IntegerField(core=True, choices=RANK)
    hound = models.ForeignKey(Hound,core=True)
    handler = models.ForeignKey(Beagler, core=True)
    awarded_points = models.IntegerField(core=True, editable=False)


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to