Re: [Zope3-Users] Using zope.formlib for a search form
Am Freitag, 10. August 2007 04:14 schrieb Andrew Groom: Hi All, I've been battling with formlib for the last three days now and, while Uh oh, sorry, formlib. My example was based on z3c.form. Anyway, I would recommend you to have a decent look at this library, as I struggled a lot with formlib beforehand (due to very similar problems) and am much more content with z3c.form as it is much more flexible and adaptable. z3c.form is very nicely documented and there are various demos (z3c.formlib), however, it also takes quite some time to get into it. (At least for me). Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Using zope.formlib for a search form
Am Freitag, 10. August 2007 04:14 schrieb Andrew Groom: Hi All, I've been battling with formlib for the last three days now and, while I've learnt a lot, it's nearly driven me crazy. I'm trying to use it to create simple search form, i.e., a form that does input validation, remembers the values you entered, etc., but is not tied to a persisted object. I've got the form rendering and processing requests, but I'm completely stuck on getting the form to remember the values I just entered after a form post. Has anyone got any suggestions ? Here's what I've got so far, the latest attempt being to use a dummy object to provide the context, which also doesn't seem to work: Yes, I do the same and use a self-made class, called ActionForm for that, it's quite simple: class ActionForm(Formframe, form.Form): Generic form for context-less patterns def updateWidgets(self): self.widgets = getMultiAdapter( (self, self.request, self.getContent()), IWidgets) self.widgets.ignoreContext = True self.widgets.update() Then I have a persisten object, that acts as an entry point to my view, and which may provide various methods, e.g.: class SearchData(persistent.Persistent): implements(ISearchData) def search_data(self, **kd): # Here the data is retrieved, in my case from a relational database return data And then there's the view: class ViewSerachKunde(ActionForm): formErrorsMessage = _('There were some errors.') template = ViewPageTemplateFile('pt/searchdata.pt') fields = field.Fields(IViewSearchData) # If data is found, it's stored in a view-object-attribute found_data = None @button.buttonAndHandler('Search', name='search') data, errors = self.extractData() if errors: self.status = self.formErrorsMessage return self.found_data = self.context.search_data(**data) And then in my template file I have something like this (please note that I use a custom library for displaying fields (formsnippet): --! This displayes the search-widgets -- span tal:repeat=widget view/widgets/values span tal:replace=structure widget/snippets/div / /span --! And this displays the found data -- div tal:condition=view/found_data h2Found Data:/h2 span tal:replace=structure view/found_data/ /div Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: Re[2]: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py
Thanx a lot Adam and Christian. With regards, -Shailesh On 8/10/07, Christian Theune [EMAIL PROTECTED] wrote: Hi, Am Donnerstag, den 09.08.2007, 14:32 +0530 schrieb Shailesh Kumar: Hi, Just another quick question on this. Is there any plan for new bug fix releases of 3.3 branch? or Will the next releases be on the 3.4 branch? Zope 3.4 will receive a release candidate soon, but we need to do some more bugfixing. (If anybody is interested, help on fixing open bugs is always appreciated.) Zope 3.3 is currently maintained and will receive bugfix releases as necessary. The 3.3 branch might already incorporate fixes that haven't been released yet. In general, branches are maintained as long as their are people contributing fixes, the minimum amount of versions we support is two (currently Zope 3.3 and Zope 3.2). Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: Re[2]: [Zope3-Users] possible bug in zope\app\authentication\principalfolder.py
Hi, Am Donnerstag, den 09.08.2007, 14:32 +0530 schrieb Shailesh Kumar: Hi, Just another quick question on this. Is there any plan for new bug fix releases of 3.3 branch? or Will the next releases be on the 3.4 branch? Zope 3.4 will receive a release candidate soon, but we need to do some more bugfixing. (If anybody is interested, help on fixing open bugs is always appreciated.) Zope 3.3 is currently maintained and will receive bugfix releases as necessary. The 3.3 branch might already incorporate fixes that haven't been released yet. In general, branches are maintained as long as their are people contributing fixes, the minimum amount of versions we support is two (currently Zope 3.3 and Zope 3.2). Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems importing zalchemy
Hey, Am Freitag, den 27.07.2007, 11:18 +1000 schrieb Catriona Johnson: Hello I am a novice zope 3 user and would appreciate any help on this. I am trying to follow a few examples using zalchemy but am unable to progress beyond importing zalchemy. My python script so far contains import sqlalchemy import z3c.zalchemy and I get the following error when trying to import zalchemy AttributeError: __path__ Traceback (innermost last): File C:\Projects\TestZalchemyOracleConnection.py, line 1, in ? File C:\Projects\TestZalchemyOracleConnection.py, line 3, in ? import z3c.zalchemy File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\__init__.py, line 15, in ? from datamanager import ( File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\datamanager.py, line 20, in ? from zope.component import queryUtility, getUtility, getUtilitiesFor File C:\Python24\Lib\site-packages\zope\component\__init__.py, line 24, in ? from zope.component.interfaces import IComponentArchitecture File C:\Python24\Lib\site-packages\zope\deferredimport\deferredmodule.py, line 71, in __getattr__ raise AttributeError, name I am running this in the Wing IDE on Windows XP with Python 2.4, Zope 3.3, SQLalchemy 0.3.8 and zalchemy 0.2 Zope 3.3 might be too old in the sense that zalchemy probably depends on some other packages (via egg dependencies) that are not satisfied in Zope 3.3 yet. I can't directly make sense out of the error message though. How did you install this version of zalchemy? Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Strange ZODB error
On Aug 10, 2007, at 2:30 AM, Christian Theune wrote: Am Donnerstag, den 09.08.2007, 09:52 -0400 schrieb Gary Poster: You probably need to find out what the object is for anyone to have a chance of helping. I usually just put a pdb in the ZODB that is triggered if there's an error here, and then start poking around. Using the postmortem debug publisher might work too, but it has caused enough problems for me in the past that I dropped it, myself. One way to do this is to use the http postmortem debugger server, especially helpful if you try to debug problems in code that is triggered many times in an app, but you only want to see the pdb when an error happens. That's what I meant by postmortem debugger publisher. I was being fuzzy: your terminology is correct. However, my observation stands. I know Jim likes it, among others, but I have found it to not work the way I want enough to be a nuisance. I seem to recall that this may be related to the ZODB connection being closed, but I could be remembering incorrectly. Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Strange ZODB error
Am Donnerstag, den 09.08.2007, 09:52 -0400 schrieb Gary Poster: You probably need to find out what the object is for anyone to have a chance of helping. I usually just put a pdb in the ZODB that is triggered if there's an error here, and then start poking around. Using the postmortem debug publisher might work too, but it has caused enough problems for me in the past that I dropped it, myself. One way to do this is to use the http postmortem debugger server, especially helpful if you try to debug problems in code that is triggered many times in an app, but you only want to see the pdb when an error happens. Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems importing zalchemy
Am Freitag, 10. August 2007 08:28 schrieb Christian Theune: Hey, Am Freitag, den 27.07.2007, 11:18 +1000 schrieb Catriona Johnson: Hello I am a novice zope 3 user and would appreciate any help on this. I am trying to follow a few examples using zalchemy but am unable to progress beyond importing zalchemy. My python script so far contains import sqlalchemy import z3c.zalchemy and I get the following error when trying to import zalchemy AttributeError: __path__ Traceback (innermost last): File C:\Projects\TestZalchemyOracleConnection.py, line 1, in ? File C:\Projects\TestZalchemyOracleConnection.py, line 3, in ? import z3c.zalchemy File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\__ init__.py, line 15, in ? from datamanager import ( File C:\Python24\Lib\site-packages\z3c.zalchemy-0.2-py2.4.egg\z3c\zalchemy\da tamanager.py, line 20, in ? from zope.component import queryUtility, getUtility, getUtilitiesFor File C:\Python24\Lib\site-packages\zope\component\__init__.py, line 24, in ? from zope.component.interfaces import IComponentArchitecture File C:\Python24\Lib\site-packages\zope\deferredimport\deferredmodule.py, line 71, in __getattr__ raise AttributeError, name I am running this in the Wing IDE on Windows XP with Python 2.4, Zope 3.3, SQLalchemy 0.3.8 and zalchemy 0.2 Zope 3.3 might be too old in the sense that zalchemy probably depends on some other packages (via egg dependencies) that are not satisfied in Zope 3.3 yet. I successfully used z3c.zalchemy with Zope-3.3.1, although I'd recommend to use Zope-3.4.0b1 as other packages (e.g. z3c.form) work better with the newer Zope version. However, if you use the SVN-version, use revision 77230, as the last revision seems to be buggy (at least for me). Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] zope3 with fastcgi via WSGI
Hi all, Is any one know how to use wsgiref to run zope3 via fastcgi of apache? smilar to http://blog.d2m.at/2006/09/23/zope3-and-wsgi-integration/ thx - Why delete messages? Unlimited storage is just a click away.___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users