summaryrefslogtreecommitdiff
path: root/pecan/rest.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Allow users to specify custom path segments for routing."Jenkins2015-05-211-1/+30
|\
| * Allow users to specify custom path segments for routing.Ryan Petrello2015-05-211-1/+30
| | | | | | | | Change-Id: I3f998d62c2f188818a747f1aa91beb9439ed77a2
* | Properly raise HTTP 405 (and specify Allow headers) for RestControllerRyan Petrello2015-05-211-7/+26
|/ | | | | | | Change-Id: Id790efc75c8207eb61d74e9b2242b310ccd62ab1 Depends-On: Ieffa3fddc3c8d3152742455ca46d69bcc7208d69 Closes-bug: #1334690 Closes-bug: #1450109
* Properly handle Python3 Unicode path segments in pecan routing.Ryan Petrello2015-05-071-8/+19
| | | | | Change-Id: I3890d73a087f7635ddc51b71d3d6f68a41058c42 Closes-Bug: 1451842
* Improve argspec detection and leniency for wrapped controllers.Ryan Petrello2014-09-241-2/+2
| | | | | | | | | | | | | | | | Pecan makes abundant use of `inspect.getargspec`, but unless you're very meticulous in the decorators you wrap your controllers with, the original argspec is not persisted (and pecan functionality can break in various ways). When a controller is decorated in a way that breaks argspec, we should instead attempt to locate the *actual* argspec for the method (not the wrapped function) and use it. Additionally, when controllers are missing **kwargs in the method signature to map optional GET and POST arguments, we shouldn't consider that a non-routable offense (an HTTP 400); instead, we should just *not* pass extraneous arguments to the function. Change-Id: I47fe0496ff6aa105359ee8e5b99f6c80476cc2e9
* When path arguments are incorrect for RestController, return HTTP 404, not 400.Ryan Petrello2014-09-241-1/+4
| | | | | | | | | When RestController encounters a mismatch between function signatures and positional URL chunks (e.g., /authors/books vs /authors/1/books), it shouldn't raise an HTTP 400; the issue is a nonexistant URL path, not the structure of the request/body itself. Change-Id: I6637f88b7da4f09497f905ebafa7bf1e3788151a
* Catch an edge case in RestController routing and properly return an HTTP 400.Ryan Petrello2014-08-251-9/+19
| | | | Change-Id: I0e57cf719a2c3372ebc61efe71a832b0482a0a3e
* Be gracious in deprecation of method signatures related to threadlocal removal.Ryan Petrello2014-06-251-8/+44
| | | | | | | | | | Certain OpenStack projects that use pecan have overridden private methods of `pecan.rest.RestController` for custom behavior, and these method signatures are changing in the next release of pecan to support optional threadlocals. As good citizens, let's give these projects a deprecation period to get their implementations back in sync with upstream pecan. Change-Id: I02823c7fb79488aea0dd8ad3266aa7f0024bc4a0
* Add support for Pecan *without* thread local request/response objectsRyan Petrello2014-05-281-45/+61
| | | | Change-Id: I5a5a05e1f57ef2d8ad64e925c7ffa6907b914273
* Work around another obscure RestController edge case that should raise a 404.Ryan Petrello2014-04-231-0/+6
| | | | | | Fixes bug 1311147 Change-Id: I3dd0986c458902b03ed140872fc1938b06e75f4b
* Fix a trailing slash bug for `RestController`s that have a `_lookup` method.Ryan Petrello2014-02-191-3/+3
| | | | Change-Id: Ibefa6742d0411b8cb8ae1592c8b1ca077088c5e6
* Fix a trailing slash bug for `RestController`s that have a `_lookup` method.Ryan Petrello2014-02-131-0/+4
| | | | | Change-Id: Ibd025fc52d37f58644de23cf283afd8d4d55e2d1 Closes-Bug: #1280003
* Fix several bugs for RestControllerRyan Petrello2013-12-041-19/+38
| | | | | | | | Resolve several bugs in RestController that occur when the URL ends in a trailing slash. Change-Id: I6439ee9e45b715b0bea57e9af9124675376d0c9d Fixes-bug: 1250566
* Merge remote-tracking branch 'origin/next' into py3kRyan Petrello2013-05-071-2/+35
|\ | | | | | | | | | | Conflicts: pecan/rest.py pecan/routing.py
| * Add support for ``_lookup`` methods as a fallback in RestController.Ryan Petrello2013-03-191-2/+35
| |
* | Correct relative imports.Ryan Petrello2013-04-301-4/+4
|/
* Fix a bug in DELETE methods in two (or more) nested RestControllers.Ryan Petrello2013-03-121-1/+7
|
* pep8 complianceRyan Petrello2012-10-291-3/+3
|
* pep8 love.Ryan Petrello2012-03-301-6/+6
|
* API documentation for pecan_rest.Pete2012-03-281-2/+11
| | | | A bit more descriptive docstring and fixed link.
* API Documentation.Pete2012-03-271-8/+29
| | | | | | | | Filled in missing DocStrings. TODO: fix interpolation of docstrings from pecan.rest into pecan_rest.html. Sphinx is refusing to do so even though docs/source/pecan_rest.rst looks good. It could be getting confused by the presence of docs/source/rest.rst.
* Fixing a RESTController routing bug.Ryan Petrello2012-03-111-2/+2
|
* After a full-scale scan with pep8.py and pyflakes, identified andJonathan LaCour2012-03-111-37/+50
| | | | resolved most of our PEP8 compliance issues.
* Fixing a schema validation bug related to specialized RestController routing.Ryan Petrello2011-08-211-2/+10
| | | | https://github.com/pecan/pecan/issues/13
* Merging pecan-env into masterYoann Roman2011-03-081-5/+2
|\
| * Moving all Pecan request properties into a Pecan config object to keep ↵Yoann Roman2011-03-061-5/+2
| | | | | | | | WebOb's Request object cleaner
* | A beginning for docstrings on pecan.rest. I'll let Yoann tackleJonathan LaCour2011-03-061-0/+5
|/ | | | the rest of this.
* Leaving the _method workaround for htmlfill useYoann Roman2011-01-251-6/+0
|
* Fixing a bug with sub-nested REST controllers and returning rest module to ↵Yoann Roman2011-01-211-1/+1
| | | | 100% coverage
* Standardizing storage of request metadata on request objectYoann Roman2011-01-211-2/+8
|
* create util module with functions shared across filesMark McClain2011-01-201-1/+2
|
* Fixing bugs and returning RestController to 100% test coverageYoann Roman2011-01-071-14/+19
|
* Filling out functionality for RestController and first set of tests for itYoann Roman2011-01-071-31/+149
|
* renaming pecan.py to core.pyMark McClain2011-01-041-2/+2
|
* Added support for the "_method" parameter in RESTController.Jonathan LaCour2010-11-171-5/+6
|
* Fixed a bug in the JSON templating engine.Jonathan LaCour2010-11-171-0/+1
|
* Adding missing file. Oops!Jonathan LaCour2010-10-251-0/+41