Ok I managed to get filter_vertical working, thanks.

Now how can I populate the filter_vertical panel in admin with the data in 
the table?

A piece of my model is:
class Position(models.Model):
    POSITIONS = (('GK', 'Goalkeeper'), ('DFC', 'Defender Central'), ('SW', 
'Sweeper'),
                 ('DFL', 'Defender Left'), ('DFR', 'Defender Right'),
                 ('WBL', 'Wing Back Left'), ('WBR', 'Wing Back Right'),
                 ('DM', 'Defender Midfielder'), ('MR', 'Midfielder Right'), 
('ML', 'Midfielder Left'),
                 ('MC', 'Midfielder Center'), ('AMC', 'Attacking Midfielder 
Center'), ('AML', 'Attacking Midfielder Left'),
                 ('MC', 'Attacking Midfielder Right'), ('ST', 'Striker')) 
    position_name = models.CharField(max_length=

50, choices=POSITIONS)
    def __unicode__(self):
        return self.position_name

class Player(models.Model):
        ........
        ........
        role = models.ManyToManyField(Position)
       .........

in admin:
class PlayerAdmin(admin.ModelAdmin):
        .......
        .......
        filter_vertical = ('role')

I want that in PlayerAdmin I have the choices POSITIONS values listed.

What I should have is something like the image at the following link, with 
the choices POSITIONS listed on the left panel.

image <http://db.tt/nef8uTU8>


Il giorno lunedì 2 luglio 2012 15:26:07 UTC+2, ledzgio ha scritto:
>
> In default admin panel, under group permissions, I saw a double panels 
> where I can add an element from the left list panel to the right one 
> instead of selecting multiple elements by holding CTRL. I would like to 
> have this panel implementation in my admin with my models, how can I do 
> that?
>
> thanks
>

-- 
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/-/YYXBCPoJd4oJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to