python - Why is "django.core.context_processors.request" not enabled by default? -
i troubleshooting problem obtaining request obj new project , realized "django.core.context_processors.request" commented in vanilla installs of django.
like title suggests, why seemingly helpful context processor turned off default?
- is issue performance?
- is issue security?
- is somehow redundant?
some mild searching has not turned me, thought i'd ask here.
this question. docs note processor not enabled default; you’ll have activate it.
no explanation.
my take on due django's intense desire separate view logic template.
the request object gateway data view logic built (given browser sent us, x, y, z) - therefore allowing in templates akin giving template huge amounts of control should placed in view under normal circumstances. idea populate template context specifics, not everything.
removing them more encouragement "most things should done in view". common django.contrib
apps don't rely on it, if it's not required default.
and of course, that's further proof request object isn't necessary in template except special use cases.
that's take, anyways.
Comments
Post a Comment