user1328021
user1328021

Reputation: 9850

Overriding Account/context_processors.py (Pinax/Django)

I'm trying to override the default Account/context_processors.py for the Pinax project.

However, each time I try, it can't find the file and continues to use the default.

The path of the file in the default project is: pinax/apps/account/context_processors.py

I have tried placing a custom version of context_processors.py it in the following locations in my project:

  1. myapp/apps/account/context_processors.py
  2. myapp/account/context_processors.py
  3. myapp/pinax/context_processors.py

I assumed that the first would have been the way to go.

What am I doing wrong?

Upvotes: 0

Views: 462

Answers (1)

okm
okm

Reputation: 23871

Django relies on TEMPLATE_CONTEXT_PROCESSORS to locate and import context processor. It's a bit different from the behavior of template searching.
So override TEMPLATE_CONTEXT_PROCESSORS in settings file to change "pinax.apps.account.context_processors.account" to your import path.

Upvotes: 1

Related Questions