Hi Antonio,
Hi all:
How I can create attribute names dynamically?
tal:attributes=attributename expression
Sorry, I haven't explain the problem correctly :)
The problem is the number of refX depends on the list of urls, i.e. if
I have ['http://foo', 'http://boo', 'http://google.com'] then I
Hi Mário
Now...
I think my Zope is suffering from arthritis :(
I can't undo any more, either in Zope nor Plone and i can't compress
Zope's database without getting an error and... no database compressed.
As if you care to rapidly browse the site, you will see it is indeed a
small one, but the
Hi,
I saw that others already answered to your question; however, they use
the proxy module and you are using rewrite, which is what I use:
IfDefine SSL
VirtualHost YOUR_IP:443
ServerName your.domain.com
ServerAlias your.domain.com *.your.domain.com
SSLEngine on
SSLCipherSuite
How do I logout current user using DTML
I used dtml-call expr=acl_users.logout(REQUEST) but it didn't work
and zope gave me this.
Site Error
An error was encountered while publishing this resource.
*Error Type: AttributeError*
*Error Value: logout*
**
*What did I do wrong??*
You didn't
Dear Allen,
please post your replies to the newsgroup as well.
I tried both yours and the dtml-raise methods, but both of them didn't
work.
With yours I redirect myself out but I still logged in.
With dtml-raise Unathorized, it popped out an password query box and
kept ask me to input password
Hi Stépahne,
I search the definition of hot_plug function.
I look it at CMFQuickInstallerTool/QuickInstallerTool.py file. The
line code is that :
from zpi.zope import not_installed, hot_plug
I not found hot_plug function in my Product/ directory and not in Zope
source. Where can I found
Sadly, as of Windows XP, this is broken beyond use: it simply doesn't
find some stuff in certain files, like .py files, for example :-(
Install cygwin and use grep there, if you really have to stay on windows
There is no need of installing that big monster :-). You can also
install grep for
The short answer is it depends. To make such files generally available
you have to convert them to HTML so arbirary browsers can access them.
You can use MS Word to do the conversion. If your Zope is running on a
Windows machine that also has Word, you can manage the conversion
dynamically
Hi John,
The CMF's ActionsTool is a prime example for such
a link factory. CMFDefaults main_template.pt demonstrates
how to iterate over the links generated by portal_actions
(the ActionsTool instance in a CMF site).
Does that mean creating a CMF site?
I'm finding it hard enough figuring
Do you mean this?
http://plope.com/software/ExternalEditor
Are there any screen shots of it in action?
I'm not exactly sure how it works, but have feeling it won't work for me.
Yes, that's what Paul meant. I tried it once and it is not difficult to
install. You just have to follow the
Hi Erik,
I don't get a traceback, i just get error and message back as empty
strings; their initiallized value.
very strange.
Looking at your python script I saw that initially you set error and
message to the empty string ''. I guess the script is not detecting a
'next_state' keyword in the
Hi,
AJ Look at mxODBC or the latest version of ZODBCDA from zope.org.
I'm free download egenix-mx-base-2.0.6.win32-py2.3.exe.
I have install zope 2.8 for windows.
I could not install egenix-mx-base-2.0.6.win32-py2.3.exe. Becouse it
could not find python in registry.
How to install
Hi Erik,
next_state does get initialized - it is the name of the submit buttons
on my various forms.
So, then it should be in the request object. Just to test it, put the
following at the begining of your python script (You don't have to
delelete anything):
return request
Then submit the
Hi Thomas,
When i just use it as dtml-var sSQL everything is
ok.
When i use it like : input type=text
value=dtml-var sSQL, i get everything until the
first space. For example from select * from mytable
i get select.
I'm not sure, but don't you need to enclose it with double quotation
marks?
Hi Vlada,
for now I use the Zope 2.7.5 tarball. I write freelance (not bound in a
product) page template and wish it to be i18n'ed. I have appropriate
tags inside and the domain set at the top. There is also Plone with its
products in that instance.
Where should I put the PO files, so the
Hi,
few times ago I was few times wrote to ZC webmaster about limited query to
Zope Products search results (see attached picture) - in any case it does not
find more than 200 results. Nothing to do. If somebody has enough power to
initiate zope.org webmaster, please tell him about change
Dieter Maurer wrote:
Fernando Lujan wrote at 2005-8-19 12:16 -0600:
I try to find information about programming in Zope with the OO
paradigm. I didn't find many documentation...
For instance, how can I define classes and instances once I just work
with dtml-methods and dtml-documents?
You
I bought the book... But while it don't arrive, let me ask a last question...
Is there a tutorial which allows me to work with pages in the .py
format? Then, I could only use python to generate the content... :D
I've seen a lot of pages in this format... Does Zope works with it?
If you mean to
Hi Barry,
I'm getting an attribute error when I try to run Zope
2.7.6, which is occurring when NauScheduler starts up:
AttributeError: ignoreLater
[...]
schedule.ignoreLater()
AttributeError: ignoreLater
It means that the object schedule doesn't have or can't access a method
Hi ajit,
i don't think this is non-zope question bca'z...
i am using python script to add user to system which works fine
when run outside of zope ...
but when i run it through zope as external script (with all
permission) it's not working and returning 256 without giving
su zope (or whoever your zope runs)
./yourmethod.py someuser somepass
You will see it fail (apart from the fact you need
the #!/path/to/python.bin and set the execution bit
with chmod a+x before you try)
i tried using another user outside of zope .
Hi Sam,
I've read about using .po files. Is there an easy
way to hook these up to Zope? Any help would be greatly appreciated.
Yes, there are two alternatives:
PlacelessTranslationService and Localizer both of them allow you to use
po files and negociate the language according to the
Hi Jens,
i have a little Problem with an old self-made ZClass-Product named CMSFolder.
Allready existing objects of CMSFolder are broken since the last restart of the
instance.
It is really strange because there is no broken-sign in /Control_Panel/Products.
It is still possible to create new
Hi Infor,
I found that my weakness is that I am DTML scripter. After printing the Cookie
Crumbler source code,
I need some help/advice as how to access the Cookie Crumbler methods
or api from DTML. I have searched
the Zope documents however have found none that can help.
I would
Yes, I got that too long time ago when working with Zope 2.7.2 and
python 2.3.3. At that time I did the following in the python shell:
import PIL
PIL.Image
But I got as well:
AttributeError: 'module' object has no attribute 'Image'
Then I tried this:
from PIL import Image as PilImage
and it
Never heard of Inungo. Is it easier to use than Plone?
Google is your friend - iungo.org
I know that Google is quite clever but Googling for Inungo did not lead me
to iungo.org
:-)
Yeah, you are right :-)
Actually Andreas misspelled it in his first post. He wrote Inungo
instead of
Dear list,
I've been going through the list archives looking for tips on logging
(getting sensible statistics from my log files).
At the moment I have the setup recommended by most posts, namely
multiple Apache virtual hosts that proxies requests to a single Zope
instance.
I would like to
I read the answer from Dieter and unfortunately I'm not authenticating
from Apache. So, I went for the approach indicated by Chris Withers
without any success:
If your Zope auth solution can put a header in the http response,
then you can use a custom apache logging directive to put this in
If your Zope auth solution can put a header in the http response,
then you can use a custom apache logging directive to put this in your
Apache log in place of what it thinks the username is.
I put this on the log method of the medusa/http_server.py file:
Dear Zopers
I need to redirect all my http requests to the login_form of the
CookieCrumble to https, so, I wrote this rule in apache:
RewriteRule ^/login/login_form(.*) https://server/login/login_form$1 [NE,L]
It authenticates me through ssl, but then it cames back to http. I saw that
the
Redirection from Josef Meile
+ {'id':'ssl_redirect', 'type': 'boolean', 'mode':'w',
+'label':'Use ssl after login'},
)
auth_cookie = '__ac'
@@ -95,6 +98,9 @@
local_cookie_path = 0
cache_header_value = 'no-cache'
+#Patch from
Hi Chris,
I need to redirect all my http requests to the login_form of the
CookieCrumble to https, so, I wrote this rule in apache:
Why bother? Just because the form is secure doesn't make cookie
authentication any more secure.
Yes, you're right. That is exactly the conclusion I also
Hi,
After having started the thread about securing CookieCrumbler[1], I figured
out that it was better to secure Basic Authentication instead. So, I just
created a new Product, called JMSSLBasicAuth[2], which is based on the
CookieCrumbler Transversal Hook. Instead of Cookie Authentication, I
After having started the thread about securing CookieCrumbler[1], I
figured
out that it was better to secure Basic Authentication instead. So, I just
Which is actually identically :-) Its just a different HTTP-Header
involved :-)
Yes, but you won't send your credentials in plane text as you do
Yes, but you won't send your credentials in plane text as you do with
CookieCrumble, will you?
Well, its more or less exactly the same as with BasicAuth :-)
(base64 plaintext vs. plaintext in html forms does not really matter)
Yes, but if you set only the authentication header in https and
Hi Benjamin
Just getting into Zope and loving it! I do have a question about the
basic authentication that Zope uses... I have a login page (ZPT) and
would love for Zope to display that page instead of the basic auth
dialog when it determines it needs to authenticate.
Is this possible? Is
Hi Oliver
You can also look inside the logs of your Apache for the IP addresses?!
That's not always possible in our virtual hosting environment, and besides
it
makes no sense to have to look in two different places for the same
information.
I would also look for that information in the
Hi Peter,
First at all, I think Localizer may be easier to do this task, it has
Built-in Cookie and traversal url support. You may also define your own
language selection method. If you still want to try this with PTS, then read
the following lines.
Now, perhaps this works if my browser
Hi Chris,
Don't use PTS!
Only if using zope 2.8.x, which indeed I'm using, for we have a 3rd party
product that depends on that. Anyway, an update will be done, so, I will
follow this advice.
If you have a google, you'll see i've just recently done the
language-selection-from-cookies dance
Hi,
I'm working in a configuration module for other products I'm developing.
The idea is that the user first has to make an instance from this
product, then define there where the other products instances will be
created, what header, footer, and style sheets they will use, etc..
The
Hi Garito,
I saw in another thread you still need this. If I'm not wrong what you
are pretending is to somehow render zpt on the fly. So, here is my idea:
I would like to write things like:
object.property = 'here/anotherproperty'
object.anotherproperty = 'Barcelona'
and ask it like:
print
Hi Garito,
You may try to return a wrapper that behaves the same way
as the original object (by deriving from the respective type)
but has __roles__ = None as additional attribute (which declares
the object public).
Uau!
Can you point me to a simple example or similar? I'm not sure if I
Hi,
I am now looking at the modules feedparser imports. These include
sgmllib
re
sys
copy
urlparse
time
rfc822
types
cgi
urllib
urllib2
cStringIO
xml.sax
It seems that sys would be a bad one to allow zope to import.
Well, you don't have to allow all of them. You only need to allow the
import time
time.localtime(106900545747.045975).tm_year
5357
Now, we understand: it's the Python time implementation that has
changed.
With Python 2.3.3 (under Debian Sarge), we get:
from time import localtime
localtime(106900545747.045975)
(1901, 12, 13, 21, 45, 52, 4, 347, 0)
Hi Daniel,
Hello,
I am trying to set the target language using i18n:target label
Example:
p i18n:translate= i18n:target=string:en
label_search
/p
It doesn't work. I cannot specify the target language.
I am in Zope 2.9.4.
Just a guess: Don't you need to specify a domain as well?
Example:
p i18n:translate= i18n:target=string:en
label_search
/p
It doesn't work. I cannot specify the target language.
I am in Zope 2.9.4.
Just a guess: Don't you need to specify a domain as well?
Ok, I tested it as well and it didn't work either. I just found it is a
bug and here is a
I have test the script on my local windows python version with an print
statement, and it works fine
- everytime - so its only on zope. i cant use pdb on zope´s python
script i think?
Are you using the same mail servers?
Anyway, another thing you could do would be to run the script in debug
Hi Tyler
When serving a web page, we get an error that involves the
fetching and display of a document to the browser. Evidently,
it's choking on some unicode bytes when it's expecting plain
ascii.
I'm assuming it's
/usr/lib/zope2.7/lib/python/Products/PageTemplates/PageTemplate.py
that's
I tried that and it will print the BR, like this
These IDs have Errors:BR 1BR 46 BR 76BR 45BR
If you are using zpt, then you have to call it like this:
div tal:replace=structure here/myScript/
Otherwise it will be rendered as text.
Regards
Josef
Hi tony
I saw somewhere someone adding code like this:
img src=myimage.jpg/resize /
that would automatically resize his image according to a predetermined
standard. Does anyone know how this or something similar is done?
Yes, I have seen this. Silva, a zope based CMS, has a class called
Have a look at the full traceback in the error_log (ZMI root folder -
you may have to remove the 'Unauthorized' entry from the 'Ignored
exception types' field), it may provide some more information.
Another thing you can do is to activate the verbose-security directive
in your zope.conf file.
To Dieter: I use HTTP authentication method (at least I suppose that). I
don't change anything about the default configuration nor use any cookie
at least
What you get when you authenticate: a pop-up window (HTTP
authentication) or an html form (Cookie based authentication)?
What I wonder is
Hi Allen
I made a pyhon product with catalogaware as one of my base class but my
zcatalog named 'catalog' doesn't automatically catalog when I add a
product item. what could be a problem?
Perhaps setting the catalog in your object instance may help:
self.manage_editCataloger(catalogPath)
Now I just need to look at the Zope Book to see what the changes to the
security declarations are so the lines below will quit showing up in my
event.log.
--
2007-03-22T14:10:44 WARNING Init Class
Products.CorpCalendar.CorpCalendar.CorpCalendar has a security declaration
for
windos and linux
windos? Is it a new version of DOS? ;-)
this snippet behaves differently on windows and linux:
http://zope.pastey.net/42188-1gbl
Why don't you try to directly create a OFS.Image directly
into the zopedb, then see if this still happens. It would
help you to discard any error
A quick fix would be to move the code from your python script to an
external method.
Ok,thanks, but how can I call this external method in a page template.
In a first page I have a form that submit 6 parameter in url. The second
page must call the external method or python script(don't
julian schrieb:
In fact it's a problem of AdvancedQuery :
TypeError: Augmented assignment to And objects is not allowed
in untrusted code
If I don't write query = And(), there are no errors. But I want the
function And :s .
Does this also happens when you make an
Install a separate python that is used only by your zope instance. Use
setdefaultencoding only there.
This is nonense. A custom sitecustomize.py script does the job without
installing a complete new Python.
You need to read a previous reply:
I set it global in sitecustomize.py under
Hi,
You could try to install an oficial python 2.1.x release from
python.org, then change the python's path in the runzope.bat
script. I work mostly with zope under linux, so, I haven't
tested this, but perhaps it works.
Another problem you may face is that perhaps the official
python binary
Hi Garito
Thank you very much!
I was thinking in something more like a monitor (to use it even if zope
is working ok) but I try it
Perhaps profiling is what you are looking for. Inside the ZMI Go to:
/Control_Panel/DebugInfo and press the Profiling-tab. In order to use
this, you will have to
Hi Michael
michael nt milne schrieb:
yeah I have modified to this
li tal:define = query here/testquery
tal:repeat=result python:query(id='IT')
span tal:replace=python:repeat['result'].firstnameFirst
Name/spannbsp;
/li
but get this as a result. Thanks for the reply.
Module
ok, thanks Duncan
ul
li tal:define=query nocall:here/testquery tal:repeat=result
python:query(id='IT')
span tal:replace=result/lastnamelastname goes here/span
/li
/ul
Good that you got it working. By the way, why do you need to define
query? Do you really need a reference to the testquery
I've been looking around for this, but can't seem to find anything. I'm
assuming that it is just not possible, but thought I'd ask just in case.
For File objects, I see that manage_edit() has the parameters: title,
content_type, precondition, filedata REQUEST. Setting something in the
BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best option within Zope. Thoughts?
I guess if you want to do
Raphael Ritz schrieb:
David Chelimsky wrote:
[..]
BTW - I'm using ZPT, not DTML. I'm guessing I can do this with a
simple script that I include on every page, yes? That could work, but
seems a bit error prone - that's why I'm looking for some sort of
request hook. But maybe that's my best
Hi,
Today I noticed that google doesn't find anything when giving
site:mail.zope.org anymore. It worked before :-(
Moreover, when you get the robots.txt from the list:
http://mail.zope.org/robots.txt
You will see:
User-agent: *
Disallow: /
So, is it intended that the zope list aren't
Hi,
Today I noticed that google doesn't find anything when giving
site:mail.zope.org anymore. It worked before :-(
Yeah, I noticed this too. It's a real shame.
I wonder who did that and why?
(file objects have no history tab and the database has been packed to
the point where there's no
Dear list
I'm trying to send a multi-part email after having submitted a
form. In that form, the user will give some basic information
from him, then he will be able to send at most three files.
This is my dtml-method to send email after having submitted the
data:
dtml-let
I started shivering while reading your code. We would have written such
code
five or six years ago - because we had no other choice.
Please use the standard 'email' module of Python...this just works
and you don't need to write such ugly and error-prone DTML
code.
Yes, I know it is ugly and
The 'email' module is part of the standard Python distribution since
generations.
Well, I said allowing or installing. I wasn't sure if it was and with
allowing I meant by using allow_module or allow_class. I guess you can't
just use this module without removing security assertions. I will try
Tom Von Lahndorff wrote:
How is dtml more error-prone than python? I'd imagine that all
depends on
who's authoring it.
In this particular example, python's email package has a very OO
approach to generating emails.
Yes, that's what I hate from the dtml thing; it looks ugly :-(
The DTML
The email library should be available to use with a Script (Python) and
can be done all within the ZMI. Otherwise maybe use dtml-try?
Well, I should have mentioned this: the zope installed on the server is
2.8.x. Yes, it is old, but it is because all the page uses an own CMS
based on silva,
Hi Miguel
First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:
security-policy-implementation python
Garry Saddington schrieb:
Have you tried deleting the .pyc files associated with the external methods
and then restarting zope?
There are no .pyc files in any of our installations.
Have you used the Zope that comes with Centos or from Zope.org?
Tried, as somebody say, to open the external
I am wondering, if there are some howto patching the zope 10
We're in the year 3030? We are just at Zope 3.X :-)
You are in year 3030 ;-). I'm still stucked in the past with zope 2.8.x
:-(
Anyway, my suggestion for the original poster is to use apache for ssl.
I used m2crypto in the past and
However, I dont need to do this with PTS - i would be happy to know the
five solution !
I'm using sx.translations + five in order to achive this
programatically. In order to use i18n from five, read this:
http://codespeak.net/z3/five/i18n.html
Then install sx.translations from here:
Hi,
CookieCrumbler worked fine for me on the past. The only thing that's
up-to-you is to customize the login form if it doesn't fit your needs.
Perhaps the only issues I see on CookieCrumbler are:
1) Even if you redirect your login_form to https, the came_from
variable, which is set when you
Hi,
Thank you for replay . yes I know that product is using cookie
based authentication.I want to know that is any work go around to
support zope cookie based or form based authentication.
Well, I think it won't be included to zope source code. Why to do it?
There is already two
Yes you are correct it reset the authenticate cookies but from
logout from zope it
call zmi_logout beacuse of that again login window prompt I just
want to redirect to the login page and also i want user must be logut .
As per my knowledge It not possible because session is
Sascha Welter wrote:
I can't think that mail.zope.org has anything to do with a ZODB or is
configured from zope.org
(Removed the cross posting, dunno what this has to do with zope@)
Sorry, I wasn't aware about this list nor that there were a thread already
here; the person who cross-posted to
2) is it possible to tell zope NOT to store some things in the database
(for instance in zope.conf-I've looked but not too closely and found
nothing)
Why don't you run a cron job that packs the database, let's say each
month? You could also do a backup before packing; just in case you want
to
Something that would be nice, would be to be able to store transactions
in a separate file before packing, but I don't think it is posible in
Zope. You may have to write something to do this.
Huh? not sure what you mean... if you keep the .old file created during
packing, that has all the
82 matches
Mail list logo