Merge lp:~mwhudson/launchpad/vostok-add-root into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2010-07-30 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11299 |
| Proposed branch: | lp:~mwhudson/launchpad/vostok-add-root |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~mwhudson/launchpad/vostok-add-layer |
| Diff against target: |
238 lines (+140/-5) 10 files modified
lib/lp/vostok/browser/__init__.py (+4/-0) lib/lp/vostok/browser/configure.zcml (+22/-0) lib/lp/vostok/browser/root.py (+15/-0) lib/lp/vostok/browser/tests/__init__.py (+4/-0) lib/lp/vostok/browser/tests/request.py (+19/-0) lib/lp/vostok/browser/tests/test_root.py (+38/-0) lib/lp/vostok/configure.zcml (+7/-0) lib/lp/vostok/publisher.py (+12/-4) lib/lp/vostok/templates/root.pt (+3/-0) lib/lp/vostok/tests/test_publisher.py (+16/-1) |
| To merge this branch: | bzr merge lp:~mwhudson/launchpad/vostok-add-root |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | 2010-07-29 | Approve on 2010-07-30 | |
|
Review via email:
|
|||
Description of the Change
Hi,
This branch adds a custom root object for the vostok vhost. This makes us more
separate from the other Launchpad publication stuff, which given the goal of
vostok is a good thing (tm).
Cheers,
mwh
| Michael Hudson-Doyle (mwhudson) wrote : | # |
On Thu, 29 Jul 2010 23:27:43 -0000, Tim Penhey <email address hidden> wrote:
> Review: Needs Information
> > class VostokRootView(
> > pass
>
> Shouldn't you at least have
>
> __used_for__ = IVostokRoot
After a bit of googling, apparently not. Maybe I should sed out all the
existing __used_for__s in our code base :-)
> Instead of:
> view = getMultiAdapter(
> (VostokRoot(), VostokTestReque
> view.initialize()
>
> Can you alter the get_initialized
Apparently yes, once I was told that it's actually called
create_
> > class IVostokRoot(
>
> You can probably lose the comment.
Yeah, thanks.
> Also... the root.pt needs some work :-)
That's in the next pipe :-)
> Why is the
> getUtility(
> needed in test_root_object?
Errr... because the test blows up if its not there. Specifically, the
root object seems to be cached on the launchbag, and if the launchpad
isn't set up, it blows up.
I don't know if this is still used at all, quite possibly not, but that
seems a job for another branch.
I've expanded the comment.
Cheers,
mwh
| Tim Penhey (thumper) wrote : | # |
The XXX comment should have name, date and bug as well.
Other than that, this is good to go now.

> class VostokRootView( LaunchpadView) :
> pass
Shouldn't you at least have
__used_for__ = IVostokRoot
Instead of:
(VostokRoot( ), VostokTestReque st()), name='+index') initialize( )
view = getMultiAdapter(
view.
Can you alter the get_initialized _view function?
> class IVostokRoot( Interface) : # might need to inherit from some IRoot thing
You can probably lose the comment.
Also... the root.pt needs some work :-)
Why is the IOpenLaunchBag) .clear( )
getUtility(
needed in test_root_object?