Title: Problem with models.HORIZONTAL in admin inline editing
I’m seeing different behavior for filter_interface=models.HORIZONTAL when I’m editing inline vs. adding an object directly. I’ve tried to boil this down to a short model that demonstrates the problem:

from django.db import models

class Company(models.Model):
    company_name = models.CharField('Company name', maxlength=40)
    comments = models.CharField(maxlength=200, blank=True)
    class Admin:
        pass

class Traveler(models.Model):
    name = models.CharField(maxlength=30, core=True)
    ppnum = models.CharField(maxlength=20, blank=True)
    class Admin:
        pass

class Trip(models.Model):
    company = models.ForeignKey('Company', core=True)
    start_date = models.DateField()
    class Admin:
        pass

class Leg(models.Model):
    trip = models.ForeignKey('Trip', edit_inline=models.STACKED, num_in_admin=1)
    traveler = models.ManyToManyField('Traveler', filter_interface=models.HORIZONTAL, blank=True)
    arr = models.CharField(maxlength=4, core=True)
    class Admin:
        pass

A Trip belongs to a Company, a Leg belongs to a Trip, and a Traveler belongs to zero or more Legs. If I add a Leg via the admin pages, the selection of travelers is a very nice widget showing “available travelers” and “chosen travelers”. This is very easy to use, and I especially like the incremental search/filter. The users I’ve shown it to really like it also.

The way my users will interact, though, is that they’ll start adding a trip, and add legs inline with the trip. When the Trip add screen comes up in admin, there’s no available vs. chosen widget, just a single multiple-select menu.

What can I change to get the available/chosen widget when I’m adding a Leg at the same time as a trip?

P.S. Django 0.95, Python 2.4.2. MySQL backend (5.x), Whitebox Linux 3.0 (Redhat Enterprise 3.0 clone).

Thanks in advance for any ideas. I’m really trying to stay with the automatically-generated admin pages.

Cheers!
--
David Hancock | [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to