This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask_rest_api import Blueprint | |
| class ClassfulBlueprint(Blueprint): | |
| """A subclass of flask_rest_api.Blueprint that stores endpoint documentation | |
| not using :meth: `Blueprint.route` but instead with :meth: `Blueprint.add_url_rule`. | |
| Since :meth: `Blueprint.route` should never be used from a `ClassfulBlueprint` | |
| instance, it throws an error if you try to call it. | |
| """ | |
| def __getattribute__(self, name): | |
| if name in ['route']: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python2 | |
| # Copyright (C) 2016 Sixten Bergman | |
| # License WTFPL | |
| # | |
| # This program is free software. It comes without any warranty, to the extent | |
| # permitted by applicable law. | |
| # You can redistribute it and/or modify it under the terms of the Do What The | |
| # Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |