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
13d8ba0a
Commit
13d8ba0a
authored
Oct 13, 2008
by
Sidnei da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Cleanup DocumentTemplate module for relative imports
parent
a538bdcd
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
53 additions
and
73 deletions
+53
-73
lib/python/DocumentTemplate/DT_HTML.py
lib/python/DocumentTemplate/DT_HTML.py
+4
-4
lib/python/DocumentTemplate/DT_If.py
lib/python/DocumentTemplate/DT_If.py
+1
-1
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+10
-6
lib/python/DocumentTemplate/DT_InSV.py
lib/python/DocumentTemplate/DT_InSV.py
+2
-1
lib/python/DocumentTemplate/DT_Let.py
lib/python/DocumentTemplate/DT_Let.py
+3
-2
lib/python/DocumentTemplate/DT_Raise.py
lib/python/DocumentTemplate/DT_Raise.py
+1
-1
lib/python/DocumentTemplate/DT_Return.py
lib/python/DocumentTemplate/DT_Return.py
+1
-5
lib/python/DocumentTemplate/DT_String.py
lib/python/DocumentTemplate/DT_String.py
+4
-11
lib/python/DocumentTemplate/DT_Try.py
lib/python/DocumentTemplate/DT_Try.py
+3
-3
lib/python/DocumentTemplate/DT_UI.py
lib/python/DocumentTemplate/DT_UI.py
+1
-1
lib/python/DocumentTemplate/DT_Util.py
lib/python/DocumentTemplate/DT_Util.py
+5
-14
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+3
-7
lib/python/DocumentTemplate/DT_With.py
lib/python/DocumentTemplate/DT_With.py
+4
-2
lib/python/DocumentTemplate/VSEval.py
lib/python/DocumentTemplate/VSEval.py
+1
-1
lib/python/DocumentTemplate/_DocumentTemplate.py
lib/python/DocumentTemplate/_DocumentTemplate.py
+3
-9
lib/python/DocumentTemplate/__init__.py
lib/python/DocumentTemplate/__init__.py
+2
-1
lib/python/DocumentTemplate/html_quote.py
lib/python/DocumentTemplate/html_quote.py
+1
-1
lib/python/DocumentTemplate/pDocumentTemplate.py
lib/python/DocumentTemplate/pDocumentTemplate.py
+1
-1
lib/python/Shared/DC/ZRDB/sqlvar.py
lib/python/Shared/DC/ZRDB/sqlvar.py
+3
-2
No files found.
lib/python/DocumentTemplate/DT_HTML.py
View file @
13d8ba0a
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
$Id$"""
$Id$"""
from
DT_String
import
String
,
FileMixin
import
re
import
DT_String
,
re
from
DocumentTemplate.DT_String
import
String
,
FileMixin
from
DT_Util
import
ParseError
,
str
from
D
ocumentTemplate.D
T_Util
import
ParseError
,
str
class
dtml_re_class
:
class
dtml_re_class
:
""" This needs to be replaced before 2.4. It's a hackaround. """
""" This needs to be replaced before 2.4. It's a hackaround. """
...
@@ -129,7 +129,7 @@ class dtml_re_class:
...
@@ -129,7 +129,7 @@ class dtml_re_class:
def
start
(
self
,
*
args
):
def
start
(
self
,
*
args
):
return
self
.
_start
return
self
.
_start
class
HTML
(
DT_String
.
String
):
class
HTML
(
String
):
"""HTML Document Templates
"""HTML Document Templates
HTML Document templates use HTML server-side-include syntax,
HTML Document templates use HTML server-side-include syntax,
...
...
lib/python/DocumentTemplate/DT_If.py
View file @
13d8ba0a
...
@@ -78,7 +78,7 @@ __doc__='''Conditional insertion
...
@@ -78,7 +78,7 @@ __doc__='''Conditional insertion
__rcs_id__
=
'$Id$'
__rcs_id__
=
'$Id$'
__version__
=
'$Revision: 1.19 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.19 $'
[
11
:
-
2
]
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
from
D
ocumentTemplate.D
T_Util
import
ParseError
,
parse_params
,
name_param
,
str
class
If
:
class
If
:
blockContinuations
=
'else'
,
'elif'
blockContinuations
=
'else'
,
'elif'
...
...
lib/python/DocumentTemplate/DT_In.py
View file @
13d8ba0a
...
@@ -333,13 +333,17 @@ __rcs_id__='$Id$'
...
@@ -333,13 +333,17 @@ __rcs_id__='$Id$'
__version__
=
'$Revision: 1.62 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.62 $'
[
11
:
-
2
]
import
sys
import
sys
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
,
join_unicode
from
DT_Util
import
render_blocks
,
InstanceDict
,
ValidationError
,
Eval
from
DT_Util
import
simple_name
,
add_with_prefix
import
re
import
re
from
DT_InSV
import
sequence_variables
,
opt
TupleType
=
type
(())
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
StringTypes
=
(
type
(
''
),
type
(
u''
))
from
DocumentTemplate.DT_Util
import
str
,
join_unicode
from
DocumentTemplate.DT_Util
import
render_blocks
,
InstanceDict
from
DocumentTemplate.DT_Util
import
ValidationError
,
Eval
from
DocumentTemplate.DT_Util
import
simple_name
,
add_with_prefix
from
DocumentTemplate.DT_InSV
import
sequence_variables
,
opt
TupleType
=
tuple
StringTypes
=
(
str
,
unicode
)
class
InFactory
:
class
InFactory
:
blockContinuations
=
(
'else'
,)
blockContinuations
=
(
'else'
,)
...
...
lib/python/DocumentTemplate/DT_InSV.py
View file @
13d8ba0a
...
@@ -18,12 +18,13 @@ __version__='$Revision: 1.22 $'[11:-2]
...
@@ -18,12 +18,13 @@ __version__='$Revision: 1.22 $'[11:-2]
from
math
import
sqrt
from
math
import
sqrt
import
re
import
re
TupleType
=
type
(())
try
:
try
:
import
Missing
import
Missing
mv
=
Missing
.
Value
mv
=
Missing
.
Value
except
:
mv
=
None
except
:
mv
=
None
TupleType
=
tuple
class
sequence_variables
:
class
sequence_variables
:
...
...
lib/python/DocumentTemplate/DT_Let.py
View file @
13d8ba0a
...
@@ -40,10 +40,11 @@
...
@@ -40,10 +40,11 @@
as desired.
as desired.
'''
'''
from
DT_Util
import
render_blocks
,
Eval
,
ParseError
from
DT_Util
import
str
# Probably needed due to hysterical pickles.
import
re
import
re
from
DocumentTemplate.DT_Util
import
render_blocks
,
Eval
,
ParseError
from
DocumentTemplate.DT_Util
import
str
# Probably needed due to
# hysterical pickles.
class
Let
:
class
Let
:
blockContinuations
=
()
blockContinuations
=
()
...
...
lib/python/DocumentTemplate/DT_Raise.py
View file @
13d8ba0a
...
@@ -27,7 +27,7 @@ __rcs_id__='$Id$'
...
@@ -27,7 +27,7 @@ __rcs_id__='$Id$'
__version__
=
'$Revision: 1.13 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.13 $'
[
11
:
-
2
]
from
zExceptions
import
upgradeException
from
zExceptions
import
upgradeException
from
DT_Util
import
parse_params
,
name_param
,
render_blocks
,
str
from
D
ocumentTemplate.D
T_Util
import
parse_params
,
name_param
,
render_blocks
,
str
class
InvalidErrorTypeExpression
(
Exception
):
class
InvalidErrorTypeExpression
(
Exception
):
pass
pass
...
...
lib/python/DocumentTemplate/DT_Return.py
View file @
13d8ba0a
...
@@ -12,11 +12,7 @@
...
@@ -12,11 +12,7 @@
##############################################################################
##############################################################################
__version__
=
'$Revision: 1.9 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.9 $'
[
11
:
-
2
]
try
:
from
DocumentTemplate.DT_Util
import
parse_params
,
name_param
from
DT_Util
import
parse_params
,
name_param
except
ImportError
:
# See PEP-328
from
.DT_Util
import
parse_params
,
name_param
class
ReturnTag
:
class
ReturnTag
:
name
=
'return'
name
=
'return'
...
...
lib/python/DocumentTemplate/DT_String.py
View file @
13d8ba0a
...
@@ -16,17 +16,10 @@ import os
...
@@ -16,17 +16,10 @@ import os
import
thread
import
thread
import
re
import
re
try
:
from
DocumentTemplate.DT_Util
import
ParseError
,
InstanceDict
from
DT_Util
import
ParseError
,
InstanceDict
from
DocumentTemplate.DT_Util
import
TemplateDict
,
render_blocks
,
str
from
DT_Util
import
TemplateDict
,
render_blocks
,
str
from
DocumentTemplate.DT_Var
import
Var
,
Call
,
Comment
from
DT_Var
import
Var
,
Call
,
Comment
from
DocumentTemplate.DT_Return
import
ReturnTag
,
DTReturn
from
DT_Return
import
ReturnTag
,
DTReturn
except
ImportError
:
# See PEP-328
from
.DT_Util
import
ParseError
,
InstanceDict
from
.DT_Util
import
TemplateDict
,
render_blocks
,
str
from
.DT_Var
import
Var
,
Call
,
Comment
from
.DT_Return
import
ReturnTag
,
DTReturn
_marker
=
[]
# Create a new marker object.
_marker
=
[]
# Create a new marker object.
...
...
lib/python/DocumentTemplate/DT_Try.py
View file @
13d8ba0a
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
import
sys
,
traceback
import
sys
,
traceback
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
from
DT_Util
import
ParseError
,
parse_params
,
render_blocks
from
D
ocumentTemplate.D
T_Util
import
ParseError
,
parse_params
,
render_blocks
from
DT_Util
import
namespace
,
InstanceDict
from
D
ocumentTemplate.D
T_Util
import
namespace
,
InstanceDict
from
DT_Return
import
DTReturn
from
D
ocumentTemplate.D
T_Return
import
DTReturn
class
Try
:
class
Try
:
"""Zope DTML Exception handling
"""Zope DTML Exception handling
...
...
lib/python/DocumentTemplate/DT_UI.py
View file @
13d8ba0a
...
@@ -15,7 +15,7 @@ __doc__='''Machinery to support through-the-web editing
...
@@ -15,7 +15,7 @@ __doc__='''Machinery to support through-the-web editing
$Id$'''
$Id$'''
__version__
=
'$Revision: 1.15 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.15 $'
[
11
:
-
2
]
from
DT_HTML
import
HTML
from
D
ocumentTemplate.D
T_HTML
import
HTML
FactoryDefaultString
=
"Factory Default"
FactoryDefaultString
=
"Factory Default"
...
...
lib/python/DocumentTemplate/DT_Util.py
View file @
13d8ba0a
...
@@ -16,21 +16,12 @@ $Id$"""
...
@@ -16,21 +16,12 @@ $Id$"""
import
re
import
re
try
:
# for import by other modules, dont remove!
# for import by other modules, dont remove!
from
DocumentTemplate.html_quote
import
html_quote
,
ustr
from
html_quote
import
html_quote
,
ustr
from
cDocumentTemplate
import
InstanceDict
,
TemplateDict
from
cDocumentTemplate
import
render_blocks
,
safe_callable
from
cDocumentTemplate
import
join_unicode
except
ImportError
:
# See PEP-328:
# for import by other modules, dont remove!
from
.html_quote
import
html_quote
,
ustr
from
.cDocumentTemplate
import
InstanceDict
,
TemplateDict
from
DocumentTemplate
.cDocumentTemplate
import
InstanceDict
,
TemplateDict
from
.cDocumentTemplate
import
render_blocks
,
safe_callable
from
DocumentTemplate
.cDocumentTemplate
import
render_blocks
,
safe_callable
from
.cDocumentTemplate
import
join_unicode
from
DocumentTemplate
.cDocumentTemplate
import
join_unicode
from
RestrictedPython.Guards
import
safe_builtins
from
RestrictedPython.Guards
import
safe_builtins
from
RestrictedPython.Utilities
import
utility_builtins
from
RestrictedPython.Utilities
import
utility_builtins
...
...
lib/python/DocumentTemplate/DT_Var.py
View file @
13d8ba0a
...
@@ -159,13 +159,9 @@ import string, re, sys
...
@@ -159,13 +159,9 @@ import string, re, sys
from
cgi
import
escape
from
cgi
import
escape
from
urllib
import
quote
,
quote_plus
,
unquote
,
unquote_plus
from
urllib
import
quote
,
quote_plus
,
unquote
,
unquote_plus
try
:
# for import by other modules, dont remove!
# for import by other modules, dont remove!
from
DocumentTemplate.html_quote
import
html_quote
from
html_quote
import
html_quote
from
DocumentTemplate.DT_Util
import
parse_params
,
name_param
,
str
,
ustr
from
DT_Util
import
parse_params
,
name_param
,
str
,
ustr
except
ImportError
:
from
.html_quote
import
html_quote
from
.DT_Util
import
parse_params
,
name_param
,
str
,
ustr
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
ZPublisher.TaintedString
import
TaintedString
from
ZPublisher.TaintedString
import
TaintedString
...
...
lib/python/DocumentTemplate/DT_With.py
View file @
13d8ba0a
...
@@ -36,8 +36,10 @@
...
@@ -36,8 +36,10 @@
__rcs_id__
=
'$Id$'
__rcs_id__
=
'$Id$'
__version__
=
'$Revision: 1.15 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.15 $'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
InstanceDict
,
render_blocks
,
str
from
DocumentTemplate.DT_Util
import
parse_params
,
name_param
from
DT_Util
import
TemplateDict
from
DocumentTemplate.DT_Util
import
InstanceDict
,
render_blocks
,
str
from
DocumentTemplate.DT_Util
import
TemplateDict
class
With
:
class
With
:
blockContinuations
=
()
blockContinuations
=
()
name
=
'with'
name
=
'with'
...
...
lib/python/DocumentTemplate/VSEval.py
View file @
13d8ba0a
# alias module for backwards compatibility
# alias module for backwards compatibility
from
DT_Util
import
Eval
from
D
ocumentTemplate.D
T_Util
import
Eval
def
careful_mul
(
env
,
*
factors
):
def
careful_mul
(
env
,
*
factors
):
r
=
1
r
=
1
...
...
lib/python/DocumentTemplate/DocumentTemplate.py
→
lib/python/DocumentTemplate/
_
DocumentTemplate.py
View file @
13d8ba0a
...
@@ -107,14 +107,8 @@ Document Templates may be created 4 ways:
...
@@ -107,14 +107,8 @@ Document Templates may be created 4 ways:
__version__
=
'$Revision: 1.14 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.14 $'
[
11
:
-
2
]
ParseError
=
'Document Template Parse Error'
from
DocumentTemplate.DT_Raise
import
ParseError
from
DocumentTemplate.DT_String
import
String
,
File
try
:
from
DocumentTemplate.DT_HTML
import
HTML
,
HTMLFile
,
HTMLDefault
from
DT_String
import
String
,
File
from
DT_HTML
import
HTML
,
HTMLFile
,
HTMLDefault
except
ImportError
:
# See PEP-328
from
.DT_String
import
String
,
File
from
.DT_HTML
import
HTML
,
HTMLFile
,
HTMLDefault
# import DT_UI # Install HTML editing
# import DT_UI # Install HTML editing
lib/python/DocumentTemplate/__init__.py
View file @
13d8ba0a
...
@@ -18,4 +18,5 @@ segregated in a separate package.
...
@@ -18,4 +18,5 @@ segregated in a separate package.
$Id$'''
$Id$'''
__version__
=
'$Revision: 1.18 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.18 $'
[
11
:
-
2
]
from
DocumentTemplate
import
String
,
File
,
HTML
,
HTMLDefault
,
HTMLFile
from
DocumentTemplate.DT_String
import
String
,
File
from
DocumentTemplate.DT_HTML
import
HTML
,
HTMLDefault
,
HTMLFile
lib/python/DocumentTemplate/html_quote.py
View file @
13d8ba0a
# split off into its own module for aliasing without circrefs
# split off into its own module for aliasing without circrefs
from
cgi
import
escape
from
cgi
import
escape
from
ustr
import
ustr
from
DocumentTemplate.
ustr
import
ustr
def
html_quote
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
def
html_quote
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
return
escape
(
ustr
(
v
),
1
)
return
escape
(
ustr
(
v
),
1
)
lib/python/DocumentTemplate/pDocumentTemplate.py
View file @
13d8ba0a
...
@@ -20,7 +20,7 @@ __version__='$Revision: 1.42 $'[11:-2]
...
@@ -20,7 +20,7 @@ __version__='$Revision: 1.42 $'[11:-2]
import
sys
,
types
import
sys
,
types
from
types
import
StringType
,
UnicodeType
,
TupleType
from
types
import
StringType
,
UnicodeType
,
TupleType
from
ustr
import
ustr
from
DocumentTemplate.
ustr
import
ustr
import
warnings
import
warnings
warnings
.
warn
(
'pDocumentTemplate is not longer in active use. '
warnings
.
warn
(
'pDocumentTemplate is not longer in active use. '
...
...
lib/python/Shared/DC/ZRDB/sqlvar.py
View file @
13d8ba0a
...
@@ -61,9 +61,10 @@ __version__='$Revision: 1.15 $'[11:-2]
...
@@ -61,9 +61,10 @@ __version__='$Revision: 1.15 $'[11:-2]
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
from
string
import
find
,
split
,
join
,
atoi
,
atof
from
string
import
find
,
split
,
join
,
atoi
,
atof
StringType
=
type
(
''
)
str
=
__builtins__
[
'str'
]
StringType
=
str
str
=
__builtins__
[
'str'
]
class
SQLVar
:
class
SQLVar
:
name
=
'sqlvar'
name
=
'sqlvar'
...
...
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