Commit 4c1cbbad authored by Serge S. Koval's avatar Serge S. Koval

Allow expose_plugview chaining

parent 8a1472ad
......@@ -34,7 +34,13 @@ def expose_plugview(url='/'):
.. versionadded:: 1.0.4
"""
def wrap(v):
return expose(url, v.methods)(v.as_view(v.__name__))
handler = expose(url, v.methods)
if hasattr(v, 'as_view'):
return handler(v.as_view(v.__name__))
else:
return handler(v)
return wrap
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment