FAQ | This is a LIVE service | Changelog

Investigate and resolve django middleware directory warning

As a developer, 
I want to investigate the `UserWarning` regarding the missing middleware directory 
to determine its cause and implement an appropriate resolution or suppression, 
ensuring a clean and clear development exp.

Background

While running the application, the following warning is observed:

/home/rjw57/projects/uis/devops/iam/activate-account/api/.tox/py3/lib/python3.12/site-packages/django/core/handlers/base.py:61: UserWarning: No directory at: /home/rjw57/projects/uis/devops/iam/activate-account/api/build/py3/static/
  mw_instance = middleware(adapted_handler)

Acceptance Criteria

  • Investigate the root cause of the warning.
  • Verify whether this behavior is new or pre-existing.
  • Propose a resolution, which could include:
    • Adding the warning to the filterwarnings list in pytest.ini.
    • Configuring Django or the middleware to handle static directories appropriately.
  • Implement the chosen resolution and validate that the warning is resolved or safely suppressed.
Edited by Eugene E.