Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
9ae2d7e8
Commit
9ae2d7e8
authored
Jun 27, 2000
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merging help changes to trunk...
parent
9f1a27fd
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1023 additions
and
144 deletions
+1023
-144
lib/python/Products/OFSP/help/DTMLMethod.py
lib/python/Products/OFSP/help/DTMLMethod.py
+6
-1
lib/python/Products/OFSP/help/DateTime.py
lib/python/Products/OFSP/help/DateTime.py
+784
-0
lib/python/Products/OFSP/help/Folder.py
lib/python/Products/OFSP/help/Folder.py
+106
-0
lib/python/Products/ZSQLMethods/help/Z-SQL-Method.stx
lib/python/Products/ZSQLMethods/help/Z-SQL-Method.stx
+16
-23
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Add.stx
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Add.stx
+43
-34
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Advanced.stx
...ython/Products/ZSQLMethods/help/Z-SQL-Method_Advanced.stx
+16
-44
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Edit.stx
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Edit.stx
+38
-26
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Test.stx
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Test.stx
+14
-16
No files found.
lib/python/Products/OFSP/help/DTMLMethod.py
View file @
9ae2d7e8
...
...
@@ -83,6 +83,11 @@
#
##############################################################################
def
manage_addDTMLMethod
(
self
,
id
,
title
):
"""
Add a DTML Method to the current ObjectManager
"""
class
DTMLMethod
:
"""
A DTML Method is a Zope object that contains and executes DTML
...
...
@@ -191,4 +196,4 @@ class DTMLMethod:
"""
__constructor__
=
manage_addDTMLMethod
lib/python/Products/OFSP/help/DateTime.py
0 → 100644
View file @
9ae2d7e8
This diff is collapsed.
Click to expand it.
lib/python/Products/OFSP/help/Folder.py
0 → 100644
View file @
9ae2d7e8
##############################################################################
#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# This license has been certified as Open Source(tm).
#
# 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 above copyright
# notice, this list of conditions, and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. Digital Creations requests that attribution be given to Zope
# in any manner possible. Zope includes a "Powered by Zope"
# button that is installed by default. While it is not a license
# violation to remove this button, it is requested that the
# attribution remain. A significant investment has been put
# into Zope, and this effort will continue if the Zope community
# continues to grow. This is one way to assure that growth.
#
# 4. All advertising materials and documentation mentioning
# features derived from or use of this software must display
# the following acknowledgement:
#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# In the event that the product being advertised includes an
# intact Zope distribution (with copyright and license included)
# then this clause is waived.
#
# 5. Names associated with Zope or Digital Creations must not be used to
# endorse or promote products derived from this software without
# prior written permission from Digital Creations.
#
# 6. Modified redistributions of any form whatsoever must retain
# the following acknowledgment:
#
# "This product includes software developed by Digital Creations
# for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# Intact (re-)distributions of any official Zope release do not
# require an external acknowledgement.
#
# 7. Modifications are encouraged but must be packaged separately as
# patches to official Zope releases. Distributions that do not
# clearly separate the patches from the original work must be clearly
# labeled as unofficial distributions. Modifications which do not
# carry the name Zope may be packaged in any form, as long as they
# conform to all of the clauses above.
#
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``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 DIGITAL CREATIONS OR ITS
# CONTRIBUTORS 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 consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations. Specific
# attributions are listed in the accompanying credits file.
#
##############################################################################
def
manage_addFolder
(
self
,
id
,
title
):
"""
Add a Folder to the current ObjectManager
"""
class
Folder
:
"""
A Folder is a generic container object in Zope
"""
__extends__
=
(
'OFSP.ObjectManagerItem.ObjectManagerItem'
,
'OFSP.ObjectManager.ObjectManager'
,
'OFSP.PropertyManager.PropertyManager'
,
)
__constructor__
=
manage_addFolder
lib/python/Products/ZSQLMethods/help/Z-SQL-Method.stx
View file @
9ae2d7e8
Z SQL Method Object: Communicate via SQL with any RDB database
Description
Z SQL Methods allows you to access data in SQL databases.
Z SQL Methods define and call SQL statements on databases which are
defined by database connection objects. To create a new Z SQL Method
you will need to setup a database connection first.
Every Z SQL Method is directly linked to a database connection.
**Note:** You will not be able to make a new Z SQL Method without
having a DB connection that can be seen from your location (read
Acquisition).
*Important:* Even though you may be able to write
database-specific SQL statements, you should be aware that by
switching the databases, your SQL statement inside the Z SQL Method
may break, and cause a Zope exception.
For example, PostGreSQL supports regular expression in 'SQL
WHERE' clauses. While a ZSQL statement containing a regular
expression search may work fine in PostGres, it will break when
connecting this SQL statement to another database.
\ No newline at end of file
Z SQL Method Object: Query relational databases with SQL
Description
Z SQL Methods allows you to access data in SQL databases.
Z SQL Methods define and call SQL statements on databases which
are defined by database adapter objects. To create a new Z SQL
Method you will need to setup a database adapter first. Every Z
SQL Method is directly linked to a database connection through a
database adapter.
**Note:** You must associate a Z SQL method with a database
adapter. If Zope cannot find a database adapter from your
location, you will not be able to create a Z SQL Method.
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Add.stx
View file @
9ae2d7e8
Z SQL Method - Add: Create new Z SQL Method
Description
This view allows you to create a new Z SQL Method.
Controls
'ID' -- Specifies the id of the sql method.
'Title' -- Allows you to specify the title of the sql method.
'Connection id' -- Select list that specifies the database connection on which
the sql method operates.
**Note:** If you change the ID of your DB Connection object, all the Z SQL Methods
using this connection object will *NOT* be updated. You have to update all Methods
one by one.
'Arguments' -- Allows you to specify a list of arguments that the sql
method takes. The arguments should be separated by spaces or
a newline in the field. Furthermore, you can specify the
type of the argument as well as a default
value.
**Example:** 'title:string="No title!"', where 'title' is the attribute, 'string' is the
type of the attribute, and '"No title!"' is the default value.
'Query template' -- Text area that specifies the SQL query that the sql method
will execute. The query template can contain DTML markup to
tailor the SQL statement to the arguments.
There are three additional DTML tags called 'SQLVAR', 'SQLTEST', and
'SQLGROUP'. Please refer to their references get more details on how to use them in your
SQL statement.
**Note:** the SQL statement need not be a 'SELECT' query, it may be any valid SQL
statement including an INSERT or UPDATE.
**Important:** You can have several SQL statements in one ZSQL Mathod.
\ No newline at end of file
Description
This view allows you to create a new Z SQL Method.
Controls
'ID' -- Specifies the id of the sql method.
'Title' -- Specifies the title of the sql method.
'Connection id' -- Select list that specifies the database
connection on which the sql method operates.
**Note:** If you change the ID of your DB Connection object, all
the Z SQL Methods using this connection object will *NOT* be
updated. You have to update all Methods one by one.
'Arguments' -- Allows you to specify a list of arguments that the sql
method takes. The arguments should be separated by spaces or
a newline in the field. Furthermore, you can specify the
type of the argument as well as a default
value.
**Example:** 'title:string="No title!"', where 'title' is the
attribute, 'string' is the type of the attribute, and '"No
title!"' is the default value.
'Query template' --
Text area that specifies the SQL query that will execute when
this method is called. The query template can contain DTML
markup to tailor the SQL statement to the arguments. There are
three additional DTML tags called 'SQLVAR', 'SQLTEST', and
'SQLGROUP'. Please refer to their references get more details on
how to use them in your SQL statement.
**Note:** the SQL statement need not be a 'SELECT' query, it may
be any valid SQL statement including an INSERT or UPDATE.
**Important:** You can have several SQL statements in one ZSQL
Method.
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Advanced.stx
View file @
9ae2d7e8
...
...
@@ -2,8 +2,8 @@ Z SQL Method - Advanced: Manage advanced settings
Description
This view allows you to manage the advanced settings such as
caching and plugable
brains of a SQL method.
Manage the advanced settings such as caching and plugable
brains of a SQL method.
Controls
...
...
@@ -11,54 +11,26 @@ Z SQL Method - Advanced: Manage advanced settings
'Title' -- Allows you to specify the title of the sql method.
'Maximum number of rows retrieved' -- Allows
you to specify an upper limit for the number of rows a sql
method can retrieve. Setting this option correctly (based on
your specific environment) can increase the speed of your site
significantly.
'Maximum number of rows retrieved' -- Specify an upper limit
for the number of rows a sql method can retrieve. Setting this
option correctly (based on your specific environment) can
increase the execution time of the method.
'Maximum number of results in the cache' -- Allows you to set the
size of the sql method cache. Why is the method cache useful? Let's
say you have a query that returns all day long the same result (since
the DB is only updated at night) then it would be very expensive to
execute this query every single time. Instead, Zope saves the query
result in the method and now everyone can access it faster.
Another example would be, if you call the same SQL method twice
in one DTML Method or DTML Document, you would not want to execute the
query twice, but use the cache the second time.
'Maximum number of results in the cache' -- Set the size of
the sql method cache.
'Maximum time (seconds) to cache results' -- Allows you to specify how
fresh the sql method cache must be, so that the method cache is used
as result, instead of querying the database again. The method cache
is disabled by default and by setting this time to a number greater
than zero you enable SQL Method caching.
'Maximum time (seconds) to cache results' -- The time in
seconds that results are cached. Setting to zero disables
caching.
Usually a query returns a list of rows that were
returned. This data could be considered "dumb", since it
does not know anything about it surroundings or where it
came from. But Zope allows you to transform this "dumb"
(flat) data into objects. You ask, how?
Well, usually custom objects are implemented using classes,
which consist basically of properties and methods. Now, lets
say that each column in a particular DB table corresponds to
one property of a class. All what we need to do now is to
define the methods that go with these properties. Note that
we know the properties' names from the column title.
So you can write a class in Python that contains only methods
and the Zope will fill in the attributes from using the
query results. For each returned row, there will be one
instance of the specified class, so that your result is
a list of class instances (read objects). These Python
classes are called "Plugable Brains" by the Zope
community.
In the next two fields you will specify the location and
the name of the class, so Zope will be able to use it.
Rows returned from this method can be turned into 'Result
objects' that are instances of a class you can specify below.
'Class name' -- Allows you to specify the name of the Python class.
'Class file' -- Allows you to specify the name of the Python
module that
the class is defined in. The class file should reside in
the Zope 'Extensions' directory.
'Class file' -- Allows you to specify the name of the Python
module that the class is defined in. The class file should
reside in
the Zope 'Extensions' directory.
...
...
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Edit.stx
View file @
9ae2d7e8
...
...
@@ -4,29 +4,41 @@ Z SQL Method - Edit: Change attributes of a SQL method
This view allows you to edit the attributes of a SQL method.
Controls
'ID' -- Indicates the id of the sql method.
'Title' -- Allows you to specify the title of the sql method.
'Connection id' -- Select list that specifies the database connection on which
the sql method operates.
**Note:** If you change the ID of your DB Connection object, all the Z SQL
Methods using this connection object will also be updated.
'Arguments' -- Allows you to specify a list of arguments that the sql
method takes. The arguments should be separated by spaces or a newline in
the field. Furthermore, you can specify the type of the argument as well
as a default value.
**Example:** 'title:string="No title!"', where 'title' is the attribute,
'string' is the type of the attribute, and '"No title!"' is the default value.
'Query template' -- Text area that specifies the SQL query that the sql method
will execute. The query template can contain DTML markup to
tailor the SQL statement to the arguments.
There are three additional DTML tags called 'SQLVAR', 'SQLTEST', and 'SQLGROUP'.
Please refer to their references get more details on how to use them in your
SQL statement.
**Note:** the SQL statement need not be a 'SELECT' query, it may be any valid
SQL statement including an INSERT or UPDATE.
Controls
'ID' -- Specifies the id of the sql method.
'Title' -- Specifies the title of the sql method.
'Connection id' -- Select list that specifies the database
connection on which the sql method operates.
**Note:** If you change the ID of your DB Connection object, all
the Z SQL Methods using this connection object will *NOT* be
updated. You have to update all Methods one by one.
'Arguments' -- Allows you to specify a list of arguments that the sql
method takes. The arguments should be separated by spaces or
a newline in the field. Furthermore, you can specify the
type of the argument as well as a default
value.
**Example:** 'title:string="No title!"', where 'title' is the
attribute, 'string' is the type of the attribute, and '"No
title!"' is the default value.
'Query template' --
Text area that specifies the SQL query that will execute when
this method is called. The query template can contain DTML
markup to tailor the SQL statement to the arguments. There are
three additional DTML tags called 'SQLVAR', 'SQLTEST', and
'SQLGROUP'. Please refer to their references get more details on
how to use them in your SQL statement.
**Note:** the SQL statement need not be a 'SELECT' query, it may
be any valid SQL statement including an INSERT or UPDATE.
**Important:** You can have several SQL statements in one ZSQL
Method.
lib/python/Products/ZSQLMethods/help/Z-SQL-Method_Test.stx
View file @
9ae2d7e8
...
...
@@ -2,24 +2,22 @@ Z SQL Method - Test: Test the validity of your SQL statement
Description
T
his view allows you to t
est a SQL method.
Test a SQL method.
Controls
'*[arument names]*' -- There will be one text field for each
argument specified for
the SQL method. The text field will contain the default
value.
**Important:** You must enter a value matching the specified argument type, otherwise a
"Type
Error" is returned.
'*[arument names]*' -- There will be one text field for each
argument specified for the SQL method. The text field will
contain the default value. **Important:** You must enter a
value matching the specified argument type, otherwise a "Type
Error" is returned.
'Submit Query' -- Causes the wuery to be executed and the results are returned
as an HTML table. If the query was had a syntax error or
the accessed table did not exist, a database-specific error
message is returned in form of an exception.
'Submit Query' -- Causes the query to be executed and the
results are returned as an HTML table. If the query was had a
syntax error or the accessed table did not exist, a
database-specific error message is returned in form of an
exception.
Furthermore, if you have a SQL statement that does not
return any data, Zope will tell you that this SQL statement
was not a query. Even though that may look like an error
message, Zope exits cleanly and does not throw an exception.
If you have a SQL statement that does not return any data,
Zope will tell you that this SQL statement was not a
query and will not display any results.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment