On Mon, 16 Feb 2015 15:03:05 -0800 (PST)
Jani Kajala <kaj...@gmail.com> wrote:

> Hi all,
> 
> I have tons of objects referenced by ForeignKey in Django Admin module UI, 
> and I would like to replace it with something more optimal, e.g. auto-fill 
> input box or something.
> 
> My model looks something like this:
> 
> class SoapCall(models.Model):
>     customer = models.ForeignKey(Customer, null=True, blank=True)
>     created = models.DateTimeField(default=now)
>     wsdl = models.CharField(max_length=255)
>     func = models.CharField(max_length=63)
>     request = models.TextField()
>     response = models.TextField()
> 
> Now, this works great, but if I have 100000 Customer objects it's not very 
> nice to generate one huge <select><option>... element for every page load.
> 
> There seems to be many possible plugins/implementations for this, but I was 
> just wondering if anyone would have up-to-date recommendations in this 
> mailing list. I'm on Python 3.4.2 and Django 1.7.4.

I would start with built-in implementation, a.k.a. rawid_id_fields 
<https://docs.djangoproject.com/en/1.7/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields>


-- 
Jani Tiainen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20150217091921.132995e2%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to