Merge lp:~mwhudson/launchpad/vostok-main-template into lp:launchpad
Proposed by
Michael Hudson-Doyle
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11299 |
Proposed branch: | lp:~mwhudson/launchpad/vostok-main-template |
Merge into: | lp:launchpad |
Prerequisite: | lp:~mwhudson/launchpad/vostok-add-root |
Diff against target: |
324 lines (+155/-20) 11 files modified
Makefile (+1/-0) lib/canonical/launchpad/doc/webapp-publication.txt (+5/-0) lib/lp/vostok/browser/configure.zcml (+8/-0) lib/lp/vostok/browser/root.py (+9/-0) lib/lp/vostok/browser/tests/request.py (+5/-7) lib/lp/vostok/browser/tests/test_main_template.py (+33/-0) lib/lp/vostok/browser/tests/test_root.py (+41/-3) lib/lp/vostok/publisher.py (+18/-1) lib/lp/vostok/templates/main-template.pt (+15/-0) lib/lp/vostok/templates/root.pt (+20/-3) lib/lp/vostok/tests/test_publisher.py (+0/-6) |
To merge this branch: | bzr merge lp:~mwhudson/launchpad/vostok-main-template |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+31240@code.launchpad.net |
Commit message
Add the publication plumbing and very basic root page for the 'vostok' vhost
Description of the change
Hi,
This branch adds a very simple main template METAL macro for the vostok layer
and makes the view for the root object use it.
The macro is done in an old-school way compared to how it's done in Launchpad
today, mostly because we couldn't be bothered to figure out how to make the
macro: tales stuff be layer dependent and also because we should be able to get
away with all our pages using the same main template macro.
Cheers,
mwh
To post a comment you must log in.
> class VostokTestReque st(VostokReques tMixin, LaunchpadTestRe quest):
> pass
Instead of pass, how about a docstring?
The browser tests are missing docstrings too. I know they are (most likely)
boring, but should be there anyway.
> def test_distributi ons(self) : distributions is an iterable of all registered
> # VostokRootView.
> # distributions.
> root_view = self.view()
This likes you are actually doing
VostokRoot View.__ call__
Is that what you want? I wouldn't have thought so.
Are you familiar at all with the new lp.testing. BrowserTestCase ?
It might be better than manually creating the view, initializing it, and
rendering it.
VostokBrowserRe quest could benefit from a docstring rather than pass too.
I think that your main-template.pt macro should be a valid HTML file rather
than just <h1> and <div>. I'm pretty sure that most of the HTML in root.pt is
discarded given that it is using the master macro.