Alastair McCormack Alastair McCormack - 1 month ago 15
Python Question

"No module named djangomako.middleware" from Intellij developed Django app

When developing a Python application using Intellij, I get:

No module named djangomako.middleware


when trying to access pages through the development HTTP server.

Answer

IntelliJ automatically adds Mako as an Middleware application to settings.py.

To fix:

  1. Edit <application name>/settings.py
  2. Find MIDDLEWARE_CLASSES definition
  3. Remove 'djangomako.middleware.MakoMiddleware' from list