[Checkins] SVN: grokui.admin/branches/0.6/ fix dependencies that got remove too early
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Fri May 28 07:10:13 EDT 2010
Log message for revision 112791:
fix dependencies that got remove too early
Changed:
U grokui.admin/branches/0.6/CHANGES.txt
U grokui.admin/branches/0.6/LICENSE.txt
U grokui.admin/branches/0.6/src/grokui/admin/applications.py
A grokui.admin/branches/0.6/src/grokui/admin/applications_templates/
A grokui.admin/branches/0.6/src/grokui/admin/applications_templates/applications.pt
U grokui.admin/branches/0.6/src/grokui/admin/server.py
A grokui.admin/branches/0.6/src/grokui/admin/server_templates/
A grokui.admin/branches/0.6/src/grokui/admin/server_templates/server.pt
D grokui.admin/branches/0.6/src/grokui/admin/templates/applications.pt
D grokui.admin/branches/0.6/src/grokui/admin/templates/server.pt
U grokui.admin/branches/0.6/src/grokui/admin/views.py
-=-
Modified: grokui.admin/branches/0.6/CHANGES.txt
===================================================================
--- grokui.admin/branches/0.6/CHANGES.txt 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/CHANGES.txt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -1,6 +1,25 @@
grokui.admin changes
********************
+0.6.3 (unreleased)
+==================
+
+* Fix dependencies that got removed too early.
+
+0.6.2 (2010-05-19)
+==================
+
+* Modified package to comply with Zope Foundation policy.
+
+* Removed duplicated/unused code.
+ Fix https://bugs.launchpad.net/grok/+bug/539940
+
+* Reflect changes in Folder API: check also for KeyError, not only for
+ DuplicationError when adding new apps.
+
+* Added extra-templatedirs and moved templates into these in order to
+ avoid (erraneous) templatedir-registry warnings.
+
0.6.1 (2010-03-07)
==================
Modified: grokui.admin/branches/0.6/LICENSE.txt
===================================================================
--- grokui.admin/branches/0.6/LICENSE.txt 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/LICENSE.txt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -1,54 +1,45 @@
Zope Public License (ZPL) Version 2.1
-------------------------------------
-A copyright notice accompanies this license document that
-identifies the copyright holders.
+A copyright notice accompanies this license document that identifies the
+copyright holders.
-This license has been certified as open source. It has also
-been designated as GPL compatible by the Free Software
-Foundation (FSF).
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the
-following conditions are met:
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
-1. Redistributions in source code must retain the
- accompanying copyright notice, this list of conditions,
- and the following disclaimer.
+1. Redistributions in source code must retain the accompanying copyright
+notice, this list of conditions, and the following disclaimer.
-2. Redistributions in binary form must reproduce the accompanying
- copyright notice, this list of conditions, and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
-3. Names of the copyright holders must not be used to
- endorse or promote products derived from this software
- without prior written permission from the copyright
- holders.
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
-4. The right to distribute this software or to use it for
- any purpose does not give you the right to use
- Servicemarks (sm) or Trademarks (tm) of the copyright
- holders. Use of them is covered by separate agreement
- with the copyright holders.
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
-5. If any files are modified, you must cause the modified
- files to carry prominent notices stating that you changed
- the files and the date of any change.
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
Disclaimer
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
- AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- NO EVENT SHALL THE COPYRIGHT HOLDERS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Modified: grokui.admin/branches/0.6/src/grokui/admin/applications.py
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/applications.py 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/src/grokui/admin/applications.py 2010-05-28 11:10:13 UTC (rev 112791)
@@ -9,7 +9,6 @@
from grokui.base.layout import GrokUIView
from grokui.base.namespace import GrokUILayer
-grok.templatedir("templates")
class InstalledApplication(object):
Added: grokui.admin/branches/0.6/src/grokui/admin/applications_templates/applications.pt
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/applications_templates/applications.pt (rev 0)
+++ grokui.admin/branches/0.6/src/grokui/admin/applications_templates/applications.pt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -0,0 +1,78 @@
+<div id="applications-panel" tal:define="root context/@@absolute_url">
+ <form action="manageapps" id="installed">
+ <fieldset>
+ <legend>Installed applications</legend>
+
+ <div tal:condition="not: view/installed">
+ <p class="menu-description1">
+ Currently no working applications are installed.
+ </p>
+ </div>
+
+ <div tal:condition="view/installed"
+ tal:repeat="app view/installed">
+ <input type="checkbox"
+ class="checkbox"
+ tal:attributes="value app/__name__;
+ name string:items" />
+ <a tal:attributes="href app/url">
+ <b><span tal:replace="app/__name__"/></b>
+ </a>
+ (<span tal:replace="app/classname"/>)
+ <div tal:content="app/@@info" />
+ </div>
+
+ <div tal:condition="view/broken">
+ <br/><div class="emph">Broken applications:</div>
+ </div>
+ <div tal:repeat="app view/broken">
+ <input type="checkbox"
+ class="checkbox"
+ tal:attributes="value app/__name__;
+ name string:items" />
+ <span tal:content="app/__name__" />
+ (broken type: <span tal:replace="app/classname"/>).
+ This application is broken!
+ </div>
+
+ <p>
+ <input tal:condition="view/has_apps"
+ class="button" type="submit" name="delete"
+ id="form.actions.delete"
+ value="Delete Selected"/>
+ <input tal:condition="view/installed"
+ class="button" type="submit" name="rename"
+ value="Rename"/>
+ </p>
+ </fieldset>
+ </form>
+
+ <fieldset>
+ <legend>Add application</legend>
+ <div tal:repeat="app view/installable">
+ <div class="details">
+ <h3 tal:content="app/__name__">Application Name</h3>
+ <p class="description"
+ tal:content="structure app/description">
+ Application description here.
+ </p>
+ <div tal:content="app/@@info" />
+ </div>
+ <form action="add" tal:attributes="name app/classname">
+ <fieldset>
+ <label for="name">
+ Name and create a new
+ <span tal:replace="app/__name__">Foo</span>
+ application
+ </label>
+ <br />
+ <input type="text" name="name"/>
+ <input type="hidden" name="application" value=""
+ tal:attributes="value app/classname" />
+ <input class="button" type="submit" name="Add" value="Create"/>
+ </fieldset>
+ </form>
+ </div>
+ </fieldset>
+
+</div>
Modified: grokui.admin/branches/0.6/src/grokui/admin/server.py
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/server.py 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/src/grokui/admin/server.py 2010-05-28 11:10:13 UTC (rev 112791)
@@ -19,7 +19,6 @@
from zope.i18nmessageid import MessageFactory
_ = MessageFactory('grokui')
-grok.templatedir("templates")
class Server(GrokUIView):
Added: grokui.admin/branches/0.6/src/grokui/admin/server_templates/server.pt
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/server_templates/server.pt (rev 0)
+++ grokui.admin/branches/0.6/src/grokui/admin/server_templates/server.pt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -0,0 +1,150 @@
+<div>
+ <h1>Manage your Zope 3 instance</h1>
+
+ <fieldset>
+ <legend>Security notifications</legend>
+ <form method="post" action=""
+ tal:attributes="action
+ string:${context/@@absolute_url}/server">
+ <div>
+ Running Grok <span tal:replace="view/grok_version" /> /
+ grokui.admin <span tal:replace="view/grokuiadmin_version" />
+ </div>
+ <div> </div>
+ <div>
+ You can be notified if serious security-related issues were
+ discovered that concern your installation.
+ </div>
+ <div>
+ Note, that if you enable this, HTTP-lookups of the grok site
+ will happen to check, whether there are any published
+ security issues for the installed version of grok.
+ </div>
+ <div> </div>
+ <div>
+ <label for="secnotesource">URL to lookup:</label>
+ <input type="text" size="30" name="secnotesource"
+ tal:attributes="value view/security_notifier_url" />
+ <input class="button" type="submit" name="setsecnotesource"
+ value="Set URL" />
+ </div>
+ <div> </div>
+ <div tal:condition="view/secnotes_enabled">
+ <span class="emph">
+ Status: Security notifications are enabled
+ </span>
+ <input class="button" type="submit" name="setsecnotes"
+ value="Disable" />
+ </div>
+ <div tal:condition="not: view/secnotes_enabled">
+ <span class="emph">
+ Status: Security notifications are disabled
+ </span>
+ <input class="button" type="submit" name="setsecnotes"
+ value="Enable" />
+ </div>
+ </form>
+ </fieldset>
+
+ <form method="post" action=""
+ tal:attributes="action string:${context/@@absolute_url}/server">
+ <fieldset>
+ <p>
+ <legend>Manage server process</legend>
+ <span tal:condition="view/server_control">
+ <input type="submit" name="restart" class="button"
+ value="Restart server" />
+ <input type="submit" name="shutdown" class="button"
+ value="Stop server" />
+ after <input type="text" name="time" value="0" size="4" /> seconds
+ <input type="hidden" name="submitted" value="true"/>
+ </span>
+ <span tal:condition="not: view/server_control">
+ You have to start/stop/restart the server process from the cmdline.
+ </span>
+ </p>
+ </fieldset>
+ </form>
+
+ <fieldset>
+ <legend>Manage your databases</legend>
+ <div tal:condition="not: python: len(view.databases)">
+ <p class="menu-description1">Currently no databases are active.</p>
+ </div>
+ <div tal:condition="python: len(view.databases) or True"
+ tal:repeat="db view/databases">
+ <form method="post" action=""
+ tal:attributes="action string:${context/@@absolute_url}/server">
+ <input type="hidden" name="submitted" value="true"/>
+ <input type="hidden" name="dbName" value=""
+ tal:attributes="value db/utilName" />
+ <input type="text" name="days" value="0"
+ size="3" title="Days of history to keep" />
+ <input class="button" type="submit" name="pack" value="Pack" />
+ <span tal:replace="db/dbName" />
+ <span tal:replace="db/size" />
+ </form>
+ </div>
+ </fieldset>
+
+ <form method="post" action=""
+ tal:attributes="action string:${context/@@absolute_url}/server">
+ <fieldset>
+ <legend>Admin message</legend>
+
+ <p>Lets you display an administrative message on all pages.<br />
+
+ <input
+ type="text"
+ name="admin_message"
+ tal:attributes="value view/current_message/message|nothing"
+ />
+
+ <input type="hidden" name="submitted" value="true"/>
+ <input type="submit" name="save_message" class="button" value="Save"/>
+
+ </p>
+ </fieldset>
+ </form>
+
+ <fieldset id="server-process-info">
+ <legend>Server process info</legend>
+ <dl class="table" tal:define="ri view/runtime_info">
+
+ <dt>Uptime</dt>
+ <dd tal:content="ri/Uptime" />
+
+ <dt>System platform</dt>
+ <dd tal:content="ri/SystemPlatform" />
+
+ <dt>Zope version</dt>
+ <dd tal:content="ri/ZopeVersion" />
+
+ <dt>Python version</dt>
+ <dd tal:content="ri/PythonVersion" />
+
+ <dt>Command line</dt>
+ <dd tal:content="ri/CommandLine" />
+
+ <dt>Preferred encoding</dt>
+ <dd tal:content="ri/PreferredEncoding" />
+
+ <dt>File system encoding</dt>
+ <dd tal:content="ri/FileSystemEncoding" />
+
+ <dt>Process ID</dt>
+ <dd tal:content="ri/ProcessId" />
+
+ <dt>Python path</dt>
+ <dd>
+ <ul class="simple">
+ <tal:block tal:repeat="path ri/PythonPath">
+ <li tal:content="path">unknown</li>
+ </tal:block>
+ </ul>
+ </dd>
+
+ </dl>
+ </fieldset>
+ </div>
+
\ No newline at end of file
Deleted: grokui.admin/branches/0.6/src/grokui/admin/templates/applications.pt
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/templates/applications.pt 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/src/grokui/admin/templates/applications.pt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -1,78 +0,0 @@
-<div id="applications-panel" tal:define="root context/@@absolute_url">
- <form action="manageapps" id="installed">
- <fieldset>
- <legend>Installed applications</legend>
-
- <div tal:condition="not: view/installed">
- <p class="menu-description1">
- Currently no working applications are installed.
- </p>
- </div>
-
- <div tal:condition="view/installed"
- tal:repeat="app view/installed">
- <input type="checkbox"
- class="checkbox"
- tal:attributes="value app/__name__;
- name string:items" />
- <a tal:attributes="href app/url">
- <b><span tal:replace="app/__name__"/></b>
- </a>
- (<span tal:replace="app/classname"/>)
- <div tal:content="app/@@info" />
- </div>
-
- <div tal:condition="view/broken">
- <br/><div class="emph">Broken applications:</div>
- </div>
- <div tal:repeat="app view/broken">
- <input type="checkbox"
- class="checkbox"
- tal:attributes="value app/__name__;
- name string:items" />
- <span tal:content="app/__name__" />
- (broken type: <span tal:replace="app/classname"/>).
- This application is broken!
- </div>
-
- <p>
- <input tal:condition="view/has_apps"
- class="button" type="submit" name="delete"
- id="form.actions.delete"
- value="Delete Selected"/>
- <input tal:condition="view/installed"
- class="button" type="submit" name="rename"
- value="Rename"/>
- </p>
- </fieldset>
- </form>
-
- <fieldset>
- <legend>Add application</legend>
- <div tal:repeat="app view/installable">
- <div class="details">
- <h3 tal:content="app/__name__">Application Name</h3>
- <p class="description"
- tal:content="structure app/description">
- Application description here.
- </p>
- <div tal:content="app/@@info" />
- </div>
- <form action="add" tal:attributes="name app/classname">
- <fieldset>
- <label for="name">
- Name and create a new
- <span tal:replace="app/__name__">Foo</span>
- application
- </label>
- <br />
- <input type="text" name="name"/>
- <input type="hidden" name="application" value=""
- tal:attributes="value app/classname" />
- <input class="button" type="submit" name="Add" value="Create"/>
- </fieldset>
- </form>
- </div>
- </fieldset>
-
-</div>
Deleted: grokui.admin/branches/0.6/src/grokui/admin/templates/server.pt
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/templates/server.pt 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/src/grokui/admin/templates/server.pt 2010-05-28 11:10:13 UTC (rev 112791)
@@ -1,150 +0,0 @@
-<div>
- <h1>Manage your Zope 3 instance</h1>
-
- <fieldset>
- <legend>Security notifications</legend>
- <form method="post" action=""
- tal:attributes="action
- string:${context/@@absolute_url}/server">
- <div>
- Running Grok <span tal:replace="view/grok_version" /> /
- grokui.admin <span tal:replace="view/grokuiadmin_version" />
- </div>
- <div> </div>
- <div>
- You can be notified if serious security-related issues were
- discovered that concern your installation.
- </div>
- <div>
- Note, that if you enable this, HTTP-lookups of the grok site
- will happen to check, whether there are any published
- security issues for the installed version of grok.
- </div>
- <div> </div>
- <div>
- <label for="secnotesource">URL to lookup:</label>
- <input type="text" size="30" name="secnotesource"
- tal:attributes="value view/security_notifier_url" />
- <input class="button" type="submit" name="setsecnotesource"
- value="Set URL" />
- </div>
- <div> </div>
- <div tal:condition="view/secnotes_enabled">
- <span class="emph">
- Status: Security notifications are enabled
- </span>
- <input class="button" type="submit" name="setsecnotes"
- value="Disable" />
- </div>
- <div tal:condition="not: view/secnotes_enabled">
- <span class="emph">
- Status: Security notifications are disabled
- </span>
- <input class="button" type="submit" name="setsecnotes"
- value="Enable" />
- </div>
- </form>
- </fieldset>
-
- <form method="post" action=""
- tal:attributes="action string:${context/@@absolute_url}/server">
- <fieldset>
- <p>
- <legend>Manage server process</legend>
- <span tal:condition="view/server_control">
- <input type="submit" name="restart" class="button"
- value="Restart server" />
- <input type="submit" name="shutdown" class="button"
- value="Stop server" />
- after <input type="text" name="time" value="0" size="4" /> seconds
- <input type="hidden" name="submitted" value="true"/>
- </span>
- <span tal:condition="not: view/server_control">
- You have to start/stop/restart the server process from the cmdline.
- </span>
- </p>
- </fieldset>
- </form>
-
- <fieldset>
- <legend>Manage your databases</legend>
- <div tal:condition="not: python: len(view.databases)">
- <p class="menu-description1">Currently no databases are active.</p>
- </div>
- <div tal:condition="python: len(view.databases) or True"
- tal:repeat="db view/databases">
- <form method="post" action=""
- tal:attributes="action string:${context/@@absolute_url}/server">
- <input type="hidden" name="submitted" value="true"/>
- <input type="hidden" name="dbName" value=""
- tal:attributes="value db/utilName" />
- <input type="text" name="days" value="0"
- size="3" title="Days of history to keep" />
- <input class="button" type="submit" name="pack" value="Pack" />
- <span tal:replace="db/dbName" />
- <span tal:replace="db/size" />
- </form>
- </div>
- </fieldset>
-
- <form method="post" action=""
- tal:attributes="action string:${context/@@absolute_url}/server">
- <fieldset>
- <legend>Admin message</legend>
-
- <p>Lets you display an administrative message on all pages.<br />
-
- <input
- type="text"
- name="admin_message"
- tal:attributes="value view/current_message/message|nothing"
- />
-
- <input type="hidden" name="submitted" value="true"/>
- <input type="submit" name="save_message" class="button" value="Save"/>
-
- </p>
- </fieldset>
- </form>
-
- <fieldset id="server-process-info">
- <legend>Server process info</legend>
- <dl class="table" tal:define="ri view/runtime_info">
-
- <dt>Uptime</dt>
- <dd tal:content="ri/Uptime" />
-
- <dt>System platform</dt>
- <dd tal:content="ri/SystemPlatform" />
-
- <dt>Zope version</dt>
- <dd tal:content="ri/ZopeVersion" />
-
- <dt>Python version</dt>
- <dd tal:content="ri/PythonVersion" />
-
- <dt>Command line</dt>
- <dd tal:content="ri/CommandLine" />
-
- <dt>Preferred encoding</dt>
- <dd tal:content="ri/PreferredEncoding" />
-
- <dt>File system encoding</dt>
- <dd tal:content="ri/FileSystemEncoding" />
-
- <dt>Process ID</dt>
- <dd tal:content="ri/ProcessId" />
-
- <dt>Python path</dt>
- <dd>
- <ul class="simple">
- <tal:block tal:repeat="path ri/PythonPath">
- <li tal:content="path">unknown</li>
- </tal:block>
- </ul>
- </dd>
-
- </dl>
- </fieldset>
- </div>
-
\ No newline at end of file
Modified: grokui.admin/branches/0.6/src/grokui/admin/views.py
===================================================================
--- grokui.admin/branches/0.6/src/grokui/admin/views.py 2010-05-28 11:05:56 UTC (rev 112790)
+++ grokui.admin/branches/0.6/src/grokui/admin/views.py 2010-05-28 11:10:13 UTC (rev 112791)
@@ -65,27 +65,17 @@
"""
grok.require('grok.ManageApplications')
- def update(self, inspectapp=None, application=None):
- if inspectapp is not None:
- self.redirect(
- "%s/%s/index" % (
- self.url("docgrok"), application.replace('.', '/')))
- return
-
- def render(self, application, name, inspectapp=None):
+ def render(self, application, name):
if name is None or name == "":
self.redirect(self.url(self.context, 'applications'))
return
- if name is None or name == "":
- self.redirect(self.url(self.context, 'applications'))
- return
app = getUtility(grok.interfaces.IApplication, name=application)
try:
new_app = app()
grok.notify(grok.ObjectCreatedEvent(new_app))
self.context.root[name] = new_app
self.flash(u'Added %s `%s`.' % (application, name))
- except DuplicationError:
+ except (DuplicationError, KeyError):
self.flash(u'Name `%s` already in use. '
u'Please choose another name.' % (name,))
self.redirect(self.url(self.context, 'applications'))
More information about the checkins
mailing list