forked from orbit-oss/flask
Adds provide_automatic_options to Class-based Views
This commit is contained in:
parent
c8e56d5807
commit
75f537fb87
2 changed files with 41 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ class View(object):
|
|||
#: A list of methods this view can handle.
|
||||
methods = None
|
||||
|
||||
#: Setting this disables or force-enables the automatic options handling.
|
||||
provide_automatic_options = None
|
||||
|
||||
#: The canonical way to decorate class-based views is to decorate the
|
||||
#: return value of as_view(). However since this moves parts of the
|
||||
#: logic from the class declaration to the place where it's hooked
|
||||
|
|
@ -99,6 +102,7 @@ class View(object):
|
|||
view.__doc__ = cls.__doc__
|
||||
view.__module__ = cls.__module__
|
||||
view.methods = cls.methods
|
||||
view.provide_automatic_options = cls.provide_automatic_options
|
||||
return view
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue