TemplateView class and process_template_response problem
Hi All
i have a middleware that override the response.template_name variable
class MyMiddleware(object):
def process_template_response(self,request, response):
response.template_name = ("%s/%s"%("admin",request.template_name))
the view is very easy
class Admin_HomeView(TemplateView):
template_name = "home.html"
and i catch an error
'WSGIRequest' object has no attribute 'template_name'
the response have no the template_name attribute
what is wrong?
thank's and have a nice day
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/LgLow7MLNyYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home