djangosnippets.org: Latest snippets posted by kuchinhttp://djangosnippets.org/users/kuchin/2010-07-20T06:16:20.208602-05:00kuchinMiddleware to resolve current URL to module and view
2010-07-20T06:16:20.208602-05:00kuchinhttp://djangosnippets.org/snippets/2116/<p>Add it to MIDDLEWARE_CLASSES and you will get request.current_view getting values like "connection.views.index" or "django.views.static.serve" - one example usage is to show different help text based on current view name.
</p>
<p>EDIT: actually, you can use process_view middleware function where you automatically get current_view as first parameter.
</p>
Freely redistributable