Use "raw_id_field" useful when you have a Foreign Key on another model
with lots of records. This changes the default interface from the a
select box to a custom widget
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Fabio Natali wrote:
> gearheart wrote:
>
>> maybe limit_choices_to is what you're looking for
>> i had similar problem and solved with ajax autocomplete widget.
>>
>
> I haven't yet get rid of those too-much-long inline drop down menus.
>
> I was thinking to use js to open up a window and
gearheart wrote:
> maybe limit_choices_to is what you're looking for
> i had similar problem and solved with ajax autocomplete widget.
I haven't yet get rid of those too-much-long inline drop down menus.
I was thinking to use js to open up a window and let the user choose
from some hyerarchical
maybe limit_choices_to is what you're looking for
i had similar problem and solved with ajax autocomplete widget.
On Oct 27, 1:47 pm, paolofdr <[EMAIL PROTECTED]> wrote:
> Hello everybody,
> I have a similar problem: a too long drop-down menu inside an inline
> element in the admin page.
> Is it
Hello everybody,
I have a similar problem: a too long drop-down menu inside an inline
element in the admin page.
Is it possible to limit the items displayed in the drop-down list,
filtering them by the value of other fields?
Thank you
Paolo
On 23 Ott, 18:37, Fabio Natali <[EMAIL PROTECTED]> wro
Dear Lars, thank you very much for your kind and fast reply.
Lars Stavholm wrote:
[...]
> Have you tried filter_horizontal?
> http://docs.djangoproject.com/en/dev/ref/contrib/admin/#filter-horizontal
I am not sure I can really use filter_horizontal in my scenario. The
actual structure I am using
Fabio Natali wrote:
> Fabio Natali wrote:
> [...]
>> class Prod2(models.Model):
>> name = models.CharField(max_length=30)
>>
>> class Prod1(models.Model):
>> name = models.CharField(max_length=30)
>> belongs_to = models.ForeignKey(Prod2)
>>
>> class Prod0(models.Model):
>> name = m
Fabio Natali wrote:
[...]
> class Prod2(models.Model):
> name = models.CharField(max_length=30)
>
> class Prod1(models.Model):
> name = models.CharField(max_length=30)
> belongs_to = models.ForeignKey(Prod2)
>
> class Prod0(models.Model):
> name = models.CharField(max_length=30)
Hi everybody.
In my admin page I have a field for a foreign key with hundreds of
items. That results in a drop down menu which is very difficult and
annoying to use.
This is my models.py:
class Prod2(models.Model):
name = models.CharField(max_length=30)
class Prod1(models.Model):
name
9 matches
Mail list logo