Django how to pass custom variables to context to use in custom admin template?

class MyModelAdmin(admin.ModelAdmin): … def changelist_view(self, request, extra_context=None): extra_context = extra_context or {} extra_context[‘some_var’] = ‘This is what I want to show’ return super(MyModelAdmin, self).changelist_view(request, extra_context=extra_context) See: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.changelist_view

creating my own context processor in django

The context processor you have written should work. The problem is in your view. Are you positive that your view is being rendered with RequestContext? For example: def test_view(request): return render_to_response(‘template.html’) The view above will not use the context processors listed in TEMPLATE_CONTEXT_PROCESSORS. Make sure you are supplying a RequestContext like so: def test_view(request): return … Read more