For the names of a download file I would like to use the extension form ie file.zip or file.exe. Someone tells me I'm forbidden to use '.' in ID's, but I seem to be able to do that anyhow. If I'm not allowed to use '.' is there a way to tell the client what default save as filename should be used? -- Robin Becker
At 13:54 01/10/99 , Robin Becker wrote:
For the names of a download file I would like to use the extension form ie file.zip or file.exe. Someone tells me I'm forbidden to use '.' in ID's, but I seem to be able to do that anyhow.
If I'm not allowed to use '.' is there a way to tell the client what default save as filename should be used?
A '.' is legal in a Zope ID, but is not legal in a python id. This means that in expressions, you can't easily refer to your object. So <dtml-var file.exe> works, but <dtml-var "file.exe"> referes to the attribute or method named 'exe' on the object 'file'. You'll have to refer to the object with a namespace lookup: <dtml-var "_['file.exe']"> -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (2)
-
Martijn Pieters -
Robin Becker