To get some insight, I'd try bisecting to find the Django commit where the 
behavior changed:
https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression

On Wednesday, June 28, 2017 at 7:10:35 AM UTC-4, Drunkard Zhang wrote:
>
> Hi, fellows:
>
> I was running python-3.4+django-1.9.13 previous, and upgrading to 
> python-3.6+django-1.11.2, while testing, I found that my limit_choices_to 
> function not working now, here's detail.
>
> I'm using a middleware to get current user who is accessing my site, and 
> use it in limit_choices_to function, to provide different filter based on 
> current user. This works great with python-3.4 + django-1.9.13; and using 
> django-crispy-forms to render user forms.
>
> After upgraded to python-3.6+django-1.11, limit_choices_to function didn't 
> called when I opened a USER EDIT FORM (by adding print() to the function), 
> but it still works with django admin.
>
> So the question is:
> 1. The difference of init procedures between django 1.9.13 and 1.11.2? 
> Because 1.9.13 won't exec limit_choices_to function on init, while 1.11.2 
> does.
> 2. Where should I fix the problem? django init settings, my form, or even 
> django-crispy-forms?
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/9924fb7c-e67f-4b0e-9589-9a8e2f8b549f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to