Simple question. I have bunch of django views. Is there a way to tell django that for each view, use foo(view)
instead? Example:
Instead of writing
@foo
@bar
@baz
def view(request):
# do something
all the time, I'd like to have
def view(request):
markers = ['some', 'markers']
and hook this into django:
for view in all_the_views_in_my_app:
view = do_something_based_on_the_marker(view)
I'd like to have this done at server startup time. Any thoughts?