Re: [Zope] IE v. Firefox for viewing Zope sites
On 17/06/05, John Poltorak <[EMAIL PROTECTED]> wrote: > > I've just put together a simple Zope website, but whilst it renders > properly under Firefox, it looks dreadful using IE. > > Can anyone explain why? Could it be the CSS? It could be your CSS, but it's probably IE. I usually end up writing two stylesheets, one for IE and one for everything else. Getting IE to read its on is just a case of using the IE-only conditional includes feature: though you'll have to hard code the URL - ZPT won't parse it ;) -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Working with CSS'
On 07/06/05, Jason Leach <[EMAIL PROTECTED]> wrote: > hi, > > I have a site developed with CSS. We just translated the site to > German. The problem I have is with some embedded graphics. For > example: > #rightcolumn h1 { > background: transparent url("i/news_title.jpg") no-repeat top left; > height: 38px; > width: 180px; > margin: 0; > padding: 0; > } > > This is the English graphic. If people are in the German side, I need > news_title_de.jpg. But I'm not sure how to deal with this without > doing a separate CSS file. You could make the CSS a DTML file that checks using , or you could even make news_title.jpg a python script that writes back an image depending on where the user is from. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Finding an object in a folder
On 27/05/05, Paul Winkler <[EMAIL PROTECTED]> wrote: > On Fri, May 27, 2005 at 09:20:52AM +1200, Phillip Hutchings wrote: > > > Well, it doesn't distinguish between an attribute which doesn't exist > > > and an attribute which has any false value. This makes it unsuitable as > > > a hasattr() replacement IMHO. > > > > But you're asking if the object posesses an attribute, not any > > question about the value of the object. I think returning false if the > > value is false is potentially dangerous - I may want to retrieve a > > false value. > > "But" what? You just said the same thing that I said :-) Sorry, shouldn't reply to things at 9am ;) Anyway, I agree with you, it is broken as the distinction is critical. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Finding an object in a folder
> Well, it doesn't distinguish between an attribute which doesn't exist > and an attribute which has any false value. This makes it unsuitable as > a hasattr() replacement IMHO. But you're asking if the object posesses an attribute, not any question about the value of the object. I think returning false if the value is false is potentially dangerous - I may want to retrieve a false value. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Still. Zope date datatype and TimeZone formatting problems.
> The same problem happens when: > > 1) Using _.DateTime(datestring) > 2) The datestring has minus-sign as year, month, date separators. > 3) A format is applied, like fmt="%d DE %B %Y" > > The following are examples when viewing a DTML Document containing : > > > > > > > > > > Output is: > > 2005/05/25 > 25 DE MAYO 2005 > 2005/05/25 > 24 DE MAYO 2005 > > Look at the last one 24 DE MAYO 2005, that is wrong ! > > In the last case, Zope assumes the date to be at midnight GMT and then, > when I apply the formatting (fmt="%d DE %B %Y") it substracts 5 hours > from GMT to get to my local timezone, resulting the date is 1 day off > the real date. The hyphen-delimited Y-m-d format is an ISO standard, ISO 8601, and is therefore always in UTC. You'll need to specify it as 2005-05-25T00-05 for 5 hours before. > I think Zope should not assume that a date is in any particular time > zone, nor in midnight GMT when using minus-signs as separators, rather > it should take the system's time zone settings into account when > applying datetime formatting. Therefore, if there's the need to use > dashes, there should be no reason to explicit state a time zone when the > user is only entering a simple date (year, month, day). > > In other words, why using dashes is acting like a bug, instead of > working like the first casem using "/" as separator ? Because it's not a bug, you're specifying an ISO 8601 date with no timezone qualifier, so it's assuming UTC, just like the spec says. I'm not claiming that the behaviour is what people want, but as long as Zope interprets ISO 8601 by the standard, then this isn't really a bug. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> It doesn't look like a monkey patch. Those aren't invisible in tracebacks. > > Follow the code path higher until you do get some effect. I've seen odd things before, but I agree, it isn't likely that it's a monkey patch. Chances are that some product is outdated. > I would imagine it's some sort of redirect. I would start with using the > IP address: usually this is enough to avoid the redirect. Otherwise, > find out how to turn "access rule" off. I think this may be in > Zope/doc/SECURIY.txt. > > I don't think it's possible to really remove the Zope Control Panel. You can't overwrite the manage URL with Zope, it's just not allowed. I suspect there's some external URL rewriting happening here. Either that or the guy was a real PITA and rewrote Zope to work with his pet ideas. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> Then generated the error. The error log shows the > same output as before. Not only should the line > number be one higher, I also put a dummy variable name > on that line to generate a stupid error msg. > > How can it not be getting to that code? I've searched > for another Zope instance, but found none. This is really odd. It sounds like it could be getting patched somewhere. Try raising exceptions from various points in the method, see if one gets there. > Also, you are saying that I probably will never get > the Control Panel back on this site with Product > Management tools; no Product refresh then, I suppose. > I'll have to thank the previous developer, as you > suggest! (of course there is no documentation either, > arrgh!) > > If you can think of anything else, I'd appreciated it. If the /manage URL has been overridden it's probably possible to fix it. Try going to /manage_workspace, see if that works. Is Zope behind a proxy? It's possible that it's being done with a URL rewrite somewhere. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question
> I modify utils.py, after saving a copy, in order to > obtain diagnostic output. Then I delete utils.pyc, > after saving a copy, in order to force a recompile > (even used compilezpy.py for this a couple of times). > Zope never seems to use the new version. Restart Zope. Python will pick up the changes. Also, if you're modifying security code, make sure you set security-policy-implementation to Python in zope.conf, otherwise you're using the C one, and no matter what changes you make to the Python scripts you won't see any changes. > I suspect that I have a fundamental misunderstanding > of how Zope uses code in the Products directory. > > Is Zope storing all the compiled byte code in the > data.fs file? Is there a way to force Zope to use new > code? No. Refresh the product or restart Zope. > Also, the previous developer removed the Control Panel > putting Plone as the root of everything. How can I > get information that the Control Panel usually > provides? Find a heavy object, find the developer, bring the two together at speed. Repeat until the problem is fixed. yoursite/manage will get you to the control panel. If he's managed to override /manage then you have problems... And the real problem: > TypeError: can only concatenate tuple (not "list") to > tuple Like it says, you're supplying a list, you want a tuple. It looks like you need to update PluginIndexes, I don't know where they come from. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] surprising interaction between Javascript and Zope
On 25/05/05, Dennis Allison <[EMAIL PROTECTED]> wrote: > > We have a need to set a session variable concurrently with a > user submitting a form on a mouse click. I accomplish this with > a bit of JavaScript associated with the OnClick attribute of the > form: > > location.replace('/setSesVar?var=nams&val=xxx;frm.submit(); > > which does the job except that the setSesVar script is executed twice, a > fact we discovered by monitoring calls to the setSesVar script. Once with > an incorrect parameter, and secondly with a correct parameter. > > There is probably some obvious explanation, but I am stumped. Setting > invalid values into session variables, even transient invalid values, can > cause problems. That JavaScript will never work properly. What you're doing is telling the browser to go to a new page, then submit the form. However, the form is no longer there, because you're on the new page. The behaviour you're seeing is probably caused by the browser getting completely confused. Why aren't you doing this in the server side script that the form calls? It makes more sense to do it that way. If you insist on doing it the current way you'll need to use a hidden iframe and load the page there, or use XmlHttpRequest to perform a subrequest. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can ZPT form call a url?
> The easiest way it to perform a redirect. > > Unfortunately, HTTP allows automatic redirects only for "GET" requests. > But, if you can live with "GET", then it is very easy. Fortunately, most web browsers are lax and let you do this. Safari is not, but the warnings are a bit obscure to most users, as a 302 response technically means to repost the data to a new URL - hence Safari's 'do you want to resend this data' question. A 303 response should be used to redirect a POST request. The user is still supposed to be asked if they want to follow the redirect, but I bet most browsers won't, as the specs are ambiguous. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about login
On 13/05/05, Chris Withers <[EMAIL PROTECTED]> wrote: > Phillip Hutchings wrote: > > On 03/05/05, Dennis Allison <[EMAIL PROTECTED]> wrote: > > > >>Another option is to look at the other User Folder products which > >>do things differently. Alternatively, you could modify the > >>CookieCrumbler product to make it fit your model. > > > > I've used exUserFolder before, it can store info in the session rather > > than chucking the user's password around ;) > > I also posted some patches for CookieCrumbler a while back that do the > same thing... Hm, time to search the archives, I'm sure it'll be useful. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to make a ZPT-based form that calls itself?
> > Case A: > >return context.some_page() > > > > Case B: > >context.REQUEST.RESPONSE.redirect('some_page') > > > GREAT!! Case B works perfectly (and it would have taken me forever to guess > this solution). Case A didn't work when written as > > return context.deltest.htm() Of course it didn't, there's no object called deltest and the object that's not there certainly doesn't have a method called htm. Think about Python syntax - the . delimits a class containment hierarchy. Zope allows you to have the . in object names, which I disagree with, so you have to use getattr(context, 'deltext.htm')() to get the actual object. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to find out the full URL
> > Ideally, I'd like to get back the whole URL as entered in the browser as > > a string. From the REQUEST I have to put together URL and QUERY_STRING, > > and the section (#xxx) part of the url can not be found in REQUEST. > > Unfortunately the CGI vars don't make provision for the anchor component > or the whole unaltered URL. Don't even know it that's possibly without > modifying ZPublisher. Just to add to this, it is not possible to get the #anchor section of the URL. Web browsers strip it off before sending the request to the web server, as it's a client side behaviour. I have confirmed this with IE6 and FireFox 1.0.3. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: HTML post processing in Zope
On 06/05/05, Cyrille Bonnet <[EMAIL PROTECTED]> wrote: > Thanks for all your answers, > > I usually use Apache to change HTTP headers. But here, I need to > post-process the HTML. > > The reason is that the NZ Government Webguidelines require HTML 4.01 :-( > and I'd like to keep Plone content and templates XHTML compliant. > > One way to do that is obviously to post-process the HTML with a language > that is good at regular expressions (Perl?). > > But I thought it could be neat if the post-processing could be done in > Zope itself. > > Anyway, I am looking at ZPublisher.HTTPResponse.HTTPResponse and it > looks like the right place. > > Thanks for your help! Yes, it's irritating isn't it? I've worked on an NZ government site before, but in PHP. You can use Apache to parse the HTML, mod_python allows you to use PythonOutputFilters, where you can use a regexp to clean up the HTML. I'd personally think that using Apache would be faster, but I may be wrong. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] bypass authentication
On 03/05/05, u1207440 <[EMAIL PROTECTED]> wrote: > I made a signup form for my website and I want to check if the username > already exists in > acl_users folder without having to log in as administrator. > > How do I do that, what and where do I have to modify my permission for so I > can use > acl_users.getUser(REQUEST.name) without having to login first?? (Zope tells > me that I don't > have permission to use the getUser method) Read up on Proxy Roles. We have the Zope Book for a reason. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about login
On 03/05/05, Dennis Allison <[EMAIL PROTECTED]> wrote: > > Another option is to look at the other User Folder products which > do things differently. Alternatively, you could modify the > CookieCrumbler product to make it fit your model. I've used exUserFolder before, it can store info in the session rather than chucking the user's password around ;) Anyway, all this isn't really solving the original poster's issue, as we still don't know what they're doing. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about login
On 03/05/05, Dennis Allison <[EMAIL PROTECTED]> wrote: > > You might take a look at the CookieCrumbler product. It does pretty much > what you seem to want & manages much of the hard stuff. I was getting there ;) Though I don't really appreciate the way CookieCrumbler stores the passwords... -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] question about login
On 03/05/05, u1207440 <[EMAIL PROTECTED]> wrote: > I have created a login form an a few users in acl_users, both exists in a > ordered folder > called conference. My login Form post to a login dtml method and login dtml > method > redirect me to another page. Even though the user exists and username and > password is > correct, somehow zope won't redirect me. The login query window pops out > three time and > in the end it denied me "You are not allowed to access '' in this > context". Can someone > help me, is there any thing I have to set?? should I move all the files into > the root?? It sounds like you're calling a method that's either restricted or set to a non-anonymous access level. What product are you using to allow you to use forms to log in? Can you post the DTML code? -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] manage_edit for Page Templates
On 25/04/05, Rushabh Mehta <[EMAIL PROTECTED]> wrote: > hi. there is a manage_edit() to modify the contents of a DTML document. is > there anything similar for page templates? i tried manage_edit() on a page > template and i get an attribute error for manage_edit... the document_src() > method works though > thanks > rushabh A quick look at zope-2.7.4/lib/python/Products/PageTemplates/PageTemplate.py gives me this: def pt_edit(self, text, content_type): Where text is the new content, and content_type is self explanatory. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] index.html in Python Script?
On 22/04/05, Erik Myllymaki <[EMAIL PROTECTED]> wrote: > How do address a ZPT with a name like index.html in a Python Script? > > The following: > > request = container.REQUEST > RESPONSE = request.RESPONSE > > if not request.has_key('next_state'): >return container.index.html(context, request) The . is the python object referencing notation, so you can't have a property called 'index.html' addressable in the normal way. Use getattr instead. return getattr(container, 'index.html')(context, request) It's all in the Zope documentation. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Newbie - Cannot cut and paste objects in ZMI
> Just got Zope 2.7.5 up and running on my Win2003 server with IIS. Was > working my way through the Book and the "Elvis" tutorial and I cannot > cut/copy objects and paste them in to other folders though the ZMI. > I'll check the object click cut...toolbar changes to display the paste > button but then I click to the object (folder) I want to move it to and > bam Paste button goes away... > I have not found any information if Zope will work with my config but it > seemed to be working until this issue > Again I am very green...reasonably familiar with windows and IIS but > Zope is a whole new ballgame. Check that you have cookies enabled, the ZMI uses cookes to store the clipboard data. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope support for Blender .blend files
On 21/04/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I would like to know more about how much an Apache-enabled Zope server > supports hosting and distributed editing of Blender .blend files. A file's a file, it'll be served just like a GIF, JPEG, Spreadsheet or text document. It might not have the correct MIME type associated automatically, but that's easy to fix. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate
What gives us the right to dictate what features these people give up their time to work on? Sure, Zope (the company) pays some, but others seem to do it for no direct reward, other than the Zope program. I admire these people, I have no idea what goes through Zope, though I might look at fixing some bugs and submitting patches to see what's involved. If you love the feature so much, either make it work yourself, or pay someone to. I do sympathise those who have spent time creating and maintaining solutions based on ZClasses, and I hope someone comes up with a system to export them to a product. I started with python scripts and then a product. Basic products are simple and development can be quite fast with refreshing turned on. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Does anyone care whether we deprecate ZClasses?
> We could choose to deprecate ZClasses. If we deprecated them in > Zope 2.8, they would still work in Zope 2.8 and Zope 2.9, but > their support would be removed in Zope 2.10. Would anyone be upset > if this happened? Another vote for depreciation. I've looked at ZClasses, got confused, and built a product to do the (quite simple) task in less time than I spent scratching my head at ZClasses. Personally I'd make them in to a Product for 2.10 and let anyone who cares make it work with 2.10. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] getting all fields from dynamic checkboxes
On Apr 4, 2005 9:00 AM, Dan E <[EMAIL PROTECTED]> wrote: > Hi, > Has anyone found a way to get a list of boolean values from > dynamically created checkboxes. > I have created a bunch of checkboxes within a repeat loop like this: > > class="noborder" >name="cb_array:list:int" >tal:attributes="tabindex tabindex/next; >checked python:test(curr_prop, 'checked', None);"> > > but when I access the cb_array from my python script, I only get the > checked values (and I can no longer match the values up with the > checkbox they came from). You need to keep a server-side list of the checkboxes and check which ones aren't there. Web browsers don't send back checkboxes that aren't checked - it's an HTML feature. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: next part of tal:atrributes problem
> below is python script c_nlogged: > > request = container.REQUEST > RESP = request.RESPONSE > > passwd = request.password1 > user = request.username, See the comma on the end of the user= line? That's your syntax error. When you get a syntax error always check a couple of lines further up the script. > if container.chkpwd(uname=user,pwd=passwd): //getting sysntax error here. > RESP.redirect(/store_nic/consumables/c_menu) > else: > RESP.redirect(/store_nic/consumables/index_html) > > below is zsql method chkpwd : > > select distinct(password) from c_userdet where > username= > and > password= > > i wanted to avoid d middle python script n handle the pwd validation > in the same zpt . > is it possible. > i have carry req vars eg. username pwd ,districtname in session for future > use. And can you _PLEASE_ use proper English spelling? It's not 'd', it's 'the'. I realise that you may not be a native English speaker so I won't worry about grammar, but when I see an email like this 99% of the time I don't even bother reading it. I don't mean to be offensive, but I think you would get a better response if your emails were easy to read, with proper capitalisation and words spelt out in full. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )