← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:zcml-namespaces-renamed-page into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:zcml-namespaces-renamed-page into launchpad:master.

Commit message:
Move ZCML renamed-page directive to lp namespace

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/437354

As with commit 57196c1d6a220f00039e027768cc05368135f556, it makes sense to move our local `renamed-page` directive to our own namespace rather than poking it into the Zope browser namespace.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:zcml-namespaces-renamed-page into launchpad:master.
diff --git a/lib/lp/answers/browser/configure.zcml b/lib/lp/answers/browser/configure.zcml
index 5e677cc..bdf02dc 100644
--- a/lib/lp/answers/browser/configure.zcml
+++ b/lib/lp/answers/browser/configure.zcml
@@ -24,7 +24,7 @@
     name="+questions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.answers.interfaces.questioncollection.IQuestionCollection"
     name="+tickets"
     new_name="+questions"
@@ -43,7 +43,7 @@
     name="+myquestions"
     permission="launchpad.AnyPerson"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.answers.interfaces.questioncollection.ISearchableByQuestionOwner"
     name="+mytickets"
     new_name="+myquestions"
@@ -61,7 +61,7 @@
     name="+by-language"
     permission="launchpad.AnyPerson"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.answers.interfaces.questiontarget.IQuestionTarget"
     name="+unsupported"
     new_name="+questions"
@@ -74,7 +74,7 @@
     class="lp.answers.browser.questiontarget.ManageAnswerContactView"
     template="../templates/questiontarget-manage-answercontacts.pt"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.answers.interfaces.questiontarget.IQuestionTarget"
     name="+support-contact"
     new_name="+answer-contact"
@@ -99,7 +99,7 @@
     class=".question.QuestionAddView"
     permission="launchpad.AnyPerson"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.answers.interfaces.questiontarget.IQuestionTarget"
     name="+addticket"
     new_name="+addquestion"
@@ -405,7 +405,7 @@
     name="+questions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+tickets"
     new_name="+questions"
@@ -417,7 +417,7 @@
     name="+answeredquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+answeredtickets"
     new_name="+answeredquestions"
@@ -429,7 +429,7 @@
     name="+assignedquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+assignedtickets"
     new_name="+assignedquestions"
@@ -441,7 +441,7 @@
     name="+commentedquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+commentedtickets"
     new_name="+commentedquestions"
@@ -453,7 +453,7 @@
     name="+createdquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+createdtickets"
     new_name="+createdquestions"
@@ -465,7 +465,7 @@
     name="+needattentionquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+needattentiontickets"
     new_name="+needattentionquestions"
@@ -477,7 +477,7 @@
     name="+subscribedquestions"
     permission="zope.Public"
     />
-  <browser:renamed-page
+  <lp:renamed-page
     for="lp.registry.interfaces.person.IPerson"
     name="+subscribedtickets"
     new_name="+subscribedquestions"
diff --git a/lib/lp/app/browser/configure.zcml b/lib/lp/app/browser/configure.zcml
index 29b6519..3d335d3 100644
--- a/lib/lp/app/browser/configure.zcml
+++ b/lib/lp/app/browser/configure.zcml
@@ -997,7 +997,7 @@
       attribute="__call__"
       permission="zope.Public"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       name="+about"
       new_name="+tour/index"
@@ -1005,21 +1005,21 @@
       />
 
   <!-- Marketing material for Answers. -->
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.answers.publisher.AnswersLayer"
       name="+about"
       new_name="+tour/community-support"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.answers.publisher.AnswersLayer"
       name="+faq"
       new_name="+tour/community-support"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       name="+tour"
       new_name="+tour/community-support"
       rootsite="mainsite"
@@ -1028,21 +1028,21 @@
       />
 
   <!-- Marketing material for Blueprints. -->
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.blueprints.publisher.BlueprintsLayer"
       name="+about"
       new_name="+tour/feature-tracking"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.blueprints.publisher.BlueprintsLayer"
       name="+faq"
       new_name="+tour/feature-tracking"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       name="+tour"
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.blueprints.publisher.BlueprintsLayer"
@@ -1051,21 +1051,21 @@
       />
 
   <!-- Marketing material for Bugs. -->
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.bugs.publisher.BugsLayer"
       name="+about"
       new_name="+tour/bugs"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.bugs.publisher.BugsLayer"
       name="+faq"
       new_name="+tour/bugs"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       name="+tour"
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.bugs.publisher.BugsLayer"
@@ -1074,21 +1074,21 @@
       />
 
   <!-- Marketing material for Code. -->
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.code.publisher.CodeLayer"
       name="+about"
       new_name="+tour/branch-hosting-tracking"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.code.publisher.CodeLayer"
       name="+faq"
       new_name="+tour/branch-hosting-tracking"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       name="+tour"
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.code.publisher.CodeLayer"
@@ -1098,21 +1098,21 @@
 
 
   <!-- Marketing material for Translations. -->
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.translations.publisher.TranslationsLayer"
       name="+about"
       new_name="+tour/translation"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.translations.publisher.TranslationsLayer"
       name="+faq"
       new_name="+tour/translation"
       rootsite="mainsite"
       />
-  <browser:renamed-page
+  <lp:renamed-page
       name="+tour"
       for="lp.services.webapp.interfaces.ILaunchpadApplication"
       layer="lp.translations.publisher.TranslationsLayer"
diff --git a/lib/lp/code/browser/configure.zcml b/lib/lp/code/browser/configure.zcml
index 51cc421..ba11a5f 100644
--- a/lib/lp/code/browser/configure.zcml
+++ b/lib/lp/code/browser/configure.zcml
@@ -745,17 +745,17 @@
             permission="zope.Public"
             name="+branches"
             template="../templates/person-branches.pt"/>
-        <browser:renamed-page
+        <lp:renamed-page
             for="lp.registry.interfaces.person.IPerson"
             name="+ownedbranches"
             new_name="+branches"
             rootsite="code"/>
-        <browser:renamed-page
+        <lp:renamed-page
             for="lp.registry.interfaces.person.IPerson"
             name="+registeredbranches"
             new_name="+branches"
             rootsite="code"/>
-        <browser:renamed-page
+        <lp:renamed-page
             for="lp.registry.interfaces.person.IPerson"
             name="+subscribedbranches"
             new_name="+branches"
@@ -786,7 +786,7 @@
         permission="zope.Public"
         name="+branches"
         template="../templates/product-branches.pt"/>
-    <browser:renamed-page
+    <lp:renamed-page
         for="lp.registry.interfaces.product.IProduct"
         name="+all-branches"
         new_name="+branches"
@@ -1192,17 +1192,17 @@
         name="+branches"
         template="../templates/person-branches.pt"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         for="lp.registry.interfaces.personproduct.IPersonProduct"
         name="+ownedbranches"
         new_name="+branches"
         rootsite="code"/>
-    <browser:renamed-page
+    <lp:renamed-page
         for="lp.registry.interfaces.personproduct.IPersonProduct"
         name="+registeredbranches"
         new_name="+branches"
         rootsite="code"/>
-    <browser:renamed-page
+    <lp:renamed-page
         for="lp.registry.interfaces.personproduct.IPersonProduct"
         name="+subscribedbranches"
         new_name="+branches"
diff --git a/lib/lp/registry/browser/configure.zcml b/lib/lp/registry/browser/configure.zcml
index edc854e..2f477ef 100644
--- a/lib/lp/registry/browser/configure.zcml
+++ b/lib/lp/registry/browser/configure.zcml
@@ -393,7 +393,7 @@
           class="lp.registry.browser.project.ProjectAddQuestionView"
           permission="launchpad.AnyPerson"
           />
-      <browser:renamed-page
+      <lp:renamed-page
           name="+addticket"
           for="lp.registry.interfaces.projectgroup.IProjectGroup"
           new_name="+addquestion"
@@ -1135,17 +1135,17 @@
         permission="zope.Public"
         template="../templates/person-related-software-navlinks.pt"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         name="+related-software"
         new_name="+related-packages"
         for="lp.registry.interfaces.person.IPerson"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         name="+packages"
         new_name="+related-packages"
         for="lp.registry.interfaces.person.IPerson"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         name="+projects"
         new_name="+related-projects"
         for="lp.registry.interfaces.person.IPerson"
@@ -1767,7 +1767,7 @@
         permission="zope.Public"
         template="../templates/product-listing-detailed.pt"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         name="+distributions"
         for="lp.registry.interfaces.product.IProduct"
         new_name="+packages"
@@ -1931,7 +1931,7 @@
         permission="launchpad.AnyPerson"
         template="../templates/product-new.pt"
         />
-    <browser:renamed-page
+    <lp:renamed-page
         name="+new-guided"
         new_name="+new"
         for="lp.registry.interfaces.product.IProductSet"
diff --git a/lib/lp/services/webapp/doc/renamed-view.rst b/lib/lp/services/webapp/doc/renamed-view.rst
index 7eccb66..d60d807 100644
--- a/lib/lp/services/webapp/doc/renamed-view.rst
+++ b/lib/lp/services/webapp/doc/renamed-view.rst
@@ -99,15 +99,15 @@ Registering from ZCML
 ---------------------
 
 Finally, it is possible to register RenamedView from ZCML. The
-browser:renamed-page is available for this purpose.
+lp:renamed-page directive is available for this purpose.
 
     >>> from zope.configuration import xmlconfig
     >>> zcmlcontext = xmlconfig.string(
     ...     """
-    ... <configure xmlns:browser="http://namespaces.zope.org/browser";>
+    ... <configure xmlns:lp="http://namespaces.canonical.com/lp";>
     ...   <include package="zope.component" file="meta.zcml" />
     ...   <include package="lp.services.webapp" file="meta.zcml" />
-    ...   <browser:renamed-page
+    ...   <lp:renamed-page
     ...       for="lp.answers.interfaces.questiontarget.IQuestionTarget"
     ...       name="+old_tickets_page"
     ...       new_name="+questions"
diff --git a/lib/lp/services/webapp/meta.zcml b/lib/lp/services/webapp/meta.zcml
index c541ff9..c307612 100644
--- a/lib/lp/services/webapp/meta.zcml
+++ b/lib/lp/services/webapp/meta.zcml
@@ -40,7 +40,7 @@
       />
 
   <directive
-      namespace="http://namespaces.zope.org/browser";
+      namespace="http://namespaces.canonical.com/lp";
       name="renamed-page"
       schema="lp.services.webapp.metazcml.IRenamedPageDirective"
       handler="lp.services.webapp.metazcml.renamed_page"
diff --git a/lib/lp/services/webapp/metazcml.py b/lib/lp/services/webapp/metazcml.py
index 5576f9f..cae26d3 100644
--- a/lib/lp/services/webapp/metazcml.py
+++ b/lib/lp/services/webapp/metazcml.py
@@ -597,7 +597,7 @@ class pages(original_pages):
 
 
 class IRenamedPageDirective(Interface):
-    """Schema for the browser:renamed-page directive.
+    """Schema for the lp:renamed-page directive.
 
     Use this directive to do redirects instead of the classic way of putting a
     redirect method in a view, hooked in by a browser:page directive.