[Django]-Use context processor only for specific application

1👍

In my case, I want my context processor to run only when admin dashboard is hit otherwise not. So I have implemented something like

def custom_context_processor(request,*args,**kwargs):
if '/' in request.META['PATH_INFO']:
    return {"something"}
else:
    #do something

This one worked for me

Leave a comment