Re: [Zope] Re: login page problem

2005-03-31 Thread Cliff Ford
Use SimpleUserFolder and CookieCrumbler, and cut out the cute abbreviations like n and d while you're at it. I second that! I have started hitting the delete button rather than engage in the mental translation. Cliff Chris Withers wrote: prabuddha ray wrote: now my problem how n where do i

Re: [Zope] role, user defined roles, and inclusion

2005-04-01 Thread Cliff Ford
Dieter Maurer wrote: robert wrote at 2005-3-31 07:22 +0200: Is my assumption that granting a permission to Anonymous means granting it to anybody correct? Correct. Actually, I don't think that is strictly true! And it reminds me of a period of confusion I went through a few months ago, when I

Re: [Zope] Re: login page problem

2005-04-02 Thread Cliff Ford
Customisation of the login sequence is quite difficult for Newbies because there are lots of different ways to approach the problem - you have already tried some. I suspect that trying to match what was done in PHP may be part of your problem. It would be helpful to know if your lists of users

Re: [Zope] Re: login page problem

2005-04-03 Thread Cliff Ford
I have been trying to think of ways of providing specific pointers, So, assuming you have a custom login page and a custom python script that processes that page: In the Python script you could set a cookie for the District: context.REQUEST.RESPONSE.setCookie('District', district) where

Re: [Zope] Set MIME type using ZPT

2005-04-06 Thread Cliff Ford
tags should have width, height and alt attributes. Cliff Because I am getting the filename from the resultset. Once again thanks for all your time and patience. Any help would be gr8. Ta. Srikanth. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cliff Ford

Re: [Zope] segregated users

2005-04-06 Thread Cliff Ford
It is possible, I have done something similar. My solution involves giving users a Local Role in a folder to which access is to be granted. I built a small utility (with ZClasses - doh) to make it easy for the Administrators to add users from a database. Cliff Tim Evans wrote: I apologize if

Re: [Zope] Re: login page problem

2005-04-06 Thread Cliff Ford
suggest come back to the list with a new question in a new thread. Cliff prabuddha ray wrote: HI Cliff, I was hoping another reply eagerly. hope you dint give up on me. I've got some clarifications given below. On Mon, 04 Apr 2005 16:08:50 +0100, Cliff Ford [EMAIL PROTECTED] wrote: I am

Re: [Zope] Zope/python: downloading images from the web and add them to Zope]

2005-04-08 Thread Cliff Ford
[EMAIL PROTECTED] wrote: I would like to know how to add image file from an URL. I created a form with to pissibilities: add an image from a local file , and a image from an url You can get an image from a url with an External Method: # Get an image using the original url. import urllib def

Re: [Zope] developer docs

2005-04-12 Thread Cliff Ford
Milos Prudek wrote: What are the best documents for creating Zope products? I know Zope Book very well and I write TTW scripts. I need to convert a bunch of ZClasses into Products. ZDG seems very outdated. Should I start with mxmEasyProduct and then read ZDG? Is there a book available in

Re: [Zope] newbie:cookie expiry problem

2005-04-13 Thread Cliff Ford
prabuddha ray wrote: This may be very silly plz help I gave this cookie expiry statement in a python script: RESPONSE.expireCookie('login') return context.REQUEST.RESPONSE.redirect('index_html') but when i checked the cookie values in request page, it wasn't removed. the last redirect still

Re: [Zope] ZPT list is dead... zpt nav question

2005-04-13 Thread Cliff Ford
Your code works OK for me - I see a list of links: URL URL URL URL URL and each one links to a folder only. You did not say what was wrong with your output. Were you forgetting to set tal:content to the title of the listed folder to appear in place of URL: span tal:repeat=item

Re: [Zope] [Zope/DTML] accessing PARENTS url with dtml tag ???

2005-04-15 Thread Cliff Ford
Try this construction: dtml-with expr=aq_parentObject: dtml-var title_or_id url: dtml-var absolute_url/dtml-with Cliff [EMAIL PROTECTED] wrote: I have found a similar problem at this url: http://mail.zope.org/pipermail/zope/2000-August/115809.html I want to do the same a Kapil, but in DTML. I

Re: [Zope] Adding Carriage return/line feed to a text field

2005-04-21 Thread Cliff Ford
If you are using a textarea field for input you could also use a text area field for display, useful if the input might contain html tags. Therwise wrap the display in pre tags. Cliff MCDONNELL, LARRY wrote: Hi, I have a form that the field length for that element is set to 65k in the

Re: [Zope] problems rendering objects stored in the local file system

2005-04-27 Thread Cliff Ford
You have at least two choices: 1. Use apache and don't fetch index.html and the images through zope. Most installations use apache in front of zope, so this is just a matter of rewrite rules. 2. Use an External Method and make each image src attribute a function call, passing the image url as

Re: [Zope] Adding zclass inside folder with python

2005-05-18 Thread Cliff Ford
A couple of lines at the bottom show one way to create a folder and an object inside that folder... Anthu Nguyen wrote: Hi, I've tried everything I can think of and am probably missing something obvious - help... I'm trying to (1) Create a folder, then (2) Add a new zclass inside that folder.

Re: [Zope] newbie Simple WebSite Construction Using Zope and Search

2006-03-07 Thread Cliff Ford
is page.html. Best regards Cliff Ford Matt Slavin wrote: Hi, I am trying to use Zope to create a very simple company website (about 40 pages, or so) with the intention of having the flexibility to expand functionality etc in due course. I have very little Python / DTML experience, but have

Re: [Zope] filtering results

2006-04-08 Thread Cliff Ford
This is my implementation of an external method that calls HTML Tidy. I hope it is of some use. This is a fragment of a form processing script that calls an External Method, passing the body content of a html page: if request.submit == 'Tidy': (messages, buffer) = context.calltidy(body)

Re: [Zope] LAST INSERT ID driving me crazy

2006-05-01 Thread Cliff Ford
This is how it works for MySQL: insert into table_name ( ItemID, ItemDate, etc ) values ( dtml-sqlvar ItemID type=int, dtml-sqlvar ItemDate type=string, etc ) dtml-var sql_delimiter select LAST_INSERT_ID() as BaptismID You have to have the select LAST_INSERT_ID call in the same query as the

Re: [Zope] strange behaviour:can not access source-view.gif but a copy of it

2006-05-03 Thread Cliff Ford
Your second example below never terminates for me, and neither does http://www.ersigen.ch/garbage/view-source.gif I have seen hanging with malformed apache rewrite rules involving http/https protocols. I would check the Apache rewrite rules. Cliff robert rottermann wrote: thanks for the

Re: [Zope] [ANN] Zope 2.9.3 released

2006-05-14 Thread Cliff Ford
Not so long ago I installed Zope-2.9.2 and as I remember it all worked fine. This morning, with Zope-2.9.3 I get this: bash Zope-2.9.3: make /usr/local/bin/python install.py -q build Dependencies/AccessControl-Zope-2.9.3/AccessControl/cAccessControl.c: In function ‘module_aq_validate’:

[Zope] REMOTE_USER Security Issue

2006-05-14 Thread Cliff Ford
My people want to adopt a single sign-on system for web applications that is based on the REMOTE_USER environment variable. I have tried out RemoteUserFolder and also adapted exUserFolder to work similarly. My problem is that I figured out how a user who has permission to create python

Re: [Zope] Re: REMOTE_USER Security Issue

2006-05-15 Thread Cliff Ford
to None that should fix it? Subtle. Thanks for making me think. Cliff Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Cliff Ford wrote: My people want to adopt a single sign-on system for web applications that is based on the REMOTE_USER environment variable. I have tried out

Re: [Zope] Re: REMOTE_USER Security Issue

2006-05-16 Thread Cliff Ford
of a problem and has a solution. Cliff Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Cliff Ford wrote: My people want to adopt a single sign-on system for web applications that is based on the REMOTE_USER environment variable. I have tried out RemoteUserFolder and also

Re: [Zope] REMOTE_USER Security Issue

2006-05-17 Thread Cliff Ford
and Tres has recommended that it would be better to harden the User Folder code. In our case we might also be able to encrypt the remote Username. Once again, thanks to Tres and other list members, who are a wonderful resource. Cliff Cliff Ford wrote: My people want to adopt a single sign

Re: [Zope] Internet Explorer does not follows redirect, while Firefox does

2006-06-01 Thread Cliff Ford
I have forgotten the exact details, but some time back I found it necessary to pad out the body of the redirect page in order to make IE perform as intended. It may have been for an older version of IE, and the padding just needed to be a certain number of bytes. I think I came across a later

Re: [Zope] acl_users in MySQL

2006-06-16 Thread Cliff Ford
Suggestion: have a look at exUserFolder. It has a MySQL Authentication Source. The minimum requirement is a table with Username, Password and Roles fields. Cliff Luiz Fernando B. Ribeiro wrote: Hello, I've been searching for a solution on how to integrate my actual database of users (in

Re: [Zope] ZSQL Method Question

2006-07-18 Thread Cliff Ford
This is how it works for MySQL: insert into org (org_name, org_phone) values ('x', 'y') dtml-var sql_delimiter select LAST_INSERT_ID() as org_id You have to have the select LAST_INSERT_ID call in the same query as the insert, and you have to have the sql_delimiter. I assume you know that the

Re: [Zope] ZSQL Method Question

2006-07-18 Thread Cliff Ford
Comment on Peter's suggestion: I am no expert on these things, but it is my understanding that for MySQL LAST_INSERT_ID() fetches the last autoincrement value made by the current insert, so the outcome is not affected by virtually simultaneous requests. And I don't think MySQL accepts a value

Re: [Zope] autorefresh a web page every x minutes

2006-08-04 Thread Cliff Ford
This is Client-Pull web question, not Zope related. Here is an example of what needs to be in the head of the page: meta HTTP-EQUIV=Refresh CONTENT=5; URL=http://www.foo.com/foo.html; where 5 is seconds, so 300 would be 5 minutes, and the URL is the next url, leave out

Re: [Zope] insert_id with MySQL an Z SQL Method

2006-09-01 Thread Cliff Ford
Search the mailing list archives for July - there were several contributions to this question. Roughly: insert ... dtml-var sql_delimiter select LAST_INSERT_ID() as table_id_seq Cliff Ferhat Ayaz wrote: Hi, I have a Z SQL Method with an insert expression. To the inserted row will be

[Zope] Zope Calendar Product?

2008-02-22 Thread Cliff Ford
Hello friends, I have been away from Zope for a while. I have a Zope 2.9.3 installation (no CMS or Plone) for which someone has requested a Calendar application. From the Zope sites it is not clear whether any suitable product is available. Could anyone recommend something? Alternatively,

Re: [Zope] Zope Calendar Product?

2008-02-22 Thread Cliff Ford
wrote: Hi there, I 'm using Calendar Tag. It does work fine for my needs: http://www.zope.org/Members/teyc/CalendarTag Ciao, Giampiero On Feb 22, 2008, at 6:20 AM, Cliff Ford wrote: Hello friends, I have been away from Zope for a while. I have a Zope 2.9.3 installation (no CMS or Plone

Re: [Zope-DB] Retrieving Data from Z SQL in Python

2005-05-19 Thread Cliff Ford
Christer Fernstrom wrote: Hello, I have a very simple Z SQL method that works fine when I test run it. But when I call it from a Python script (see below) and attempt to print the result, I get the following error: Error Type: TypeError Error Value: cannot concatenate 'str' and