Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
015af31a
Commit
015af31a
authored
Jul 06, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MailTemplates: fix newlines in BaseMailTemplate.py (LF, no trailing space)
parent
cd4ae3d6
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1538 additions
and
1540 deletions
+1538
-1540
product/MailTemplates/BaseMailTemplate.py
product/MailTemplates/BaseMailTemplate.py
+161
-163
product/MailTemplates/FSMailTemplate.py
product/MailTemplates/FSMailTemplate.py
+104
-104
product/MailTemplates/MailTemplate.py
product/MailTemplates/MailTemplate.py
+105
-105
product/MailTemplates/__init__.py
product/MailTemplates/__init__.py
+85
-85
product/MailTemplates/tests/__init__.py
product/MailTemplates/tests/__init__.py
+6
-6
product/MailTemplates/tests/example1.mt
product/MailTemplates/tests/example1.mt
+14
-14
product/MailTemplates/tests/example3.mt
product/MailTemplates/tests/example3.mt
+10
-10
product/MailTemplates/tests/example4.mt
product/MailTemplates/tests/example4.mt
+10
-10
product/MailTemplates/tests/test_FSMailTemplate.py
product/MailTemplates/tests/test_FSMailTemplate.py
+167
-167
product/MailTemplates/tests/test_MailTemplate.py
product/MailTemplates/tests/test_MailTemplate.py
+876
-876
No files found.
product/MailTemplates/BaseMailTemplate.py
View file @
015af31a
This diff is collapsed.
Click to expand it.
product/MailTemplates/FSMailTemplate.py
View file @
015af31a
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
App.class_init
import
default__class_init__
as
InitializeClass
from
Products.CMFCore.FSPageTemplate
import
FSPageTemplate
from
Products.CMFCore.DirectoryView
import
registerFileExtension
from
Products.CMFCore.DirectoryView
import
registerMetaType
from
BaseMailTemplate
import
BaseMailTemplate
from
MailTemplate
import
MailTemplate
class
FSMailTemplate
(
BaseMailTemplate
,
FSPageTemplate
):
"Wrapper for Mail Template"
security
=
ClassSecurityInfo
()
meta_type
=
'Filesystem Mail Template'
def
__init__
(
self
,
id
,
filepath
,
fullname
=
None
,
properties
=
None
):
FSPageTemplate
.
__init__
(
self
,
id
,
filepath
,
fullname
,
properties
)
self
.
_properties
=
properties
security
.
declarePrivate
(
'_createZODBClone'
)
def
_createZODBClone
(
self
):
"""Create a ZODB (editable) equivalent of this object."""
obj
=
MailTemplate
(
self
.
getId
(),
self
.
_text
,
self
.
content_type
)
obj
.
expand
=
0
obj
.
write
(
self
.
read
())
obj
.
_setPropValue
(
'mailhost'
,
self
.
mailhost
)
obj
.
content_type
=
self
.
content_type
if
self
.
_properties
:
keys
=
self
.
_properties
.
keys
()
keys
.
sort
()
for
id
in
keys
:
if
id
not
in
(
'mailhost'
,
'content_type'
):
obj
.
manage_addProperty
(
id
,
self
.
_properties
[
id
],
'string'
)
return
obj
security
.
declarePrivate
(
'_readFile'
)
def
_readFile
(
self
,
reparse
):
fp
=
self
.
_filepath
file
=
open
(
fp
,
'r'
)
# not 'rb', as this is a text file!
try
:
data
=
file
.
read
()
finally
:
file
.
close
()
if
reparse
:
self
.
write
(
data
)
def
_exec
(
self
,
bound_names
,
args
,
kw
):
"""Call a FSPageTemplate"""
try
:
response
=
self
.
REQUEST
.
RESPONSE
except
AttributeError
:
response
=
None
# Read file first to get a correct content_type default value.
self
.
_updateFromFS
()
if
not
kw
.
has_key
(
'args'
):
kw
[
'args'
]
=
args
bound_names
[
'options'
]
=
kw
security
=
getSecurityManager
()
bound_names
[
'user'
]
=
security
.
getUser
().
getIdOrUserName
()
# Retrieve the value from the cache.
keyset
=
None
if
self
.
ZCacheable_isCachingEnabled
():
# Prepare a cache key.
keyset
=
{
# Why oh why?
# All this code is cut and paste
# here to make sure that we
# dont call _getContext and hence can't cache
# Annoying huh?
'here'
:
self
.
aq_parent
.
getPhysicalPath
(),
'bound_names'
:
bound_names
}
result
=
self
.
ZCacheable_get
(
keywords
=
keyset
)
if
result
is
not
None
:
# Got a cached value.
return
result
# Execute the template in a new security context.
security
.
addContext
(
self
)
try
:
result
=
self
.
pt_render
(
extra_context
=
bound_names
)
if
keyset
is
not
None
:
# Store the result in the cache.
self
.
ZCacheable_set
(
result
,
keywords
=
keyset
)
return
result
finally
:
security
.
removeContext
(
self
)
return
result
InitializeClass
(
FSMailTemplate
)
registerFileExtension
(
'mt'
,
FSMailTemplate
)
registerMetaType
(
'Mail Template'
,
FSMailTemplate
)
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
App.class_init
import
default__class_init__
as
InitializeClass
from
Products.CMFCore.FSPageTemplate
import
FSPageTemplate
from
Products.CMFCore.DirectoryView
import
registerFileExtension
from
Products.CMFCore.DirectoryView
import
registerMetaType
from
BaseMailTemplate
import
BaseMailTemplate
from
MailTemplate
import
MailTemplate
class
FSMailTemplate
(
BaseMailTemplate
,
FSPageTemplate
):
"Wrapper for Mail Template"
security
=
ClassSecurityInfo
()
meta_type
=
'Filesystem Mail Template'
def
__init__
(
self
,
id
,
filepath
,
fullname
=
None
,
properties
=
None
):
FSPageTemplate
.
__init__
(
self
,
id
,
filepath
,
fullname
,
properties
)
self
.
_properties
=
properties
security
.
declarePrivate
(
'_createZODBClone'
)
def
_createZODBClone
(
self
):
"""Create a ZODB (editable) equivalent of this object."""
obj
=
MailTemplate
(
self
.
getId
(),
self
.
_text
,
self
.
content_type
)
obj
.
expand
=
0
obj
.
write
(
self
.
read
())
obj
.
_setPropValue
(
'mailhost'
,
self
.
mailhost
)
obj
.
content_type
=
self
.
content_type
if
self
.
_properties
:
keys
=
self
.
_properties
.
keys
()
keys
.
sort
()
for
id
in
keys
:
if
id
not
in
(
'mailhost'
,
'content_type'
):
obj
.
manage_addProperty
(
id
,
self
.
_properties
[
id
],
'string'
)
return
obj
security
.
declarePrivate
(
'_readFile'
)
def
_readFile
(
self
,
reparse
):
fp
=
self
.
_filepath
file
=
open
(
fp
,
'r'
)
# not 'rb', as this is a text file!
try
:
data
=
file
.
read
()
finally
:
file
.
close
()
if
reparse
:
self
.
write
(
data
)
def
_exec
(
self
,
bound_names
,
args
,
kw
):
"""Call a FSPageTemplate"""
try
:
response
=
self
.
REQUEST
.
RESPONSE
except
AttributeError
:
response
=
None
# Read file first to get a correct content_type default value.
self
.
_updateFromFS
()
if
not
kw
.
has_key
(
'args'
):
kw
[
'args'
]
=
args
bound_names
[
'options'
]
=
kw
security
=
getSecurityManager
()
bound_names
[
'user'
]
=
security
.
getUser
().
getIdOrUserName
()
# Retrieve the value from the cache.
keyset
=
None
if
self
.
ZCacheable_isCachingEnabled
():
# Prepare a cache key.
keyset
=
{
# Why oh why?
# All this code is cut and paste
# here to make sure that we
# dont call _getContext and hence can't cache
# Annoying huh?
'here'
:
self
.
aq_parent
.
getPhysicalPath
(),
'bound_names'
:
bound_names
}
result
=
self
.
ZCacheable_get
(
keywords
=
keyset
)
if
result
is
not
None
:
# Got a cached value.
return
result
# Execute the template in a new security context.
security
.
addContext
(
self
)
try
:
result
=
self
.
pt_render
(
extra_context
=
bound_names
)
if
keyset
is
not
None
:
# Store the result in the cache.
self
.
ZCacheable_set
(
result
,
keywords
=
keyset
)
return
result
finally
:
security
.
removeContext
(
self
)
return
result
InitializeClass
(
FSMailTemplate
)
registerFileExtension
(
'mt'
,
FSMailTemplate
)
registerMetaType
(
'Mail Template'
,
FSMailTemplate
)
product/MailTemplates/MailTemplate.py
View file @
015af31a
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
import
os
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
App.class_init
import
default__class_init__
as
InitializeClass
from
App.Common
import
package_home
from
Products.PageTemplates.ZopePageTemplate
import
ZopePageTemplate
from
Products.PageTemplates.PageTemplate
import
PageTemplate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
BaseMailTemplate
import
BaseMailTemplate
class
MailTemplate
(
BaseMailTemplate
,
ZopePageTemplate
):
"A ZPT-like template for sending mails"
security
=
ClassSecurityInfo
()
meta_type
=
'Mail Template'
_properties
=
()
manage_options
=
ZopePageTemplate
.
manage_options
[
0
:
1
]
+
\
ZopePageTemplate
.
manage_options
[
2
:]
_default_content_fn
=
os
.
path
.
join
(
package_home
(
globals
()),
'www'
,
'default.txt'
)
security
.
declareProtected
(
'View management screens'
,
'pt_editForm'
)
pt_editForm
=
PageTemplateFile
(
'www/mtEdit'
,
globals
(),
__name__
=
'pt_editForm'
)
manage
=
manage_main
=
pt_editForm
security
.
declareProtected
(
'Change Page Templates'
,
'pt_editAction'
)
def
pt_editAction
(
self
,
REQUEST
,
mailhost
,
text
,
content_type
,
expand
):
"""Change the mailhost and document."""
if
self
.
wl_isLocked
():
raise
ResourceLockedError
,
"File is locked via WebDAV"
self
.
expand
=
expand
self
.
_setPropValue
(
'mailhost'
,
mailhost
)
self
.
pt_edit
(
text
,
content_type
)
REQUEST
.
set
(
'text'
,
self
.
read
())
# May not equal 'text'!
message
=
"Saved changes."
if
getattr
(
self
,
'_v_warnings'
,
None
):
message
=
(
"<strong>Warning:</strong> <i>%s</i>"
%
'<br>'
.
join
(
self
.
_v_warnings
))
return
self
.
pt_editForm
(
manage_tabs_message
=
message
)
def
om_icons
(
self
):
"""Return a list of icon URLs to be displayed by an ObjectManager"""
icons
=
({
'path'
:
'misc_/MailTemplates/mt.gif'
,
'alt'
:
self
.
meta_type
,
'title'
:
self
.
meta_type
},)
if
not
self
.
_v_cooked
:
self
.
_cook
()
if
self
.
_v_errors
:
icons
=
icons
+
({
'path'
:
'misc_/PageTemplates/exclamation.gif'
,
'alt'
:
'Error'
,
'title'
:
'This template has an error'
},)
return
icons
def
_exec
(
self
,
bound_names
,
args
,
kw
):
"""Call a Page Template"""
if
not
kw
.
has_key
(
'args'
):
kw
[
'args'
]
=
args
bound_names
[
'options'
]
=
kw
security
=
getSecurityManager
()
bound_names
[
'user'
]
=
security
.
getUser
().
getIdOrUserName
()
# Retrieve the value from the cache.
keyset
=
None
if
self
.
ZCacheable_isCachingEnabled
():
# Prepare a cache key.
keyset
=
{
'here'
:
self
.
_getContext
(),
'bound_names'
:
bound_names
}
result
=
self
.
ZCacheable_get
(
keywords
=
keyset
)
if
result
is
not
None
:
# Got a cached value.
return
result
# Execute the template in a new security context.
security
.
addContext
(
self
)
try
:
result
=
self
.
pt_render
(
extra_context
=
bound_names
)
if
keyset
is
not
None
:
# Store the result in the cache.
self
.
ZCacheable_set
(
result
,
keywords
=
keyset
)
return
result
finally
:
security
.
removeContext
(
self
)
def
pt_render
(
self
,
source
=
False
,
extra_context
=
{}):
# Override to support empty strings
result
=
PageTemplate
.
pt_render
(
self
,
source
,
extra_context
)
or
u''
assert
isinstance
(
result
,
unicode
)
return
result
InitializeClass
(
MailTemplate
)
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
import
os
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
App.class_init
import
default__class_init__
as
InitializeClass
from
App.Common
import
package_home
from
Products.PageTemplates.ZopePageTemplate
import
ZopePageTemplate
from
Products.PageTemplates.PageTemplate
import
PageTemplate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
BaseMailTemplate
import
BaseMailTemplate
class
MailTemplate
(
BaseMailTemplate
,
ZopePageTemplate
):
"A ZPT-like template for sending mails"
security
=
ClassSecurityInfo
()
meta_type
=
'Mail Template'
_properties
=
()
manage_options
=
ZopePageTemplate
.
manage_options
[
0
:
1
]
+
\
ZopePageTemplate
.
manage_options
[
2
:]
_default_content_fn
=
os
.
path
.
join
(
package_home
(
globals
()),
'www'
,
'default.txt'
)
security
.
declareProtected
(
'View management screens'
,
'pt_editForm'
)
pt_editForm
=
PageTemplateFile
(
'www/mtEdit'
,
globals
(),
__name__
=
'pt_editForm'
)
manage
=
manage_main
=
pt_editForm
security
.
declareProtected
(
'Change Page Templates'
,
'pt_editAction'
)
def
pt_editAction
(
self
,
REQUEST
,
mailhost
,
text
,
content_type
,
expand
):
"""Change the mailhost and document."""
if
self
.
wl_isLocked
():
raise
ResourceLockedError
,
"File is locked via WebDAV"
self
.
expand
=
expand
self
.
_setPropValue
(
'mailhost'
,
mailhost
)
self
.
pt_edit
(
text
,
content_type
)
REQUEST
.
set
(
'text'
,
self
.
read
())
# May not equal 'text'!
message
=
"Saved changes."
if
getattr
(
self
,
'_v_warnings'
,
None
):
message
=
(
"<strong>Warning:</strong> <i>%s</i>"
%
'<br>'
.
join
(
self
.
_v_warnings
))
return
self
.
pt_editForm
(
manage_tabs_message
=
message
)
def
om_icons
(
self
):
"""Return a list of icon URLs to be displayed by an ObjectManager"""
icons
=
({
'path'
:
'misc_/MailTemplates/mt.gif'
,
'alt'
:
self
.
meta_type
,
'title'
:
self
.
meta_type
},)
if
not
self
.
_v_cooked
:
self
.
_cook
()
if
self
.
_v_errors
:
icons
=
icons
+
({
'path'
:
'misc_/PageTemplates/exclamation.gif'
,
'alt'
:
'Error'
,
'title'
:
'This template has an error'
},)
return
icons
def
_exec
(
self
,
bound_names
,
args
,
kw
):
"""Call a Page Template"""
if
not
kw
.
has_key
(
'args'
):
kw
[
'args'
]
=
args
bound_names
[
'options'
]
=
kw
security
=
getSecurityManager
()
bound_names
[
'user'
]
=
security
.
getUser
().
getIdOrUserName
()
# Retrieve the value from the cache.
keyset
=
None
if
self
.
ZCacheable_isCachingEnabled
():
# Prepare a cache key.
keyset
=
{
'here'
:
self
.
_getContext
(),
'bound_names'
:
bound_names
}
result
=
self
.
ZCacheable_get
(
keywords
=
keyset
)
if
result
is
not
None
:
# Got a cached value.
return
result
# Execute the template in a new security context.
security
.
addContext
(
self
)
try
:
result
=
self
.
pt_render
(
extra_context
=
bound_names
)
if
keyset
is
not
None
:
# Store the result in the cache.
self
.
ZCacheable_set
(
result
,
keywords
=
keyset
)
return
result
finally
:
security
.
removeContext
(
self
)
def
pt_render
(
self
,
source
=
False
,
extra_context
=
{}):
# Override to support empty strings
result
=
PageTemplate
.
pt_render
(
self
,
source
,
extra_context
)
or
u''
assert
isinstance
(
result
,
unicode
)
return
result
InitializeClass
(
MailTemplate
)
product/MailTemplates/__init__.py
View file @
015af31a
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
from
AccessControl
import
allow_module
,
allow_class
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
MailTemplate
import
MailTemplate
from
types
import
ClassType
from
urllib
import
quote
try
:
import
Products.CMFCore
except
ImportError
:
pass
else
:
import
FSMailTemplate
import
Products.CMFCore.utils
Products
.
CMFCore
.
utils
.
registerIcon
(
FSMailTemplate
.
FSMailTemplate
,
'www/fsmt.gif'
,
globals
())
def
initialize
(
context
):
context
.
registerClass
(
MailTemplate
,
# we use the same permission as page templates
# in order to keep things simple.
permission
=
'Add Page Templates'
,
constructors
=
(
addMailTemplateForm
,
addMailTemplate
),
icon
=
'www/mt.gif'
,
)
addMailTemplateForm
=
PageTemplateFile
(
'www/mtAdd'
,
globals
(),
__name__
=
'addMailTemplateForm'
)
def
addMailTemplate
(
self
,
id
,
mailhost
=
None
,
text
=
None
,
REQUEST
=
None
,
submit
=
None
):
"Add a Mail Template with optional file content."
id
=
str
(
id
)
if
REQUEST
is
None
:
self
.
_setObject
(
id
,
MailTemplate
(
id
,
text
))
ob
=
getattr
(
self
,
id
)
if
mailhost
:
ob
.
_setPropValue
(
'mailhost'
,
mailhost
)
return
ob
else
:
file
=
REQUEST
.
form
.
get
(
'file'
)
headers
=
getattr
(
file
,
'headers'
,
None
)
if
headers
is
None
or
not
file
.
filename
:
mt
=
MailTemplate
(
id
,
text
)
else
:
mt
=
MailTemplate
(
id
,
file
,
headers
.
get
(
'content_type'
))
self
.
_setObject
(
id
,
mt
)
ob
=
getattr
(
self
,
id
)
if
mailhost
:
ob
.
_setPropValue
(
'mailhost'
,
mailhost
)
if
submit
==
" Add and Edit "
:
u
=
ob
.
absolute_url
()
else
:
u
=
ob
.
aq_parent
.
absolute_url
()
REQUEST
.
RESPONSE
.
redirect
(
u
+
'/manage_main'
)
# allow all the email module's public bits
import
email
for
name
in
email
.
__all__
:
path
=
'email.'
+
name
allow_module
(
path
)
try
:
mod
=
__import__
(
path
)
except
ImportError
:
pass
else
:
mod
=
getattr
(
mod
,
name
)
for
mod_name
in
dir
(
mod
):
obj
=
getattr
(
mod
,
mod_name
)
if
isinstance
(
obj
,
ClassType
):
allow_class
(
obj
)
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
from
AccessControl
import
allow_module
,
allow_class
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
MailTemplate
import
MailTemplate
from
types
import
ClassType
from
urllib
import
quote
try
:
import
Products.CMFCore
except
ImportError
:
pass
else
:
import
FSMailTemplate
import
Products.CMFCore.utils
Products
.
CMFCore
.
utils
.
registerIcon
(
FSMailTemplate
.
FSMailTemplate
,
'www/fsmt.gif'
,
globals
())
def
initialize
(
context
):
context
.
registerClass
(
MailTemplate
,
# we use the same permission as page templates
# in order to keep things simple.
permission
=
'Add Page Templates'
,
constructors
=
(
addMailTemplateForm
,
addMailTemplate
),
icon
=
'www/mt.gif'
,
)
addMailTemplateForm
=
PageTemplateFile
(
'www/mtAdd'
,
globals
(),
__name__
=
'addMailTemplateForm'
)
def
addMailTemplate
(
self
,
id
,
mailhost
=
None
,
text
=
None
,
REQUEST
=
None
,
submit
=
None
):
"Add a Mail Template with optional file content."
id
=
str
(
id
)
if
REQUEST
is
None
:
self
.
_setObject
(
id
,
MailTemplate
(
id
,
text
))
ob
=
getattr
(
self
,
id
)
if
mailhost
:
ob
.
_setPropValue
(
'mailhost'
,
mailhost
)
return
ob
else
:
file
=
REQUEST
.
form
.
get
(
'file'
)
headers
=
getattr
(
file
,
'headers'
,
None
)
if
headers
is
None
or
not
file
.
filename
:
mt
=
MailTemplate
(
id
,
text
)
else
:
mt
=
MailTemplate
(
id
,
file
,
headers
.
get
(
'content_type'
))
self
.
_setObject
(
id
,
mt
)
ob
=
getattr
(
self
,
id
)
if
mailhost
:
ob
.
_setPropValue
(
'mailhost'
,
mailhost
)
if
submit
==
" Add and Edit "
:
u
=
ob
.
absolute_url
()
else
:
u
=
ob
.
aq_parent
.
absolute_url
()
REQUEST
.
RESPONSE
.
redirect
(
u
+
'/manage_main'
)
# allow all the email module's public bits
import
email
for
name
in
email
.
__all__
:
path
=
'email.'
+
name
allow_module
(
path
)
try
:
mod
=
__import__
(
path
)
except
ImportError
:
pass
else
:
mod
=
getattr
(
mod
,
name
)
for
mod_name
in
dir
(
mod
):
obj
=
getattr
(
mod
,
mod_name
)
if
isinstance
(
obj
,
ClassType
):
allow_class
(
obj
)
product/MailTemplates/tests/__init__.py
View file @
015af31a
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.html
# See license.txt for more details.
product/MailTemplates/tests/example1.mt
View file @
015af31a
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
<tal:x replace="user/getId"/> would like to thank you for
your interest in:
<tal:x replace="root/absolute_url"/>
<tal:x replace="options/message"/>
cheers,
The Web Team
</tal:body>
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
<tal:x replace="user/getId"/> would like to thank you for
your interest in:
<tal:x replace="root/absolute_url"/>
<tal:x replace="options/message"/>
cheers,
The Web Team
</tal:body>
product/MailTemplates/tests/example3.mt
View file @
015af31a
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
Please find attached the file you requested.
cheers,
The Web Team
</tal:body>
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
Please find attached the file you requested.
cheers,
The Web Team
</tal:body>
product/MailTemplates/tests/example4.mt
View file @
015af31a
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
Welcome to our site!
cheers,
The Web Team
</tal:body>
<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
>Dear <tal:x replace="options/mto"/>,
Welcome to our site!
cheers,
The Web Team
</tal:body>
product/MailTemplates/tests/test_FSMailTemplate.py
View file @
015af31a
This diff is collapsed.
Click to expand it.
product/MailTemplates/tests/test_MailTemplate.py
View file @
015af31a
This diff is collapsed.
Click to expand it.
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