On Tue, Feb 17, 2009 at 4:50 PM, João Olavo Baião de Vasconcelos < joaool...@gmail.com> wrote:
> On Tue, Feb 17, 2009 at 5:15 PM, Alex Gaynor <alex.gay...@gmail.com>wrote: > >> Sure, what you're doing will be similar to the way it works for a foreign >> key, but you're dealing with multiple values, so it'll be something like >> this: >> http://dpaste.com/121833/ >> You'll need to test this out to make sure it works, but it should :). > > > Great, Alex!! =D > It was almost correct! It was missing just 1 line: > """ > def label_for_value(self, value): > * value = [int(v) for v in value.split(',')]* > objs = self.rel.to._default_manager.filter(pk__in=value) > return ' <strong>%s</strong>' % > ', '.join(truncate_words(obj, 14) for obj in objs) > """ > > Now i think it's perfect! > > Does it worth a new ticket? ;D > > -- > João Olavo Baião de Vasconcelos > Bacharel em Ciência da Computação > Analista de Sistemas - Infraestrutura > joaoolavo.wordpress.com > > > > Feel free to file one, the worst thing that could happen is it will get closed :) . Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---