Added class style to decorators that can be applied to view classes
This commit is contained in:
parent
e44da64ed4
commit
cf19939379
1 changed files with 4 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ class use_kwargs(use_args):
|
||||||
use_args.__init__(self, schema, **kwargs)
|
use_args.__init__(self, schema, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class doc(object):
|
class Doc(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
|
|
||||||
|
|
@ -121,8 +121,9 @@ class doc(object):
|
||||||
update_spec(f, self.kwargs)
|
update_spec(f, self.kwargs)
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
doc = Doc
|
||||||
|
|
||||||
class tag(object):
|
class Tag(object):
|
||||||
def __init__(self, tags):
|
def __init__(self, tags):
|
||||||
if isinstance(tags, str):
|
if isinstance(tags, str):
|
||||||
self.tags = [tags]
|
self.tags = [tags]
|
||||||
|
|
@ -136,6 +137,7 @@ class tag(object):
|
||||||
update_spec(f, {"tags": self.tags})
|
update_spec(f, {"tags": self.tags})
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
tag = Tag
|
||||||
|
|
||||||
class doc_response(object):
|
class doc_response(object):
|
||||||
def __init__(self, code, description=None, **kwargs):
|
def __init__(self, code, description=None, **kwargs):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue