Monday, February 16, 2015

drop-in replacement for admin module foreign key relation UI

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.

Thanks beforehand. :) 


Br,
Jani

P.S. <3 Django

--
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+unsubscribe@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/caa4bd7b-47c1-4c30-af00-8793d819f976%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment