Wednesday, May 23, 2018

LocaleMiddleware ignored when custom 404 handler is set

Hello!

I'm using urls with i18n_patterns with LocaleMiddleware  and  custom 404 error handler. When I try to open any url without a language code an error 404 is returned by custom 404 handler. I see process_response in LocaleMiddleware is not run in this case, so redirect to default language doesn't work.

How can I fix this?

Thanks.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a6fec1c0-58dc-4fe4-9af1-c6fee8c95e58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment