I am using page processors to use some dynamic data on some pages. I have successfully used this on some URL like 'test' but when I try to use it on home page it doesn't work.
Code :
Working ->
@processor_for("test")
def page_slug_processor(request, page):
return HttpResponseRedirect("/events/")
Doesn't work ->
@processor_for("/")
def page_slug_processor(request, page):
return HttpResponseRedirect("/events/")
Can someone tell me the correct way to do this .
Thanks
Edit :
Actually first one is working fine but in second case it doesn't work means I don't know whether that processor is called or not because it doesn't print anything , neither raise any error or Exception , So I doubted that it doesn't read the home slug or may be I have defined it in wrong way. Basically my requirement is to run a page processor on home URl ("/").