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
3e0ffac6
Commit
3e0ffac6
authored
Nov 25, 2003
by
Amos Latteier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the Zope Tutorial to use ZPT in place of DTML.
parent
11ac7685
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
416 additions
and
295 deletions
+416
-295
import/ZopeTutorialExamples.zexp
import/ZopeTutorialExamples.zexp
+0
-0
lib/python/Products/ZopeTutorial/CHANGES.txt
lib/python/Products/ZopeTutorial/CHANGES.txt
+16
-0
lib/python/Products/ZopeTutorial/TutorialTopic.py
lib/python/Products/ZopeTutorial/TutorialTopic.py
+11
-5
lib/python/Products/ZopeTutorial/dtml/lessonView.dtml
lib/python/Products/ZopeTutorial/dtml/lessonView.dtml
+0
-4
lib/python/Products/ZopeTutorial/glossary.stx
lib/python/Products/ZopeTutorial/glossary.stx
+86
-4
lib/python/Products/ZopeTutorial/tutorial.stx
lib/python/Products/ZopeTutorial/tutorial.stx
+302
-281
lib/python/Products/ZopeTutorial/version.txt
lib/python/Products/ZopeTutorial/version.txt
+1
-1
No files found.
import/ZopeTutorialExamples.zexp
View file @
3e0ffac6
No preview for this file type
lib/python/Products/ZopeTutorial/CHANGES.txt
View file @
3e0ffac6
Zope Tutorial 1.1
Features
* Updates lessions to use ZPT in place of DTML. This required
extensive reworking in some lessons.
* Update the examples .zexp file.
* Updated likes to the Zope book to refer to the current online
version.
* Updated the glossary.
* Added a ZPT reference link feature for the glossary.
Zope Tutorial 1.0a6
Bug Fixes
...
...
lib/python/Products/ZopeTutorial/TutorialTopic.py
View file @
3e0ffac6
...
...
@@ -18,8 +18,6 @@ import DocumentTemplate
import
StructuredText
import
re
from
zExceptions
import
BadRequest
pre_pat
=
re
.
compile
(
r'<PRE>(.+?)</PRE>'
,
re
.
IGNORECASE
|
re
.
DOTALL
)
tutorialExamplesFile
=
'ZopeTutorialExamples.zexp'
...
...
@@ -132,7 +130,7 @@ class GlossaryTopic(TutorialTopic):
Returns the URL to a API documentation for a given class.
"""
names
=
klass
.
split
(
'.'
)
url
=
"%s/Control_Panel/Products/%s/Help/%s.py#%s"
%
(
REQUEST
[
'
BASEPATH1
'
],
url
=
"%s/Control_Panel/Products/%s/Help/%s.py#%s"
%
(
REQUEST
[
'
SCRIPT_NAME
'
],
names
[
0
],
names
[
1
],
names
[
2
])
return
'<a href="%s">API Documentation</a>'
%
url
...
...
@@ -140,9 +138,17 @@ class GlossaryTopic(TutorialTopic):
"""
Returns the URL to a DTML Reference page for a given tag.
"""
url
=
"%s/Control_Panel/Products/OFSP/Help/dtml-%s.stx"
%
(
REQUEST
[
'
BASEPATH1
'
],
tag
)
url
=
"%s/Control_Panel/Products/OFSP/Help/dtml-%s.stx"
%
(
REQUEST
[
'
SCRIPT_NAME
'
],
tag
)
return
'<a href="%s">DTML Reference</a>'
%
url
def
zptLink
(
self
,
tag
,
REQUEST
):
"""
Returns the URL to a ZPT Reference page for a given topic.
"""
url
=
"%s/Control_Panel/Products/PageTemplates/Help/%s.stx"
%
(
REQUEST
[
'SCRIPT_NAME'
],
tag
)
return
'<a href="%s">ZPT Reference</a>'
%
url
addTutorialForm
=
DTMLFile
(
'dtml/tutorialAdd'
,
globals
())
...
...
@@ -162,7 +168,7 @@ def addTutorial(self, id, REQUEST=None, RESPONSE=None):
from
Products.ZGadflyDA.DA
import
data_sources
data_sources
()
except
:
raise
BadRequest
,
'The ZGadflyDA product must be installed!'
raise
'Bad Request'
,
'The ZGadflyDA product must be installed!'
# work around old Zope bug in importing
try
:
...
...
lib/python/Products/ZopeTutorial/dtml/lessonView.dtml
View file @
3e0ffac6
...
...
@@ -34,10 +34,6 @@ PRE {
<hr>
<dtml-var tutorialNavigation>
<p class="feedback">Comments on this lesson?
<a href="mailto:zdp@zope.org?subject=&dtml.url_quote_plus-title;">Email feedback</a>.
</p>
<dtml-var standard_html_footer>
lib/python/Products/ZopeTutorial/glossary.stx
View file @
3e0ffac6
Glossary
<!-- XXX fix this -->
For general information about Zope <a
href="http://www.zope.org/SiteIndex/searchForm"
For general information about Zope <a href="http://www.zope.org/"
target="_blank">search</a> Zope.org.
For Zope documentation try the <a href="http://zdp.zope.org"
...
...
@@ -99,7 +97,14 @@ Glossary
target="_blank">Advanced DTML chapter</a> of The Zope Book.
<dtml-var "dtmlLink('sendmail', REQUEST)">
[File] -- A Zope object that contains binary or textual data. Files
don't contain dynamic data.
For more information on Folders see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/BasicObject.stx"
target="_blank">Basic Objects chapter</a> of The Zope Book.
[Folder] -- A Zope object that contains other Zope objects. You can
move objects between Folders by cutting and pasting them. You can
add new objects to Folders with the product add list.
...
...
@@ -135,6 +140,29 @@ Glossary
Use the <dtml-sendmail> tag to send email.
<dtml-var "apiLink('MailHost.MailHost.MailHost', REQUEST)">
[Page Template] -- A dynamic web page object.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
[Page Template Macro] -- A device for sharing presentation between
page templates.
For more information on macros see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
[Page Template Statements] -- Special attributes that connect
templates to other components and dynamically tailor the HTML of the
template.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal', REQUEST)">
[Paste] -- Insert the objects from the clipboard into the current Folder.
...
...
@@ -156,6 +184,60 @@ Glossary
[standard_html_footer] -- The standard Zope footer object. By
convention this object displays an HTML footer.
[standard_template.pt] -- The standard Zope macro template. By
convention this object defines a whole page macro and a number of
slots. Other templates then use the macro and fill one or more
slots.
[tal:attributes] -- A ZTP statement that sets one or more tag
attributes.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
[tal:condition] -- A ZTP statement that conditionally includes a tag.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal-condition', REQUEST)">
[tal:content] -- A ZPT statement that replaces the content of a tag.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal-content', REQUEST)">
[tal:define] -- A ZPT statement that defines one or more variables.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal-define', REQUEST)">
[tal:repeat] -- A ZPT statement that loops over a list of objects
inserting a copy of the statement element for each item in the list.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal-repeat', REQUEST)">
[tal:replace] -- A ZPT statement that replaces a tag and its
contents entirely.
For more information on ZPT see the <a
href="http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx"
target="_blank">Page Templates chapter</a> of The Zope Book.
<dtml-var "zptLink('tal-replace', REQUEST)">
[title] -- Most Zope objects can have titles. Titles are optional
one line descriptions.
...
...
lib/python/Products/ZopeTutorial/tutorial.stx
View file @
3e0ffac6
This diff is collapsed.
Click to expand it.
lib/python/Products/ZopeTutorial/version.txt
View file @
3e0ffac6
Zope Tutorial 1.
0
Zope Tutorial 1.
1
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