Hi, Tim
What is the name of the propertysheet in your ZClass that these values
are on? Is it 'job_info'?
Where is the editFormAction Python Script? It should be in your ZClass's
/methods. If you are instead acquiring it from a Folder somewhere, you
will need to use 'context' instead of 'container' inside the Python
Script.
-- Jim Washington
Timothy Wilson wrote:
>
> On Mon, 15 Jan 2001, Jim Washington wrote:
>
> > I have it.
> > The Python Script I sent you:
> >
> > container.propertysheets['job_info'].manage_changeProperties(REQUEST)
> >
> > needs to be rewritten:
> >
> > container.propertysheets.job_info.manage_changeProperties(REQUEST)
>
> Hey Jim,
>
> I'm getting closer. Now I get the following error and traceback:
>
> Error Type: AttributeError
> Error Value: job_info
>
> Traceback (innermost last):
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
> 538, in __call__
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
> 336, in eval
> (Object: editFormAction(REQUEST))
> (Info: REQUEST)
> File , line 0, in ?
> File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 325, in __call__
> (Object: editFormAction)
> File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 354, in _bindAndExec
> (Object: editFormAction)
> File
> /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
> line 321, in _exec
> (Object: editFormAction)
> (Info: ({'script': ,
> 'context': , 'container': instance at 87225f0>, 'traverse_subpath': []},
> (form
valign="top"
>align="left">posted | '01/15/2001' |
valign="top"
>align="left">duties | ['asdfasdf\015\012'] |
valign="top"
>align="left">position | 'asdfadsfasd' |
> -- again snipping the rest of REQUEST --
>
> File Python Script, line 2, in editFormAction
> File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py,
> line 272, in __getattr__
> File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py,
> line 143, in __careful_getattr__
> (Object: Traversable)
> AttributeError: (see above)
>
> Any ideas?
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
I just wondered if there is an "AUTHENTICATED_USER.authenticate(userName,
password)" that I could call from a form. And then bypass all that IIS mumbo
jumbo completely.
Guess I will have to dig the sources.
Regards Max M
Max M. W. Rasmussen,Denmark. New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects. - Robert A. Heinlein
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Dieter Maurer
> I have installed zope on port 8080 on a win 2K machine.
>
> It runs nicely, but due to firewalls and other reasons it has to run on
port
> 80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
>
> But when I try to use a manage page I cannot log in without being a
member
> of the win2K domain, and that is not feasible in this case. I have tried
all
> setting, I think.
You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.
Dieter
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Kamon Ayeva wrote:
> Hi,
>
> Has anyone been able to use the delUserForm to delete
> users added within a PersistentUserSource in the
> PortalMembershipSystem object ?
Yes, quite frequently.
> I am not sure if this piece of code in delUserForm
> preceding the HTML form snippet does the right job:
>
>
>
> "idList.append(getItem(_['sequence-item']))">
>
>
>
> ...
>
> I can view the users but when I click on the form
> button to delete some users, I get
>
> I get
>
> Error Type: NotFound
> Error Value: None
>
What platform?
What Zope version?
What version of each related/required product?
Is SiteAcces Installed?
If So, what version?
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
=?iso-8859-1?Q?Max_M=F8ller_Rasmussen?= writes:
> I have installed zope on port 8080 on a win 2K machine.
>
> It runs nicely, but due to firewalls and other reasons it has to run on port
> 80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
>
> But when I try to use a manage page I cannot log in without being a member
> of the win2K domain, and that is not feasible in this case. I have tried all
> setting, I think.
>
> Is there any way to do it?
>
> Should I make my own authentication page so users can log on through a form?
> If so how is this done?
You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.
Dieter
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Lee writes:
> ...
> I have a Python method expecting 'text' as a parameter ...
> ...
> The Python method, testSQL, returns 'result'.
> ...
>
>
>
>
Inside 'expr="..."' you use "_['x']" instead of .
As this is a Python expression that needs to be evaluated,
it cannot be in a string. You can use the "%" operator
which takes a format string and an object or tuple as
parameters and formats object/tuple according to the string.
If your Python method contains a "return result",
then there is not magically a "result" variable (and there is
not need for it, too).
Are you sure, you want the nested "dtml-in". Looks very strange.
Thus, you can use:
Dieter
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
[EMAIL PROTECTED] writes:
> ... print in external method ...
"print" does not print to the log file but to standard output.
Under Unix (and I think under Windows, too) you can redirect
standard output to a file.
The alternative is to use Zope's Log module (called zLOG).
Its output goes to the log file.
Dieter
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
On Mon, 15 Jan 2001, Jim Washington wrote:
> One point about your form:
>
> You have id as a form variable. You will be disappointed by its
> behavior.
Thanks Jim.
Care to elaborate on the problems with using id as a form variable.
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN | | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.com/
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi,
Could anyone tell me, if it is possible to upload a whole folder with all
its including objekts like pictures and things into ZOPE? If yes, tell me
how, please.
And another question: a created my own zclass ( a newsitem). One instance of
this newsitem has the same function like a folder. I can upload for example
a file in it with the tag:
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:
> I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
> ZMySQLDA v2.0.1.
Are you really running MySQL 3.22.23? This is a rather old version.
> The install appears to be successfull, the Products appear in the Control
> Panel, I can add, and open a database connection.
>
> However, when I issue the following query:
>
> SHOW TABLES;
>
> I receive the following set:
>
> Tables in la_eksempel
>
> a
>
> (la_eksempel the name of the database, naturally)
>
> There is no table named 'a', however there is a table named "artikkel". If
> I try to browse the database, I get a tree with 5 first-level nodes, all
> named with the first letter of a table in my database.
That's very odd, because it works for me.
> If I try "SELECT * FROM ARTIKKEL;", I get
>
> Error Type: TypeError
> Error Value: len() of unsized object
I don't know if this is the problem, but ZMySQLDA-2.0.1 requires
MySQLdb-0.3.0 (aka MySQL-python). These should both work with
MySQL-3.22.23, though I would recommend an upgrade to at least 3.22.32 (or
3.23.30).
--
andy dustman | programmer | comstar.net is part of the Globix network
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage,
come no further, for death awaits you all, with nasty, big, pointy teeth!"
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi there,
Thanks for your help. I'm currently using the following code, which works perfectly;
Randy's response provided the following code, which didn't work nor did any variation
on it. Surprising as it 'appears' to be doing almost the same thing as above(?).
Cheers,
Lee
[EMAIL PROTECTED] wrote:
> On Sat, Jan 13, 2001 at 06:11:08PM +, Lee wrote:
> You have indeed overlooked something. There are tons of things in REQUEST
> unrelated to your form.
>
> To simply display the entire request, put
>
> in display/index_html
>
> To access the value of name1 in display/index_html,
> you can use many forms:
>
>
>
> #may get something else if name1 is NOT in REQUEST
>
>
>
>
>
>
>
>
--
Lee Reilly
mailto:[EMAIL PROTECTED]
ø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤ø
HAVE SKILLS; WILL TRAVEL.
I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?
More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi, Tim
I have it.
The Python Script I sent you:
container.propertysheets['job_info'].manage_changeProperties(REQUEST)
needs to be rewritten:
container.propertysheets.job_info.manage_changeProperties(REQUEST)
Perhaps someone could explain why the first does not work.
One point about your form:
You have id as a form variable. You will be disappointed by its
behavior.
Regards,
-- Jim Washington
Timothy Wilson wrote:
>
> Jim (or anyone else who's feeling charitable this morning),
>
> Thanks for all your help. I really appreciate it. I wonder if you'd have
> time to look one more time at the two methods I've got that aren't
> working. I've included the actual code for my job posting product. Perhaps
> someone will find it instructive. I have a feeling that the remaining
> problem is not directly related to the processing of the form by the
> PythonScript. I also included the traceback at the end of this message.
>
> Here are the two methods. I have a table that displays the currently
> available jobs and displays two little icons which call the edit or delete
> methods on the corresponding instance of the 'Job Posting' class. The edit
> icon links to the 'editJobForm' method which in turn calls the
> 'editFormAction' method that actually processing the change.
>
> --
> editJobForm
> -
>
>
>
> Edit a Job Board Entry
> This form allows you to make changes to current postings on the online
> job board. You don't needed to fill in every
> field on the form. Click on the "Submit Edits" button at the bottom of the
> screen to save your changes to the database.
>
>
>
> Your changes have been saved
>
>
>
>
>
> Notes
> notes>
>
> Job ID
>
>
> Organization
>
>
> Position
>
>
> Description
> name="description:text" rows="10" cols="60" wrap="virtual"> description>
>
> Pay Offered
>
>
> Line of Authority
>
>
> Function
> name="function:text" rows="4" cols="60" wrap="virtual"> function>
>
> Qualifications
> name="qualifications:text" rows="8" cols="60" wrap="virtual"> qualifications>
>
>
>
> To create a bullet list of "duties," type each one in the box below and
> press the "ENTER" key
> between each item in the list.
>
>
> Duties
>
> duties>
>
>
>
> name="duties:list" rows="10" cols="60" wrap="virtual">
>
>
> Offer Expires
> ">
>
>
> Enter the date that the job was officially posted.
>
> Posted Date
> ">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> editFormAction (with REQUEST as a parameter)
> -
>
> container.propertysheets['job_info'].manage_changeProperties(REQUEST)
>
> The error I get is:
>
> Error Type: TypeError
> Error Value: sequence index must be integer
>
> Traceback:
>
> Traceback (innermost last):
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
> 538, in __call__
> (Object: editJobForm)
> File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
> 336, in eval
> (Object: editFormAction(REQUEST))
> (Info: REQUEST)
> File , line 0, in ?
> File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 325, in __call__
> (Object: editFormAction)
> File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 354, in _bindAndExec
> (Object: editFormAction)
> File
> /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
> line 321, in _exec
> (Object: editFormAction)
> (Info: ({'script': ,
> 'context': , 'container': instance at 885a3e0>, 'traverse_subpath': []},
> (form
valign="top"
>align="left">posted | '01/14/2001' |
valign="top"
>align="left">duties | ['asdfasdf\015\012'] |
> -- I've deleted what looks like the entire contents of REQUEST --
>
> File Python Script, line 2, in editFormAction
> File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py,
> line 276, in __getitem__
> File /var/lib/zope/2.3.0a2/lib/python/OFS/PropertySheets.py, line 647, in
> __getitem__
> (Object: Traversable)
> TypeError: (see above)
On Mon, 15 Jan 2001, Olaf Zanger wrote:
> first:
> right now my setup uses a connection string "db root" which doesn't seam
> to give a lot of savety :-).
> at my provider i have a login, but sure no root access to the db.
> * how does the connection string look for user name "peter-hauser" and
> password "test3-.2"?
> * has the user to be set up in "linux" ?
> * how is the setup made in "mysql"?
> i tried with "grant all privileges on *.* to "peter-hauser"@localhost;"
> and "set password for "peter-hauser"=password('test3-.2');"
> but wasn't successful.
> * has zope to be run by user "peter-hauser"?
>
> second?
> to set up a 3-tier application i should know how to connect mysql
> through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.
>
> * i can browse from the zope server to the db-server "pit" and otherway
> round with the names "pit" and "pitechon", so "hosts" file should be
> correct.
>
> * how has the connection string to look like?
> i tried "db@pit 'peter-hauser'" but it didn't work?
> * has mysql to be started with an special flag to open a port?
> * does it work with the ip-number?
I thought what it printed when you created the connection would be
sufficient:
The connection string used for Z MySQL Database Connection is of the form:
database[@host[:port]] [user [password [unix_socket]]]
or typically:
database user password
to use a MySQL server on localhost via the standard UNIX socket. Only
specify host if the server is on a remote system. You can use a
non-standard port, if necessary. If the UNIX socket is in a non-standard
location, you can specify the full path to it after the password.
...so you want something like: db@pit peter-hauser test3-.2
If pit is the local host: db peter-hauser test3-.2
...will be faster and use the standard UNIX socket.
You do not necessarily need a UNIX user by that name. Your GRANT statement
looks basically correct, but check the MySQL documentation.
--
Andy Dustman PGP: 0xC72F3F1D
@ .net http://dustman.net/andy
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Zopians out there,
thanks for helping me with my last question - here is a new one ;-)
We do image-processing of traffic-video-sequences and I'd like to serve
thumbnails use the following code (originally from some HOW-TO) as external
method:
import os, os.path, Image
def get_image(self, imagename, thumb, REQUEST, RESPONSE):
"""
Read and return an external file with appropriate response set.
Returns the contents of the file or image. Also, sets the
Content-Type HTTP header to the objects content type.
"""
thumbname = os.path.join('/tmp', 'thumbs', imagename)
imagename = os.path.join('/tmp', 'images', imagename)
print 'i:', imagename
print 't:', thumbname
if not os.path.exists(imagename):
return ""
if thumb == '1':
print 'inner'
if not os.path.exists(thumbname):
print 'inner2'
#img = Image.open(imagename) <-- if I remove the comment, the
'inner2' is still printed, but the 'after open' in the next line is not printed
in the logfile anymore
print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'
imagename = thumbname
fptr=open(imagename, "rb")
data=fptr.read()
size=len(data)
fptr.close()
RESPONSE.setHeader("Content-Type", "image/png")
RESPONSE.setHeader("Content-Length", size)
return data
My questions are:
- Does anybody have a clue, why the 'after open' and the next two prints are
not printed in the log file (I thing /var/log/zope) when I uncomment the line
above?
- If it is some error within python and/or the PIL, how do I get the error
output out of zope (I couldn't find this in the docu yet). The strange thing
is, the request is served, but the lines
print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'
seem to be simply ignored when uncommenting the "img = Image.open(..." line.
BTW, I can execute the PIL-commands in the normal python-shell without any
problems.
Thanks for any hint.
Tilo Schwarz
-
DaimlerChrysler AG, Research & Technology
Image Understanding FT3/AB
Dr. Tilo Schwarz
Email: [EMAIL PROTECTED]
Tel:+49-731-505-2376
Fax:+49-731-505-4105
P.O.Box 2360, 89013 Ulm, Germany
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Jim (or anyone else who's feeling charitable this morning),
Thanks for all your help. I really appreciate it. I wonder if you'd have
time to look one more time at the two methods I've got that aren't
working. I've included the actual code for my job posting product. Perhaps
someone will find it instructive. I have a feeling that the remaining
problem is not directly related to the processing of the form by the
PythonScript. I also included the traceback at the end of this message.
Here are the two methods. I have a table that displays the currently
available jobs and displays two little icons which call the edit or delete
methods on the corresponding instance of the 'Job Posting' class. The edit
icon links to the 'editJobForm' method which in turn calls the
'editFormAction' method that actually processing the change.
--
editJobForm
-
Edit a Job Board Entry
This form allows you to make changes to current postings on the online
job board. You don't needed to fill in every
field on the form. Click on the "Submit Edits" button at the bottom of the
screen to save your changes to the database.
Your changes have been saved
Notes
Job ID
Organization
Position
Description
Pay Offered
Line of Authority
Function
Qualifications
To create a bullet list of "duties," type each one in the box below and
press the "ENTER" key
between each item in the list.
Duties
Offer Expires
">
Enter the date that the job was officially posted.
Posted Date
">
-
editFormAction (with REQUEST as a parameter)
-
container.propertysheets['job_info'].manage_changeProperties(REQUEST)
The error I get is:
Error Type: TypeError
Error Value: sequence index must be integer
Traceback:
Traceback (innermost last):
File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
publish
File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
publish
File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: editJobForm)
File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: editJobForm)
File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
__call__
(Object: editJobForm)
File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: editJobForm)
File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
336, in eval
(Object: editFormAction(REQUEST))
(Info: REQUEST)
File , line 0, in ?
File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
325, in __call__
(Object: editFormAction)
File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
354, in _bindAndExec
(Object: editFormAction)
File
/var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
line 321, in _exec
(Object: editFormAction)
(Info: ({'script': ,
'context': , 'container': , 'traverse_subpath': []},
(form
posted | '01/14/2001' |
---|
duties | ['asdfasdf\015\012'] |
---|
On Mon, 15 Jan 2001, Olaf Zanger wrote:
> right now my setup uses a connection string "db root" which doesn't seam
> to give a lot of savety :-).
> at my provider i have a login, but sure no root access to the db.
> * how does the connection string look for user name "peter-hauser" and
> password "test3-.2"?
[EMAIL PROTECTED] peter-hauser test3-.2 <--\
|
> * has the user to be set up in "linux" ? |
|
No, only in mysql. |
|
> * how is the setup made in "mysql"? |
|
GRANT select,insert,update,delete,create,alter,drop,index|
ON db.* TO [EMAIL PROTECTED] INDENTIFIED BY 'test3-.2';|
|
> * has zope to be run by user "peter-hauser"? |
|
No, you pass peter-hauser in the connection string >-/
Oleg.
Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
From: Oleg Broytmann [mailto:[EMAIL PROTECTED]]
> I can assure it is. I run zope.net.ru in debug mode, and did debugging
>of an External Method that draw the left column. After I modified the
>source file Zope reread it, sure.
I have never had problems with that either. It autorefreshes nicely.
regards Max M
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
hi there,
two times trouble
first:
right now my setup uses a connection string "db root" which doesn't seam
to give a lot of savety :-).
at my provider i have a login, but sure no root access to the db.
* how does the connection string look for user name "peter-hauser" and
password "test3-.2"?
* has the user to be set up in "linux" ?
* how is the setup made in "mysql"?
i tried with "grant all privileges on *.* to "peter-hauser"@localhost;"
and "set password for "peter-hauser"=password('test3-.2');"
but wasn't successful.
* has zope to be run by user "peter-hauser"?
second?
to set up a 3-tier application i should know how to connect mysql
through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.
* i can browse from the zope server to the db-server "pit" and otherway
round with the names "pit" and "pitechon", so "hosts" file should be
correct.
* how has the connection string to look like?
i tried "db@pit 'peter-hauser'" but it didn't work?
* has mysql to be started with an special flag to open a port?
* does it work with the ip-number?
thanks for help
olaf
--
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com
begin:vcard
n:Zanger;Olaf Marc
tel;cell:+41-76-572 9782
tel;work:+41-31-332 9782
x-mozilla-html:FALSE
url:www.soli-con.com
org:soli-con Engineering Zanger
adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
title:Dipl.-Ing.
note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A
x-mozilla-cpt:;-32176
fn:Olaf Zanger
end:vcard
On Mon, Jan 15, 2001 at 12:51:01PM +0100, Oliver Bleutgen wrote:
> > I think probably Javascript is the 'cleanest' solution in this case,
> > but depending on the complexity of your UI another non-JS approach is
> > to make every link target the topmost frome (e.g., target="_top") and
> > redraw all frames in the frameset on each 'click'. This way you know
> > that all frames reflect the latest situation, but it can be annoying
> > to see the whole browser redraw every time you do anything. However,
> > if your browser doesn't *do* Javascript (so long as it does do
> > frames hmm.. how likely is that?) then it would at least work
>
> There' s always the possibility that people disable javascript -
> and checking for instance http://www.guninski.com/browsers.html
> I would say they have reason to do so.
>
> My take is that one should at least provide a non-javascript alternative
> to browse the site. This also helps with search-engines
The site I pointed to uses JavaScript to highlight your current position
in the site, by swapping images. The cross-frame js code is used to keep
the highlighting in sync with the content frame, even when using
hyperlinks that take you to a idfferent section of the site, or when you
are using your browsers history function.
When a visitor with JavaScript switched off visits the site, navigation
still works. Only the highlighting will cease to support visitors in
keeping tab on where in the site they are.
--
Martijn Pieters
| Software Engineer mailto:[EMAIL PROTECTED]
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
-
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Oleg Broytmann wrote:
>
> On Mon, 15 Jan 2001, Chris Withers wrote:
> > > if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> > > all external methods are re-read every time you access them.
> > >
> > That hasn't been my experience, but maybe I'm mistaken :-S
>
>I can assure it is. I run zope.net.ru in debug mode, and did debugging
> of an External Method that draw the left column. After I modified the
> source file Zope reread it, sure.
Fair enough then :-)
Chris
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
On Mon, 15 Jan 2001, Chris Withers wrote:
> > if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> > all external methods are re-read every time you access them.
> >
> That hasn't been my experience, but maybe I'm mistaken :-S
I can assure it is. I run zope.net.ru in debug mode, and did debugging
of an External Method that draw the left column. After I modified the
source file Zope reread it, sure.
Oleg.
Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Brian,
I finally got it working. Here's what I did:
I uninstalled all of ZMySQLDA and MySQL-python (formerly MySQLdb - this
name change didn't help any although in the big picture it probably needed
to be done) deleting any trace of it. I then followed all the directions
starting from here:
http://www.zope.org/Members/adustman/MySQLdb - This is the MySQL-python
module.
I used the version of ZMySQLDA that Andy Dustman points to here (there's
more than one floating about and I may have latched onto a
MySQL-python-incompatible one at some point):
http://www.zope.org/Members/adustman/ZMySQLDA - installing this is just of
matter of untarring in the correct Zope directory.
To install MySQL-python I followed the directions that Andy lays out in his
README.txt. It required that I had to install the rpms mysql-devel and
python-devel which I tracked down at http://rpmfind.net for my flavor of
Linux (RedHat) and MySQL (3.22.32). Once these were installed I was able to
build it exactly as Andy stipulates.
Being a Linux/Zope newbie this seemed daunting but it was more painless
that I originally anticipated.
With these installed I was then getting the error "_mysql module not found"
(or something like that). The python of Zope was not finding the modules I
just built from my main system python. I changed my Zope start-up script
appending the PYTHONPATH variable to include the path where the module
installed to. I added these lines:
PYTHONPATH=$PYTHONPATH:/usr/lib/python1.5/site-packages
export PYTHONPATH
BINGO everything then worked.
Hope that helps.
My hunch is that there is some version incompatibilities going on between
MySQL-python and ZMySQLDA that prevent MySQL query results from returning
to Zope.
BTW, thanks to everyone that responded to my emails for help. Even though
none of them was the exact answer I needed they all supplied some missing
critical piece of the puzzle. Opensource is a cool thing, but none of it
would amount to much without lists like this to help folks out. Keep it
coming.
-PSJ
>Hello All,
>
>I have the exact same problem. I am running slack 7.1 and I have
>installed all of the goodies (i.e. zope, python, mysql, etc.) from
>the source code. After finally figuring out that my /etc/ld.so.conf
>was not seeing the mysqlclient libraries i was able to compile
>MySQLdb-python modules and ZMySQLDA says that it is installed
>properly. But I have the same issues with the SELECT queries
>returning no data (There was no data matching this test_sql query. )
>That is straight from Zope. When I INSERT data to my columns in the
>table it works fine though. I have verified this from the console.
>Please advise if there are any suggestions. Thanks.
>
>Brian L Gautreau
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Whereas I couldn't reproduce the error in a prior thread this time I
can. On my OBSD 2.8 machine running python 1.52 -with-thread CPU load
goes up to 99% when I try to access the management screens. There was
a discussion on the OBSD ports list to create a 1.52 port. Did you
check whether there is and whether that's solving the problem?
Ragnar
>Hello,
>
>
>> > Could anybody enlighten me??? I don't know Python (yet), so the
>> > tracebacks are not too informative for me ...
>>
>> Are you using Python 2.0? It's not yet compatible with Zope, though
>> efforts are being made. Just enter "python" to find out.
>
>
>No, I'm not. At first I tried to take the version that comes
>shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
>threads compiled in (at least that's what the package name
>suggests).
>When that didn't work, I pkg_deleted the package and then
>downloaded the 1.52 as noted in the Zope specs, compiled and
>installed it - it seemed to run, but Zope cr***ed out with a
>python.core after trying to access the management screen. The
>machine itself definitely is okay, techwise. The python
>compilation and installation didn't show any errors. The OpenBSD
>installation is totally virgin otherwise.
>
>I don't really know what else I could do. Right now it looks
>pretty much as if I'm going to switch to FreeBSD, my second
>favourite :-|
>Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
>be really curious what steps you followed to get it to work.-
>
>Cheers, Jan
>--
>Radio HUNDERT,6 Medien GmbH Berlin
>- EDV -
>[EMAIL PROTECTED]
>
>___
>Zope maillist - [EMAIL PROTECTED]
>http://lists.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Seems you already found out what's wrong. Why didn't you post
anything on the OBSD misc list so that they can fix it?
Ragnar
>Hello Jan:
>
>>I don't really know what else I could do. Right now it looks
>>pretty much as if I'm going to switch to FreeBSD, my second
>>favourite :-| Has anyone got Zope 2.2.5 running under OpenBSD
>>2.8??? If so, I'd
>>be really curious what steps you followed to get it to work.-
>
>You will have to use FreeBSD or use OpenBSD 2.7.
>
>2.8 will not work because there is a bug in the threading library
>included with OpenBSD 2.8. Zope triggers it when you call the
>management screen.
>
>However, in the Zope code for the management screens there are
>"thread-safe" calls used which are not, as far as I know, used
>elsewhere in Zope. Maybe there is a bug in that code?
>
>But for now I believe the bug to be in OpenBSD 2.8. I have not found
>anything to suggest that it has been fixed or looked at. None of the
>patches released so far for 2.8 mention it.
>
>I went through this in early December.
>
>Luke
>
>
>___
>Zope maillist - [EMAIL PROTECTED]
>http://lists.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
>http://lists.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Jens Vagelpohl wrote:
>
> if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> all external methods are re-read every time you access them.
>
> jens
That hasn't been my experience, but maybe I'm mistaken :-S
Chris
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
all external methods are re-read every time you access them.
jens
on 1/15/01 6:04, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:
> I also would like to know, if it is possible to update a bunch of external
> method zope objects simultaneously, or do I have to click 'edit' on every
> single external method object after editing the corresponding python method?
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi, Tim
You do not need to mess with the Python Script bindings. It looks like
you are trying to get URL:
www.isd197.k12.mn.us/hr/jobs/postings/1234/editJobAction(REQUEST)
Which of course does not exist. I would change your
assuming the DTML Method that has the form is called editJobAction.
Don't worry about passing REQUEST there; Zope takes care of that.
-- Jim Washington
Timothy Wilson wrote:
>
> This seems to almost work. :-)
>
> On Sun, 14 Jan 2001, Jim Washington wrote:
>
> > !
> >
> > !
> > !
> > ! Your changes have been saved
> > !
> >
> > !
> >
> >
> > Title
> >
> >
> >
> > Artist
> >
> >
> >
> >
> > !
> >
> >
> >
> > !
>
> That's quite clever. I wouldn't have thought of doing it that way.
>
> After translating the CD example to my own ZClass, I get the following error
> after hitting "Submit Edits" on the edit form:
>
> Zope Error
> Zope has encountered an error while publishing this resource.
>
> Resource not found
> Sorry, the requested Zope resource does not exist.Check the URL and try
> again.
>
>
> and the traceback:
>
> Traceback (innermost last):
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 162, in
> publish
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/BaseRequest.py, line 369,
> in traverse
> File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/HTTPResponse.py, line
> 528, in notFoundError
> NotFound: (see above)
>
> It looks like REQUEST isn't getting passed correctly. I've got REQUEST
> listed as a parameter for my PythonScript. I don't need to mess with
> bindings do I?
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
[EMAIL PROTECTED] wrote:
>
> Assume, I have a bunch of python modules / scripts, which I want to make
> accessible via zope. Is it better to use the external methods to bring the
> python modules into zope or should I make a Product out of my python modules.
Well, do the python modules contain methods or classes?
If classes, turn them into a Zope products.
IF methods, then use them as external methods.
> I also would like to know, if it is possible to update a bunch of external
> method zope objects simultaneously, or do I have to click 'edit' on every
> single external method object after editing the corresponding python method?
> This would be a bit tedious with 30 or more external methods...
Yeah, that is a pain, despite assurances that you shouldn't need to do
that :-S
probably the quickest way would just be to restart the Zope server...
cheers,
Chris
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi,
Has anyone been able to use the delUserForm to delete
users added within a PersistentUserSource in the
PortalMembershipSystem object ?
I am not sure if this piece of code in delUserForm
preceding the HTML form snippet does the right job:
...
I can view the users but when I click on the form
button to delete some users, I get
I get
Error Type: NotFound
Error Value: None
In the view I get, the user url points to
.../acl_users/userid (for example /acl_users/david)
and cannot be used to check the user object.
Thanks for any usefull answer.
Regards,
Kamon
__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
> I think probably Javascript is the 'cleanest' solution in this case,
> but depending on the complexity of your UI another non-JS approach is
> to make every link target the topmost frome (e.g., target="_top") and
> redraw all frames in the frameset on each 'click'. This way you know
> that all frames reflect the latest situation, but it can be annoying
> to see the whole browser redraw every time you do anything. However,
> if your browser doesn't *do* Javascript (so long as it does do
> frames hmm.. how likely is that?) then it would at least work
There' s always the possibility that people disable javascript -
and checking for instance http://www.guninski.com/browsers.html
I would say they have reason to do so.
My take is that one should at least provide a non-javascript alternative
to browse the site. This also helps with search-engines
cheers,
oliver
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
ZMySQLDA v2.0.1.
The install appears to be successfull, the Products appear in the Control
Panel, I can add, and open a database connection.
However, when I issue the following query:
SHOW TABLES;
I receive the following set:
Tables in la_eksempel
a
(la_eksempel the name of the database, naturally)
There is no table named 'a', however there is a table named "artikkel". If
I try to browse the database, I get a tree with 5 first-level nodes, all
named with the first letter of a table in my database.
If I try "SELECT * FROM ARTIKKEL;", I get
Error Type: TypeError
Error Value: len() of unsized object
With the following traceback:
Traceback (innermost last):
File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
222, in publish_module
File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
187, in publish
File /home/ahj/polar/zope/Zope2/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: RoleManager)
File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
171, in publish
File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_test)
File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: manage_test)
File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Connection.py,
line 204, in manage_test
(Object: RoleManager)
File
/home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: )
File /home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_In.py,
line 605, in renderwb
(Object: db)
File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Results.py,
line 174, in __getitem__
TypeError: (see above)
Has anybody else experienced this?
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hello Jan:
> I don't really know what else I could do. Right now it looks
> pretty much as if I'm going to switch to FreeBSD, my second
> favourite :-|
> Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
> be really curious what steps you followed to get it to work.-
You will have to use FreeBSD or use OpenBSD 2.7.
2.8 will not work because there is a bug in the threading library
included with OpenBSD 2.8. Zope triggers it when you call the management
screen.
However, in the Zope code for the management screens there are
"thread-safe" calls used which are not, as far as I know, used elsewhere
in Zope. Maybe there is a bug in that code?
But for now I believe the bug to be in OpenBSD 2.8. I have not found
anything to suggest that it has been fixed or looked at. None of the
patches released so far for 2.8 mention it.
I went through this in early December.
Luke
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Zope-Experts,
one question concerning design using zope:
Assume, I have a bunch of python modules / scripts, which I want to make
accessible via zope. Is it better to use the external methods to bring the
python modules into zope or should I make a Product out of my python modules.
I also would like to know, if it is possible to update a bunch of external
method zope objects simultaneously, or do I have to click 'edit' on every
single external method object after editing the corresponding python method?
This would be a bit tedious with 30 or more external methods...
Thanks a lot for any hints!
Tilo
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Thank you Dave for your answer. But what do you mean by you don't expect a SELECT
returning a number to work?
The error you got clearly is a mysql syntax error: If I have a table 'shop' and make a
SELECT on 'show' I really wouldn't expect that to work ;-)
But I don't get any mysql error, I get a python error.
Let me repeat my problem and try to be a little bit more precise (I use your example):
SELECT COUNT(*) FROM show GROUP BY article;
works from the mysql command line, works from within Zope on linux, but breaks from
within zope on windows. SELECT COUNT(*) FROM show; works from within Zope on windows,
too.
So the problem is to have a SELECT with COUNT() and GROUP BY-clause from within Zope
on Windows. Since it works on the mysql command line, it is definitely not an SQL
error.
I use Zope 2.2.4, mysql 3.23gamma, ZMySQLDA 1.1.3 and the libmySQL.dll linked from the
HowTo explaining the installation of ZMySQLDA on Win32.
The error I get is of type 'KeyError' with value 'unhandeld' and occurs on line 191 of
ZMySQLDA's db.py. This and the next lines read as follows:
for d in desc:
item={'name': d[0],
'type': defs[d[2]],
'width': d[3],
}
func(item)
where 'desc' is the fieldlist of the result set returnded by the query and 'defs' is
some kind of type-mapping defined at the top of db.py, that I don't really understand:
defs={
"short": "i", "long": "i", "char": "s", "double": "n", "decimal": "n",
"float": "n", "tiny blob": "t", "medium blob": "t", "long blob": "t",
"blob": "t", "date": "d", "time": "s", "datetime": "d",
"timestamp": "d", "varchar": "t", "string": "t",
}
The following little ugly hack makes my query work:
for d in desc:
try:
item={'name': d[0],
'type': defs[d[2]],
'width': d[3],
}
func(item)
except KeyError:
item={'name': d[0],
'type': 'i',
'width': d[3],
}
func(item)
So it seems to me that COUNT returns some field-type unknown to 'defs'. (What still
confuses me is, that this only happens in combination with a GROUP BY-clause.)
I wonder what's the value of d[2] for the COUNT()-column, but since I am quite new to
python and Zope I still don't know how to debug.
I also wonder if anybody running Zope with mysql on windows can reproduce this error.
Or maybe someone with a good knowledge of ZMySQLDA and the python mysql-module has
some hint?
Sorry that this message got so long ...
Markus Kemmerling
> This is curious to me - I tried this on my Linux platform from
> mysql and it
> doesn't work.
> Perhaps I misunderstand what you are trying to do:
>
> SELECT COUNT(*) FROM mytable - returns a number - so I really don't expect
> it to work.
>
> I have a table - shop and a column in that table - article:
>
> mysql> select count(*) from show group by article;
> ERROR 1064: You have an error in your SQL syntax near 'show group by
> article' at line 1
>
> Sorry if I misunderstand what you are trying to do -
>
> =
> Dave Woolston [EMAIL PROTECTED]
> Digital Creations www.digicool.com
> (716) 262-4715
>
>
> > I have a problem with ZMySQLDA and aggregate functions in
> combination with
> > grouping on Windows.
> > When I say:
> > SELECT COUNT(*) FROM mytable GROUP BY myfield;
> > I get an KeyError 'Unhandeld'.
> >
> >SELECT COUNT(*) FROM mytable;
> > works fine, so does
> > SELECT myfield FROM mytable GROUP BY myfield;
> > but not the combination of both.
> > Also on a linux machine the error doesn't occur. Of course I tested the
> > queries from the mysql command line.
> >
> > Any help?
> >
> > Markus Kemmerling
>
>
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
I think probably Javascript is the 'cleanest' solution in this case,
but depending on the complexity of your UI another non-JS approach is
to make every link target the topmost frome (e.g., target="_top") and
redraw all frames in the frameset on each 'click'. This way you know
that all frames reflect the latest situation, but it can be annoying
to see the whole browser redraw every time you do anything. However,
if your browser doesn't *do* Javascript (so long as it does do
frames hmm.. how likely is that?) then it would at least work
-steve
> "Martijn" == Martijn Pieters <[EMAIL PROTECTED]> writes:
Martijn> On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
>> First of all, I don't think you can achieve that with
>> javascript. As far as I know, neither IE nor Netscape allows
>> javascript to access DOM objects of other frame page for
>> security reasons.
Martijn> This restriction only applies when the two frames come
Martijn> from different domains. Alll URLs from the same webserver
Martijn> can access DOM trees in other frames from the same
Martijn> server. This is how Zope updates the left-hand tree in
Martijn> the management interface when you add a Folder, for
Martijn> instance.
Martijn> For an example of updating navigation buttons across
Martijn> frames see http://www.tunix.nl/'. Ignore the Dutch, just
Martijn> choose an option on the main page, then use the top and
Martijn> left navigation buttons to go around a website. Then use
Martijn> your browser's back and forward buttons to see the left
Martijn> and top menus follow the current page. Also, when
Martijn> clicking on a link in the content pane, the navigation
Martijn> menus will update. All JavaScript source comments are in
Martijn> english, that's they way I worked.
Martijn> -- Martijn Pieters | Software Engineer
Martijn> mailto:[EMAIL PROTECTED] | Digital Creations
Martijn> http://www.digicool.com/ | Creators of Zope
Martijn> http://www.zope.org/
Martijn> -
Martijn> ___ Zope
Martijn> maillist - [EMAIL PROTECTED]
Martijn> http://lists.zope.org/mailman/listinfo/zope ** No cross
Martijn> posts or HTML encoding! ** (Related lists -
Martijn> http://lists.zope.org/mailman/listinfo/zope-announce
Martijn> http://lists.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Hello,
> > Could anybody enlighten me??? I don't know Python (yet), so the
> > tracebacks are not too informative for me ...
>
> Are you using Python 2.0? It's not yet compatible with Zope, though
> efforts are being made. Just enter "python" to find out.
No, I'm not. At first I tried to take the version that comes
shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
threads compiled in (at least that's what the package name
suggests).
When that didn't work, I pkg_deleted the package and then
downloaded the 1.52 as noted in the Zope specs, compiled and
installed it - it seemed to run, but Zope cr***ed out with a
python.core after trying to access the management screen. The
machine itself definitely is okay, techwise. The python
compilation and installation didn't show any errors. The OpenBSD
installation is totally virgin otherwise.
I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-|
Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
be really curious what steps you followed to get it to work.-
Cheers, Jan
--
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[EMAIL PROTECTED]
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
I have installed zope on port 8080 on a win 2K machine.
It runs nicely, but due to firewalls and other reasons it has to run on port
80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
But when I try to use a manage page I cannot log in without being a member
of the win2K domain, and that is not feasible in this case. I have tried all
setting, I think.
Is there any way to do it?
Should I make my own authentication page so users can log on through a form?
If so how is this done?
Regards Max M
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Chris McDonough wrote:
>
> I'll trust that you're right, Dieter, because reading the traversal
> machinery code makes my head hurt. :-)
Likewise... I'm sure that's not a good thing ;-)
cheers,
Chris
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
> First of all, I don't think you can achieve that with javascript. As far as I know,
> neither IE nor Netscape allows javascript to access DOM objects of other frame page
>for
> security reasons.
This restriction only applies when the two frames come from different
domains. Alll URLs from the same webserver can access DOM trees in other
frames from the same server. This is how Zope updates the left-hand tree
in the management interface when you add a Folder, for instance.
For an example of updating navigation buttons across frames see
http://www.tunix.nl/'. Ignore the Dutch, just choose an option on the main
page, then use the top and left navigation buttons to go around a website.
Then use your browser's back and forward buttons to see the left and top
menus follow the current page. Also, when clicking on a link in the
content pane, the navigation menus will update. All JavaScript source
comments are in english, that's they way I worked.
--
Martijn Pieters
| Software Engineer mailto:[EMAIL PROTECTED]
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
-
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
62 matches
Mail list logo