Re: [Zope] Zope 2.2.0a1 permission problems

2000-05-18 Thread Kyler B. Laird


I just installed release 2.2.0a1 on a glibc Linux box, but I keep
getting a permission problem when accessing a database query.

I have encountered the same problem using ZOracleDA
under SPARC Solaris.

File /data/www/Zope/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_In.py,
 line 602, in renderwb
  (Object: jis_query)
  Unauthorized: 0  

I've been especially frustrated by this.  I just brought
up Zope 2.2.0a1 because we have a few projects that need
to be developed and I want them all using Zope.  I don't
want to have a lot of conversion pain going from 2.1.6,
so I took a chance on using alpha software in this
environment.  I know the risks.  That doesn't make this 
any less painful.

I often tell our students that one of the best features
of Open Source software is that if there's an error, it
can be fixed (by the user or by a helper of the user's
choosing) without waiting on the company who controls
the source.  I'm just starting to learn Python, so I
didn't feel like I was up to the task of doing anything
usful in this case.

I was wrong.

After beating on this over the last day or so trying to
understand what was happening at the Web interface level
(thinking that I must have just screwed up a permissions
setting somewhere), I finally looked at the code and
simply commented out line 602 in
/data/www/Zope/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_In.py

# raise ValidationError, index

Ta da!  It works...for now.  This little patch will get
me up and going.  I trust that someone will fix whatever
problem necessitated this in a future release and I
won't need this awful kludge, but it sure is nice to be
able to use it now.

--kyler

___
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] dtml-sqltest to support SOUNDEX?

2000-06-16 Thread Kyler B. Laird


I think I've determined that there's no clean
way to specify a function to be used on a
sqltest variable.

I'd like to be able to do something like
dtml-sqltest soundex(lname) column="soundex(last_name)" type=nb optional
but it doesn't seem possible.  I hope that I
am missing something.

Yes, I know there are lots of kludges to get
around this, but then I lose the clean design
of sqltest - especially if I want to use
"optional" or "multiple".

Any suggestions?

Thank you.

--kyler

___
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 )




Re: [Zope] LoginManager UserSources

2000-08-02 Thread Kyler B. Laird


On Wed, 2 Aug 2000 15:13:45 -0400  you wrote:

I've gotten it working with
Postgres (with crypted passwords no less!)  It took me a couple of weeks on
and off to finally get that going.  Yes, it was painful, especially having
no prior experience with GUF (or much experience with Zope, for that
matter...)  I've not made it a very high priority, but I'm working on a
LoginManager/PostgreSQL walkthrough hoping that I might save someone else
some grief.  That info should be easy to translate for any other datasource
full of users you might have in mind.  Interested?

What I read:
"I see you're starving.  Are you interested in some food?"

Yes!  I'm desperate for a way to use Oracle and/or X.500
databases for authentication (and authorization and ...).
I would be happy to pay someone to hold my hand through
creating such a product.  (This is one of the first things
I built into Apache so many years ago.)

I'm a bit fuzzy on this, though.  Shouldn't there be an
easy way to generalize databases for this purpose?  Why do
we need PostgreSQL, Oracle, Gadfly, ... versions?  I'd
like to be able to just choose a connection ID and go.

Thank you.

--kyler

___
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 )




Re: [Zope] Search and replace

2000-11-20 Thread Kyler B. Laird


On Sun, 19 Nov 2000 15:03:46 -0500 you wrote:
Is there any way to do a 'search and replace' in a Zope folder (and it's
subfolders)?

Ha!  Funny you'd mention this in this way.

I've thought that a search and replace could be used
on www.zope.org to help force Zope documenters to use 
"it's" correctly by replacing each occurrence with 
"it is" in all documents.

Think it'd work?

--kyler

___
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 )




Re: [Zope] PoPy

2000-11-20 Thread Kyler B. Laird


On Mon, 30 Oct 2000 10:43:16 +1030 (CST) you wrote:

ImportError: ./PoPymodule.so: Undefined symbol "sem_wait"

Take a look at the man page for sem_wait().  Take the
library/libraries listed there and put them on the
configure line for PoPy.  In my case (Solaris 2.6), I
added "--with-libs=-lposix4".

It'd be nice if PoPy would do this on its own.

--kyler

___
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] user-owned products?

2000-11-25 Thread Kyler B. Laird


Over the last few months I've been getting much
more comfortable advocating Zope as our supported
Web application environment.  I'm *finally*
getting around to building my own products,
however, and I just realized how limited they 
appear to be.

It *seems* that Zope products are at the
evolutionary point that CGI handling was years
ago.  Remember when we had to use "cgi-bin" for a
CGI script?  Any user who wanted to run a script
would require some setup by the admin.  Then we
got smart and got rid of cgi-bin directories and 
put CGI scripts where they belong - in the hands
of the user (and in the users' directories along
with everything else).

Looking at Zope products, I see this happening
again - only worse.  Instead of simply creating a
directory for someone to fill with CGI scripts, I
have to personally maintain every product that
anyone wants to add to the Control Panel (or give
that person way too much authority).  Also, every
product will be available to every user.  With
tens of thousands of developers working on their 
own projects, this is *not* a Good Thing.

[Is there/Will there be] a way to allow users to
create their own products for their own use?  I
want people to freely whip up ZClasses and use
them throughout their sites.  I don't want them
to bother me or other users with their creations.

I haven't tried Python methods yet, but from what
little I've picked up about them, I think they
will be a huge step forward in giving users safe 
power.  This doesn't solve the products issue,
though, does it?  Can a user make his own class
without other users seeing it?

Any insight will be appreciated.

Thank you.

--kyler

___
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] manage_addFolder unusable from DTML-call?

2000-11-26 Thread Kyler B. Laird


I have a simple DTML method:
dtml-var standard_html_header
h2dtml-var title_or_id dtml-var document_title/h2
p
This is the dtml-var document_id Document 
in the dtml-var title_and_id Folder.
/p
p
Welcome, dtml-var AUTHENTICATED_USER!
You have these roles: dtml-var 
"_.string.join(REQUEST.AUTHENTICATED_USER.getRoles(), ', ')".
/p
dtml-call "manage_addFolder('Folder', 'my new folder')"
p
I created a folder!
/p
dtml-var standard_html_footer
It requires "Manager" to view.  When I run it with 
the dtml-call commented out, it correctly returns 
my role as "Manager".

I can go through the management interface to create
and destroy folders, but as soon as I view this
method, (it tries to reauthenticate me and) I get:
  Zope Error

  Zope has encountered an error while publishing this resource. 

  Unauthorized

  You are not authorized to access manage_addFolder. 

  Traceback (innermost last):
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 
222, in publish_module
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 
187, in publish
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 
171, in publish
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/ZPublisher/mapply.py, line 160, 
in mapply
  (Object: make_folder)
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/ZPublisher/Publish.py, line 
112, in call_object
  (Object: make_folder)
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/OFS/DTMLMethod.py, line 172, in 
__call__
  (Object: make_folder)
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/DocumentTemplate/DT_String.py, 
line 528, in __call__
  (Object: make_folder)
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/DocumentTemplate/DT_Util.py, 
line 331, in eval
  (Object: manage_addFolder('Folder', 'my new folder'))
  (Info: manage_addFolder)
File /data/www/Zope/42/Zope-2.2.4b1-src/lib/python/OFS/DTMLMethod.py, line 194, in 
validate
  (Object: make_folder)
File 
/data/www/Zope/42/Zope-2.2.4b1-src/lib/python/AccessControl/SecurityManager.py, line 
139, in validate
File 
/data/www/Zope/42/Zope-2.2.4b1-src/lib/python/AccessControl/ZopeSecurityPolicy.py, 
line 183, in validate
  Unauthorized: (see above)


I expected trouble when trying to use proxy roles for
this, but it seems like running as a Manager should
be simple.

I see a similar DTML method in use in a message from 
early October.  Am I missing something or did the
security model change get me?

Thank you.

--kyler

___
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 )




Re: [Zope] manage_addFolder unusable from DTML-call?

2000-11-27 Thread Kyler B. Laird


On Sun, 26 Nov 2000 23:22:17 +0100 (CET) you wrote:

When I tried to reproduce your problem (ZopeCVS rather than
Zope 2.2.4b1), everything worked as it should -- no
Unauthorized exception.

Indeed, it works for me using a simple CVS version
too.

Thank you.

--kyler

___
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] clean way to change AUTHENTICATED_USER?

2000-11-27 Thread Kyler B. Laird


My users need to login with a simple alias ("kyler")
which could change.  As part of the (PH/X.500) login
procedure, I want to set AUTHENTICATED_USER to a
better ID ("kyler.b.laird.1").  This will allow the
users to continue to change aliases at will without
necessitating ownership changes in Zope.  (I've done
this for years under Apache.)

I'm using LoginManager and a PH kludge I wrote to do
the authentication for now.  I realize I will need
to continue to use the alias (as supplied by the
user) for indexing there in orcer to use the cache.
I just want everything else to see the full ID.

I don't have a good grasp of The Big Picture yet, so
I'm hesitant to jump right in and add a setUserName
method.  I'm hoping there's a better way.

Any suggestions?

Thank you.

--kyler

___
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 )




Re: [Zope] manage_addFolder unusable from DTML-call?

2000-11-27 Thread Kyler B. Laird


  dtml-call "manage_addFolder('Folder', 'my new folder')"

Unauthorized

I finally got to the bottom of this.

I was running into a ZopeSecurityPolicy
problem.  It wanted to check the roles of
the owner of the executable, but I had
deleted the root user folder when I created
a Login Manager in the root folder. 

I was doing some strange things for testing,
but now I know better.

Thank you for the help.

--kyler

___
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] change object ownership from DTML?

2000-11-28 Thread Kyler B. Laird


I'm allowing users to initialize their own folders,
but I've run into a problem with ownership.  If I
simply do manage_addFolder(), the folder is created
"unowned".

I feel like I've looked everywhere for a clue on
how to set the ownership, but I haven't caught it.
Surely I'm missing something incredibly obvious (to
everyone else).

Anyone want to enlighten me?  I'd especially
appreciate a pointer to how I should have figured
this out on my own.

Thank you.

--kyler

___
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] Why is acl_users Contents hidden?

2000-12-04 Thread Kyler B. Laird


I've been planning on using roles to control
access to folders.  Unfortunately, I find that
if a user doesn't have the "Manage" role, 
requests to acl_users/manage_workspace will
get redirected to acl_users/manage_access and
no "Contents" tab will be shown.

The user can still go to acl_users/manage_main
and manage users, but he must know how to get
there.  Is there a simple fix?

Thanks.

--kyler

___
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] turning off inheritance

2000-12-13 Thread Kyler B. Laird


I am working on generating a directory from Zope
objects.  There is a folder full of units (other
folders).  These units contain people (more
folders).

Units and people both have contact information
stored in their properties.  How do I detect if a
person has, for example, 'contact_email' set?

I've tried
dtml-if "_.hasattr(this(), 'contact_email')"
It succeeds if the person doesn't have
contact_email set but its unit does.  I've also
tried variations of dtml-with ... only, with no
success.

Any pointers?  Where could I have found the
answer to this on my own?

Thank you.

--kyler

___
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 )




Re: [Zope] turning off inheritance

2000-12-13 Thread Kyler B. Laird


On Wed, 13 Dec 2000 19:39:43 +0300 (MSK) you wrote:
On Wed, 13 Dec 2000, Kyler B. Laird wrote:
 Units and people both have contact information
 stored in their properties.  How do I detect if a
 person has, for example, 'contact_email' set?

 I've tried
  dtml-if "_.hasattr(this(), 'contact_email')"

   Something like
dtml-if "_.hasattr(aq_explicit, 'contact_email')"
   (untested, but I use this in External Methods)

Consider it tested.  It works great from DTML.

Now that I know what to seek, I found a couple of
old messages that reference this.  I'm still
honing my ability to get Zope clues.

Thanks for the quick and effective answer!

--kyler

___
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 )




Re: [Zope] Turn Off Rampant Capitalization?

2000-12-28 Thread Kyler B. Laird


On Thu, 28 Dec 2000 12:44:24 -0500 you wrote:

 It Seems That Zope Likes To Capitalize Just About Every
 Word It Gets Hold Of.  Is There A Good Way To Turn This
 Off?  I Can Think Of Some Kludges, But I'd Like To
 Avoid Them.

How do you mean?

Which of the following is a proper noun or acronym?
Zope Contents View Properties Import/Export Security Undo Ownership Find 
Rename Cut Copy Delete Export Available Objects Add Help
Property Name Type Value
Digital Creations

I should look at the code, but I'm hoping that everything
like this is generated by some routine that has a
"capitalize" flag turned on.  I'd just like to turn it
off.

Note that I'm mostly whining.  I really should look in
the code and get a clue, but it'd be great if someone
would say something like "Oh, yeah, just set
'capitalize_everything' to 'off'..."  (I suspect that'd
be right next to the "random apostrophe's" setting.)

Can you tell I'm getting bogged down right before a
deadline?

Thanks.

--kyler

___
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] Turn Off Rampant Capitalization?

2000-12-28 Thread Kyler B. Laird


It Seems That Zope Likes To Capitalize Just About Every
Word It Gets Hold Of.  Is There A Good Way To Turn This
Off?  I Can Think Of Some Kludges, But I'd Like To
Avoid Them.

Thanks.

--kyler

___
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 )




Re: [Zope] Turn Off Rampant Capitalization?

2000-12-28 Thread Kyler B. Laird


On Thu, 28 Dec 2000 13:34:57 -0500 you wrote:

AFAIK, there is no routine which capitalizes the words in management tabs.
They just all happen to be capitalized literally.  Is this what you mean?

Yeah, tabs and everywhere else.  I was guessing that
some routine was responsible because I see things
like "id" changed to "Id".  I wouldn't expect a 
human to do that.

Oh, well.  I wanted to know if there was an obvious
answer that I was missing.  It wasn't the answer I
wanted, but I appreciate it.

Thanks.

--kyler

___
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] date: Are month and day required?

2000-12-31 Thread Kyler B. Laird


We just ran into some strange behavior with
date properties.  Although hour, minute,
second, timezone, ... are not required, day
and month seem to be.

Is there a way to specify only the year or
only the year and month?  (The ZQR was
referenced, but I didn't find info there.)

Thank you.

--kyler

___
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] terrible kludge to set password

2001-01-01 Thread Kyler B. Laird


I was unsuccessful at finding any examples of
changing a user's password from DTML, but I
did see a few requests for such functionality.
I bumped around quite awhile today trying to
figure out how to do it.  I didn't come up
with a good way, but I did find something that
works.

So, although it's terribly ugly, I thought I'd
throw my example out.  Perhaps it'll save
someone else some time.
dtml-call "REQUEST.set('name', 'k.laird.1')"
dtml-call "REQUEST.set('password', '5678')"
dtml-call "REQUEST.set('confirm', '5678')"
dtml-call "REQUEST.set('roles', ['CRUP_admin'])"
dtml-call "acl_users.manage_users('Change', REQUEST, RESPONSE)"

--kyler

___
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] manage_listLocalRoles user entry needed

2001-01-27 Thread Kyler B. Laird


I've read that some people are at least thinking
about user management systems that go beyond the
"handful of users" systems currently supported
by Zope.  (I'm working on one today.)

As a baby step toward supporting these systems,
I propose that manage_listLocalRoles provide a
text box for entering users in addition to (or,
in my case, instead of) allowing them to be
chosen from the select list.

The kludge I've been using is another form that
is defined in the root folder that imitates
manage_listLocalRoles, but has the text input
instead of the select list.  This works, but it
requires the user to know to use it instead of
just selecting "local roles."

Times like this make me think about an
infrastructure that would easily allow admins
to override pages without changing them every
time a package is installed.  Hmmm...

Thank you.

--kyler

___
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-dev] Z SQL: optional isn't?

2000-05-26 Thread Kyler B. Laird


I'd like to build a Z SQL method for *many*
people to use to list courses that we offer.
I don't want to require that all queries
using it understand all of the columns, but
I do want to be able to modify the query in
many ways.

So...after reading
http://yyy.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.5.3.html
optional 

A flag indicating if the test is optional.
If the test is optional and no value is 
provided for a variable, or the value
provided is an invalid empty string, then
no text is inserted.
I thought I could just use "optional"
with all of my sqltests.
select * from course_catalog

dtml-sqlgroup where
dtml-sqltest subject type=nb optional
dtml-and
dtml-sqltest course_nbr type=nb optional
dtml-and
dtml-sqltest version type=nb optional
dtml-and
dtml-sqltest campus_code type=nb optional
/dtml-sqlgroup

This works only if I provide at least an empty
string for all values.  If I don't provide a
value at all for one of the arguments, I get
Error, Bad Request: ['version'] 

SQL used:

Could not render the query template!
Traceback (innermost last):
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 
224, in publish_module
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 
189, in publish
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/Zope/__init__.py, line 221, 
in zpublisher_exception_hook
(Object: list_courses)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 
175, in publish
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/ZPublisher/mapply.py, line 
160, in mapply
(Object: manage_test)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 
112, in call_object
(Object: manage_test)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/DA.py, line 
347, in manage_test
(Object: list_courses)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/DA.py, line 
324, in manage_test
(Object: list_courses)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/DA.py, line 
426, in __call__
(Object: list_courses)
  File /data/www/Zope/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/Aqueduct.py, 
line 150, in _argdata
(Object: list_courses)
Bad Request: (see above)

Looking at Aqueduct.py, I don't understand why it's
not catching the "optional" arg.  Using my limited
Python knowledge, I commented out lines 149 and 150
of Aqueduct.py and now it works great.

Once again, I'm glad that I can add these awful
kludges instead of waiting for the vendor, but this
is something that I hope is fixed soon.

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Z SQL: optional isn't?

2000-05-27 Thread Kyler B. Laird


On Sat, 27 May 2000 13:07:50 +1000 (EST) you wrote:

In your 'Options' box for your ZSQL method, you can specify a default
value for arguments if they were not passed:

subject:string = ''
course_nbr: string = ''

Don't know if/where it is documented.

I hope it's not documented anywhere; it doesn't
work either.

It *does* allow the method to run without 
setting the arguments, but it generates SQL
like "where subject=''".

Someone had a good vision when writing the
documentation for the sqltest optional flag.
I just want it to work.

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Z SQL: optional isn't?

2000-05-29 Thread Kyler B. Laird


On Mon, 29 May 2000 21:56:33 +0200 (CEST) you wrote:

  Error, Bad Request: ['version'] 
You want to use "default values" in your SQL method argument list.

The details are described in "ZSQL/ZSQL.2.5.2.html".

What's the URL for this?  I'm looking through the
pointers from the documentation page and only
finding
http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.5.2.html
I even tried a search and only came up with ZSQL
1.* hits.

Quote from "ZSQL2.5.2.html":

 See Database method input argument format: Argument name and type are
 separated by a colon. A equal sign separates the default value from
 the name and type. The default value is a string representation of the
 desired value. If the default value contains spaces, or is an empty
 string, then it must be surrounded by double quotes.)

This is not the same functionality as is provided
by the "optional" attribute.  How would I use it
with an integer, for example?  I don't want a
default value; I want the option of not having
the value set at all.

I like the optional attribute.  I'd like to see
it do more than sit idle in the code.

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Z SQL: optional isn't?

2000-05-30 Thread Kyler B. Laird


On Tue, 30 May 2000 17:09:20 +1000 (EST) you wrote:

 I like the optional attribute.  I'd like to see
 it do more than sit idle in the code.

You don't have to do the typechecking in the 'arguments' box if you don't
want. eg. in your arguments section:

course=""
subject=""

O.k., it appears that I can still use that with
integers.  I can live with that.  I don't like
setting an integer to what appears to be a
string, but it does work.


select * from enrolments
dtml-sqlgroup where
dtml-sqltest course type=int optional
dtml-sqltest subject type=nb optional
/dtml-sqlgroup

The definition of the 'optional' tag from the docs might help here:
'''A flag indicating if the test is optional. If the test is optional
and no value is provided for a variable, or the value provided is
an invalid empty string, then no text is inserted'''
 
I should have been more specific.  I was
referring to the "optional" attribute of the
*argument* (not the sqltest).  I found that
it's coded in Aqueduct.py, but I'm not aware
of any way to set it from the Z SQL method
form.

Hmm... looking at this definition, it seems you have found a bug
(but setting the default value to "" in the arguments section will
provide a workaround). Or maybe 'no value provided' means 'is None'.
Anyone from DC want to provide a ruling? :-)

Originally, after reading the above ("optional"
in sqltest) definition, I'd hoped to be able to
simply list the variable in the arguments
section and make it optional in the sqltest.
After looking at the code, I determined that
this was not a reasonable expectation.  (What
if I used two sqltests and it was only optional
in one?)

In the course of investigating this, however, I
found that an optional attribute for an
argument is recognized.  It seems like this is
what should be used.

I can live with it either way, but I think that
optional is better than integer_var="". I'd
like to see whatever is chosen documented, and
I'd like to see "optional" removed from 
Aqueduct.py if it's not going to be supported.
(Maybe it's used by something else?)

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] manage_workspace = index_html

2001-07-08 Thread Kyler B. Laird


On 15 May 2001 13:23:30 -0600 you wrote:

 My workspace keeps being redirected to index_html

 I don't understand it, but I see that netscape navigator doesn't
 seem to have this problem.  But Mozilla and Lynx does!

Same situation here.

With mozilla, please state the version/buildnumber/daily-build-date.

Mozilla 0.9.2
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010628

This is with Zope 2.4.0b3.

It's not so bad now, but if Mozilla ever fixes tab handling
within textareas, I'm going to want to use it with Zope.

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_workspace = index_html

2001-07-08 Thread Kyler B. Laird


On Sun, 8 Jul 2001 21:56:51 +0200 you wrote:

 It's not so bad now, but if Mozilla ever fixes tab handling
 within textareas, I'm going to want to use it with Zope.

if you are really interested in using the tab with mozilla=20

I am.  Others are too - here and elsewhere.
http://bugzilla.mozilla.org/show_bug.cgi?id=29086

- because there is no fix needed,

O.k., so what's the secret?  How do you put a tab
in a textarea using Mozilla?

read the specifications,
where you will find the request to handle tabbing everywhere
the same - 

It doesn't sound like it's been resolved from
what I've read. 

but i could ask a partner of mine, who changed
his mozilla to work with the tab in textareas, for a patch

I'd appreciate that.  Thank you.  I'm willing
to believe that the knowledge is somewhere in
http://www.mozilla.org/unix/customizing.html#keys
but I haven't extracted it.

I'm waiting to be able to use an arbitrary
application (EDITOR) in place of the usual
textarea.  I'd be thrilled to have
vi/emacs/whatever right there.  Someday...

--kyler

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )