From 5afe7eb6bef5a710350a384999ec4250139b4248 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 14 Feb 2024 18:21:03 +0100 Subject: [PATCH] Add FAQ for custom `LocaleMiddleware` warning. #354 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index bed18e8..e07d014 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,16 @@ CACHES = { You can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add `{% extends "admin_interface:admin/base_site.html" %}` to your `base_site.html` +### Custom `LocaleMiddleware` warning +> I'm using a `django.middleware.locale.LocaleMiddleware` subclass, but I see an unnecessary warning for missing `django.middleware.locale.LocaleMiddleware`, what can I do? + +You can simply ignore the warning (this has been discussed [here](https://github.com/fabiocaccamo/django-admin-interface/issues/354)) +```python +import warnings + +warnings.filterwarnings("ignore", module="admin_interface.templatetags.admin_interface_tags") +``` + ### Language Chooser not showing > I have enabled the **Language Chooser**, but it is not visible in the admin, what should I do?