| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the following review:
https://github.com/bbangert/routes/commit/0a417004be7e2d950bdcd629ccf24cf9f56ef817
Routes 2.3 has changed the function signature to mandate
path in addition to routename for the connect method.
In this patch, we try to get back to path being optional by
checking the length of the args list. No other change in
logic.
This hopefully fixes the problem reported here:
https://github.com/bbangert/routes/issues/64
Add an entry in Changelog as well.
|
|
|
|
|
| |
Problem occurred when new subdomain was left substring of current one.
In this case subdomain was not replaced.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for ``requirements`` option to mapper.resource,
which makes it possible to restrict matching in urls (most often
useful for capturing variables with path_prefix).
In OpenStack Nova we've used the prefix_path on Mapper.resource to
specify additional variables we want to capture (specifically
{project_id}). Project_id is a uuid. When trying to restrict
project_id to only valid uuid format a couple of issues were exposed.
- #1 '/{project_id:[a-f0-9]{32}}/...' builds an incorrect regex
because of the nested {}
- #2 the preferred method that works on connect() to pass
requirements doesn't work here (requirements are reset to only an
id match)
That leaves us with having to build a custom project_id match with 32
[a-f0-9] strings appended for every resource added to get the support
we need without effectively vendoring our own version of Mapper.resource.
This small change to allow requirements to pass through would make it
possible to get this tighter validation with much smaller regexes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code now works on Python 2 and Python 3 without modifications: 2to3
is no more needed. Changes:
* Drop 2to3 from setup.py: the code is now directly compatible with
Python 2 and Python 3
* Add dependency to six
* Drop support for Python 3.2: remove 3.2 from .travis.yml
* Replace "for key, value in dict.iteritems():" with "for key, value in
six.iteritems(dict):"
* Use six.moves.urllib to get urllib functions
* Replace unicode() with six.text_type()
* Replace dict.keys() with list(dict.keys())
* Replace "dict.has_key(key)" with "key in dict"
* Remove "py3where=build" from notests section of setup.cfg
* Add parenthesis to print()
* Replace dict.items() with list(dict.items())
|
|
|
|
| |
route. Fixes #11.
|
|
|
|
|
| |
'anchor'. They can now be passed in with a trailing '_' as was possible
before commit d1d1742903fa5ca24ef848a6ae895303f2661b2a. Fixes #7.
|
|
|
|
|
|
| |
failing to return the appropriate cached URL generation. The URL cache
should always include the SCRIPT_NAME, even if its empty, in the cache
to avoid this, and now does. Fixes #6.
|
| |
|
|\
| |
| | |
Allow for a large number of URL matches
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently routes/regex raises an OverflowError when compiling a master
list of 'valid' URLs if the number of controllers/routes is extremely
high. This error can be worked around by assuming all URLs are good
until all matches have been tested.
This means that on large projects performance will be slightly
increased with valid requests and slightly decreased with invalid
requests.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
|
| |
* Added to regex to allow excaped dots in urls
* Added tests to make sure escaped dots work and
dont clobber the existing format strings
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
URL's and the singleton is not present.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
including the appropriate slash. Fixes #13.
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
Fixes #24.
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
* Return explicit to being default to True.
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
doesn't break url_for users.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|\
| |
| |
| |
| | |
--HG--
branch : trunk
|
| |
| |
| |
| |
| | |
--HG--
branch : trunk
|
| |
| |
| |
| |
| | |
--HG--
branch : trunk
|
| |
| |
| |
| |
| | |
--HG--
branch : trunk
|
| |
| |
| |
| |
| | |
--HG--
branch : trunk
|
|/
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
in a single regexp match should none of the routes match.
--HG--
branch : trunk
|
|
|
|
|
|
|
|
|
|
| |
names in addition to a callable.
* Route object now takes a name parameter, which is the name it responds to.
This name is automatically added when called by using Mapper's connect
class method.
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
recognition.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
(transplanted from 25b1574b12770fa9998a79093d34f73c298a2421)
--HG--
branch : trunk
extra : transplant_source : %25%B1WK%12w%0F%A9%99%8Ay%09%3D4%F7%3C%29%8A%24%21
|