Django 1.11 made a major change to widget rendering.  I am wondering if this 
would help you significantly in your quest.  The widget is rendered with a  
template.  It would seem you could include the JavaScript in that template.

But you are right; it is quite frustrating when I'm going to the admin page for 
a model with a foreign key, and it takes 2 minutes to render because it's 
rendering the string for 100,000 records to put in a select box.  Then I have 
to go back and change them to raw ID fields so that such attempts do not stop 
me from working efficiently.  Perhaps the Django team can reconsider that 
feature.

And, yes, that looks like the feature I was looking for.  I will try updating 
my project soon.  I do prefer the autocomplete light widget over the select2 
widget.



-----Original Message-----
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Jamesie Pic
Sent: Monday, April 17, 2017 11:26 AM
To: django-users@googlegroups.com
Subject: Re: Django forks

Nice to meet you Matthew <3 That's really funny, because the reason I'm 
currently in this is because I'm trying to honor a promise I made to the 
community (and myself tbh ^^) when I abandoned v2 in favor of v3.

v2 has really sound features, "just make an autocomplete for this model by 
default", helped a lot.

But, the code that did that was too much work because it was a lot of working 
around Django internals. Do you have any idea, the effort it was, to maintain 
this at all ?

https://github.com/yourlabs/django-autocomplete-light/blob/v2/autocomplete_light/forms.py

Even then, you had to use a custom modelform, when it should just be a default, 
I mean, are you **ever** going to want a select box to render with a million 
options ? No, no, no a thousand times no, right ? ;)

About the feature you're missing in v3, it seems like one of the most recent 
features that was contributed:

http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#autocompleting-based-on-a-list-of-strings

Is that what you're talking about ?

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op19jWZsJr2oHEDJ4HMPFUdjFKdcEpyMP2QXNmrRaqzmYYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7bb3740cdf9348d0a29cfc493f3dc2cf%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

Reply via email to