This file contains 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
""" | |
For Pylons 0.97, optionally with asplake's Routes fork with {.format} parameter support | |
1) fill_render(), a render() that encodes repeating groups properly | |
2) A refactored @validate with | |
a) JSON support | |
b) cleaned-up form_errors that render properly in the presence of repeating groups | |
c) some possibility of extensibility | |
3) JSON-related helpers: sent_json(), accepts_json(), render_json() | |
4) formatted_url(), a url() that remembers any format extension on the request | |
5) BaseSchema, a formencode.Schema with sensible defaults |
This file contains 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
""" | |
UPDATED 2010-03-02 - remove duplicated on_get handling, incorporate simplifications from Pylons 1.0b | |
For Pylons 0.97 with asplake's Routes fork with {.format} parameter support | |
1) fill_render(), a render() that encodes repeating groups properly | |
2) A refactored @validate with | |
a) JSON support | |
b) cleaned-up form_errors that render properly in the presence of repeating groups | |
c) some possibility of extensibility | |
3) JSON-related helpers: sent_json(), accepts_json(), render_json() |
This file contains 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
# Changes to your config/middleware.py: | |
# -from pylons.wsgiapp import PylonsApp | |
# +from pylons.wsgiapp import PylonsApp as _PylonsApp | |
# +from webob.exc import HTTPMethodNotAllowed, HTTPNotFound, HTTPOk | |
# Then: | |
methods = ['GET', 'PUT', 'POST', 'DELETE'] | |
This file contains 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
"Fixes and enhancements to Routes 1.11 - see http://positiveincline.com/?p=561" | |
# NB: superceded by http://bitbucket.org/asplake/routes/ | |
import routes.mapper | |
COLLECTION_ACTIONS = ['index', 'create', 'new'] | |
MEMBER_ACTIONS = ['show', 'update', 'delete', 'edit'] | |
class SubMapperParent(object): |