middlewares in blog¶
blog.middleware¶
middlewares for blog app.
-
class
blog.middleware.
SetBloggerByHostMiddleware
(get_response)[source]¶ automatic set request
blogger
property according to request Host.for example:
if the Host request-header field is _cosven.me_, then the middle set
request.blogger
to ‘cosven’ according to a BloggerHostMap.a BloggerHostMap is predefined in
blog.consts
.