How do you wrap the view of a 3rd-party app (let's call the view to wrap "view2wrap" and the app "3rd_party_app") so you can do some custom things before the app does its thing?
I've set urls.py to capture the correct url:
url( r'^foo/bar/$', view_wrapper, name='my_wrapper'),
I've created my custom view:
from 3rd_party_app.views import view2wrap
def view_wrapper(request, *args, **kwargs):
# Do some cool custom stuff
return view2wrap(request, *args, **kwargs)
When I try this, I get the error "No module named 3rd_party_app.views". Why?