my question is: Should I use a template context handler for a global variable, such as a list of categories?
I have globs.py
from news.models import Category def globs(request): cats = Category.objects.all() return {'cats': cats}
and in settings.py
TEMPLATE_CONTEXT_PROCESSORS = ("django.core.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "globs.globs",)
And when I use "cats" in the template, it works fine on the development server.
I have a problem on my hosting: Error importing arrays of request processor modules: "There is no module named globs"
Can I use something else for global variables?
source share