Skip to content

Tests: Language chooser middleware warning during tests #2742

Closed

Description

@JacobCoffee

Investigate separately these non-failing warnings

......................../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
  warnings.warn(
............................................................/usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
  warnings.warn(
../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
  warnings.warn

Originally posted by @JacobCoffee in #2741 (comment)

Activity

  1. added
    help-wantedThe maintainers would welcome help with this issue
    good-first-issueThis is good for newcomers to take on
    testsRelates to the test suite
    on Jun 13, 2025
  2. EmmanuelBerkowicz commented on Jul 6, 2025

    @EmmanuelBerkowicz

    Hi @JacobCoffee ,
    I'd like to request assignment to this issue. I'm building experience in Python/Django through open source contributions and this looks like a great learning opportunity.
    My understanding: The admin_interface package is throwing warnings because it expects LocaleMiddleware in the MIDDLEWARE settings for its language chooser functionality. The solution would be to either add the required middleware or configure the package to disable the language chooser if internationalization isn't needed.
    Thanks!
    Emmanuel.
    P.S I am working full time so please let me know if there is a deadline to work towards

  3. kimyag commented on Aug 20, 2025

    @kimyag

    Hi @JacobCoffee,
    The warnings were due to missing pieces:

    1. LocaleMiddleware in the middleware stack
    2. The set_language URL in the root URLConf
      I’ve added both locally and the warnings are gone. If nobody else is working on this, would it be alright if I open a PR with the fix?
  4. mimi800-debug commented on Sep 19, 2025

    @mimi800-debug

    Hi @JacobCoffee 👋
    I noticed that outbound links take more than 5 seconds to navigate to.
    You might find our free AI Dev Toolkit helpful – it can auto-fix bugs, generate docs, and optimize code in seconds:
    https://rapidapi.com/mimi800-mimi800-default/api/master-dev-api

  5. prabhath004 commented on Oct 30, 2025

    @prabhath004

    @JacobCoffee Hi , Is this issue still open I would like to work on this please let me know!

  6. added a commit that references this issue on Feb 1, 2026
    c17d6e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueThis is good for newcomers to take onhelp-wantedThe maintainers would welcome help with this issuetestsRelates to the test suite

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions