Merge lp:~thumper/launchpad/fix-canonical-url-for-api-2 into lp:launchpad
Proposed by
Tim Penhey
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Tim Penhey | ||||
Approved revision: | not available | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~thumper/launchpad/fix-canonical-url-for-api-2 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
122 lines (+32/-15) 4 files modified
lib/canonical/launchpad/doc/canonical_url.txt (+9/-0) lib/canonical/launchpad/doc/tales.txt (+6/-1) lib/canonical/launchpad/webapp/publisher.py (+6/-4) lib/canonical/launchpad/webapp/tales.py (+11/-10) |
||||
To merge this branch: | bzr merge lp:~thumper/launchpad/fix-canonical-url-for-api-2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+14876@code.launchpad.net |
Commit message
Fix the fmt:api_url to return the relative path only for URLs.
To post a comment you must log in.
The current implementation of the api_url tales formatter doesn't do what it thinks it does. Setting the rootsite to None does not mean that the site isn't shown.
To fix this, I've added an option to canonical_url to force the local path only. I've also fixed the doctest for tales to make a distribution instead of a product where the example clearly indicates that the object should be a distribution. Also added the missing api_url to the Branch formatter, and added tests to cover these areas.