summaryrefslogtreecommitdiff
path: root/CHANGELOG
blob: 8b1b0d5a4d4e972b31cdab3e9891f8643fb3a7f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Routes Changelog
========================

-- 1.5.2 (Oct. 16th, 2006)
* Added fully_qualified keyword option to url_for to have it generate a full
  URL. Resolves #29.
* Fixed examples in url_for doc strings so they'll be accurate.

-- 1.5.1 (Oct. 4th, 2006)
* Fixed bug with escaping part names in the regular expression, reported by
  James Taylor.

-- 1.5 (Sept. 19th, 2006)
* Significant updates to map.resource and unit tests that comb it thoroughly
  to ensure its creating all the proper routes (it now is). Increased unit
  testing coverage to 95%.
* Added unit tests to ensure controller_scan works properly with nested
  controller files and appropriately scans the directory structure. This
  brings the Routes util module up to full code coverage.
* Fixed url_for so that when the protocol is changed, port information is
  removed from the host.
* Added more thorough testing to _RequestConfig object and the ability to
  set your own object. This increases testing coverage of the __init__ module
  to 100%.
* Fixed bug with sub_domain not maintaining port information in url_for and
  added unit tests. Reported by Jonathan Rosebaugh.
* Added unit tests to ensure sub_domain option works with named routes, cleaned
  up url_for memory argument filtering. Fixed bug with named routes and sub_domain
  option not working together, reported by Jonathan Rosebaugh.
* Changed order in which sub-domain is added to match-dict so it can be used
  in a conditions function.

-- 1.4.1 (Sept. 6th, 2006)
* Added sub_domains option to mapper, along with sub_domains_ignore list for 
  subdomains that are considered equivilant to the main domain. When sub_domains
  is active, url_for will now take a sub_domain option that can alter the host
  the route will go to.
* Added ability for filter functions to provide a _host, _protocol, _anchor arg
  which is then used to create the URL with the appropriate host/protocol/anchor
  destination.
* Patch applied from Ticket #28. Resolves issue with Mapper's controller_scan
  function requiring a valid directory argument. Submitted by Zoran Isailovski.

-- 1.4 (July 21, 2006)
* Fixed bug with map.resource related to member methods, found in Rails version.
* Fixed bug with map.resource member methods not requiring a member id.
* Fixed bug related to handling keyword argument controller.
* Added map.resource command which can automatically generate a batch of routes intended
  to be used in a REST-ful manner by a web framework.
* Added URL generation handling for a 'method' argument. If 'method' is specified, it
  is not dropped and will be changed to '_method' for use by the framework.
* Added conditions option to map.connect. Accepts a dict with optional keyword args
  'method' or 'function'. Method is a list of HTTP methods that are valid for the route.
  Function is a function that will be called with environ, matchdict where matchdict is
  the dict created by the URL match.
* Fixed redirect_to function for using absolute URL's. redirect_to now passes all args to
  url_for, then passes the resulting URL to the redirect function. Reported by climbus.

-- 1.3.2 (April 30th, 2006)
* Fixed _filter bug with inclusion in match dict during matching, reported by David Creemer.
* Fixed improper url quoting by using urllib.encode, patch by Jason Culverhouse.

-- 1.3.1 (April 4th, 2006)
* Mapper has an optional attribute ``append_slash``. When set to ``True``, any URL's
  generated will have a slash appended to the end. 
* Fixed prefix option so that if the PATH_INFO is empty after prefix regexp, its set to
  '/' so the match proceeds ok.
* Fixed prefix bug that caused routes after the initial one to not see the proper url
  for matching. Caught by Jochen Kupperschmidt.

-- 1.3 (Feb. 25th, 2006)
* url_for keyword filters:
  - Named routes can now have a _filter argument that should specify a function that takes
    a dict as its sole argument. The dict will contain the full set of keywords passed to
    url_for, which the function can then modify as it pleases. The new dict will then be
    used as if it was the original set of keyword args given to url_for.
* Fixed Python 2.3 incompatibility due to using keyword arg for a sort statement
  when using the built-in controller scanner.

-- 1.2 (Feb. 17th, 2006)
* If a named route doesn't exist, and a url_for call is used, instead of using the
  keyword arguments to generate a URL, they will be used as query args for the raw
  URL supplied. (Backwards Incompatible)
* If Mapper has debug=True, using match will return two additional values, the route
  that matched, if one did match. And a list of routes that were tried, and information
  about why they didn't pass.
* url_for enhancements:
  - Can now be used with 'raw' URL's to generate proper url's for static content that
    will then automatically include SCRIPT_NAME if necessary
  - Static named routes can now be used to shortcut common path information as desired.
* Controller Scanner will now sort controller names so that the longest one is first. This
  ensures that the deepest nested controller is executed first before more shallow ones to
  increase predictability.
* Controller Scanner now scans directories properly, the version in 1.1 left off the
  directory prefix when created the list of controllers.
    (Thanks to Justin for drawing my attention to it)

-- 1.1 (Jan. 13th, 2006)
* Routes Mapper additions:
  - Now takes several optional arguments that determine how it will 
    generate the regexp's.
  - Can now hold a function for use when determining what the available
    controllers are. Comes with a default directory scanner
  - Given a directory for the default scanner or a function, the Mapper
    will now automatically run it to get the controller list when needed
* Syntax available for splitting routes to allow more complex route paths, such
  as ':controller/:(action)-:(id).html'
* Easier setup/integration with Routes per request. Setting the environ in a
  WSGI environ will run match, and setup everything needed for url_for/etc.

-- 1.0.2 (Dec. 30th, 2005)
* Routes where a default was present but None were filling in improper values.
* Passing a 0 would evaluate to None during generation, resulting in missing
  URL parts

-- 1.0.1 (Dec. 18th, 2005)
* Request Local Callable - You can now designate your own callable function that
  should then be used to store the request_config data. This is most useful for
  environments where its possible multiple requests might be running in a single
  thread. The callable should return a request specific object for attributes to
  be attached. See routes.__init__.py for more information.

-- 1.0 (Nov. 21st, 2005)
* routes.__init__ will now load the common symbols most people will
  want to actually use.
  Thus, you can either:
       from routes import *
  Or:
       from routes import request_confg, Mapper
  The following names are available for importing from routes:
      request_config, Mapper, url_for, redirect_to
* Route Names - You can now name a route, which will save a copy of the defaults
  defined for later use by url_for or redirect_to. 
  Thus, a route and url_for looking like this:
       m.connect('home', controller='blog', action='splash')
       url_for(controller='blog', action='splash')   # => /home
  Can now be used with a name:
       m.connect('home_url','home', controller='blog', action='splash')
       url_for('home_url')  # => /home
  Additional keywords can still be added to url_for and will override defaults in
  the named route.
* Trailing / - Route recognition earlier failed on trailing slashes, not really a bug,
  not really a feature I guess. Anyways, trailing slashes are o.k. now as in the Rails
  version.
* redirect_to now has two sets of tests to ensure it works properly