Jonathan Cyr wrote:
You might want to use index_html rather than index.html in this
example. The dot means other things in Python, and index.html is a
carryover from filesystem webservers. My impression is that the
acquisition mechanism doesn't like ids with a dot, in some circumstances.
J Cameron Cooper wrote:
self.plone['try-me']
or getattr (which doesn't use acquisition.)
Eh? What on earth gave you that idea?
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
___
Zope
On Thu, Dec 01, 2005 at 07:40:38AM +, Chris Withers wrote:
Jonathan Cyr wrote:
You might want to use index_html rather than index.html in this
example. The dot means other things in Python, and index.html is a
carryover from filesystem webservers. My impression is that the
You might want to use index_html
rather than index.html in this example. The dot means other things in
Python, and index.html is a carryover from filesystem webservers. My
impression is that the acquisition mechanism doesn't like ids with a
dot, in some circumstances.
Not trying to nit-pick,
Jonathan Cyr wrote:
You might want to use index_html rather than index.html in this
example. The dot means other things in Python, and index.html is a
carryover from filesystem webservers. My impression is that the
acquisition mechanism doesn't like ids with a dot, in some circumstances.
Hello,
I
don'thave any Python experience yet, so who has a solution for this
'problem'.
Example:
I
've 3 folders a, b c.
I
want to create a dtml document in a folder by a form. The folder is a
variable in my form.
The formis no problem, the form action is no problem. The python
folder = getattr(context, 'b')
adder = folder.manage_addProduct['OFSP'].methodAdd
adder('index.html', 'Some title')
That creates it with default content. To change it you'll have to call
dtmlm = getattr(context, 'index.html')
dtmlm.manage_edit(bla bla bla bla bla, 'Same title')
# or
f =