[tg-docs] New TurboGears link list page
Hi, I've created a general link list with TurboGears related resources on the wiki: http://docs.turbogears.org/TurboGearsBookMarks This is based on my private bookmarks for TurboGears, cleaned up, verified and gaps filled. Unlike http://docs.turbogears.org/1.0/ThirdParty this links to the homepage of every TG component, not the documentation for it and also has the components that are only used internally. It is intended for somebody who quickly wants to find the URL for something he probably already knows is there. The list is generated from an XBEL file, so that it can easily be updated and imported into your browser. The source file and the conversion script are attached to the page. Not every bookmark has a description yet. If you want to help, fill in the missing ones, or if you miss an important resource, go ahead and add it to the XBEL file and regenerate the page. I also linked this page from the 1.0 TOC. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-docs?hl=en -~--~~~~--~~--~--~---
[tg-docs] TurboGears News Ticker goes online
I'm pleased to announce the creation of the TurboGears News page on the wiki: http://docs.turbogears.org/News This page will keep you updated about important events around TurboGears like new releases, new third-party software, the progress of documentation efforts and so on. Everybody is free to post news there, but I would like to ask you to get a Wiki account and create a homepage for it, so we can see who's responsible for an article. You can find more information about editing the news in the source of the news page. Let the stories flow! Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-docs?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
On 6/12/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: Noah Gift schrieb: Anyone thinking about writing something for the iPhone in Turbogears? Will that work? I doubt it. The Apps will be like the dashboard-widgets in OSX. That is Safari-based rendering with special JS-Objects for system access. No python/TG in the equation. That's not how it works. iPhone's only support for 3rd party apps is bookmarked URLs that point to regular web pages. A web stack is pretty much a necessary part of the equation. You can't do widgets, just web pages that act pretty much like a widget. Presumably it will have some special JS objects or URL schemes, I haven't seen any docs yet. -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
Bob Ippolito schrieb: On 6/12/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: Noah Gift schrieb: Anyone thinking about writing something for the iPhone in Turbogears? Will that work? I doubt it. The Apps will be like the dashboard-widgets in OSX. That is Safari-based rendering with special JS-Objects for system access. No python/TG in the equation. That's not how it works. iPhone's only support for 3rd party apps is bookmarked URLs that point to regular web pages. A web stack is pretty much a necessary part of the equation. You can't do widgets, just web pages that act pretty much like a widget. Presumably it will have some special JS objects or URL schemes, I haven't seen any docs yet. Thanks for the clarification. They really want to have the apps making requests over the wire? Without support for UMTS? That's going to be either a costly or time-consuming experience I guess. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Form validation not working
Hi I have a problem with form validation not working. Here is the setup. I have generic methods in controllers.py called view and model_view. The appropriate method (either method X which displays the form, or method Y which handles the form input) located in a sub_controllers.py is then decided on by dispatch. Here is my code for the form: class ModellingFields(widgets.WidgetsList): template = widgets.TextField(validator = validators.NotEmpty(), label = Template) target = widgets.TextField(validator = validators.NotEmpty(), label = Target) program = widgets.TextField(validator = validators.NotEmpty(), label = program:) form = widgets.TableForm(fields = ModellingFields(),submit_text = Submit) Method X which displays the form: @generics.view.when(viewtype.startswith('modelling')) def X(sid,viewtype,tg_errors=None): if tg_errors: print tg_errors, submit_action = model_view?viewtype=modelling_result return dict(tg_template=.templates.modelling,sid=sid,form=modelling_form, action=submit_action,tg_errors=tg_errors) Method Y which should handle the validation and if correct proceed: @validate(form=modelling_form) @error_handler(X) @generics.model_view.when(viewtype == 'modelling_result') def Y(viewtype, target, template, program,**kwargs): result = modelling.modelling(target, template, program) return dict(tg_template=.templates.modelling_results, result = result) Code for the generic function which dispatches it: @expose() def view(self, sid=,viewtype=): try: return generics.view(sid,viewtype) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=sid) @expose() def model_view(self, viewtype, target, program, template): try: return generics.model_view(viewtype, target, template, program) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=) I followed the example in the Turbogears book as well as numerous tutorials on the web but I simply do not get any validation. I just want the same form to be redisplayed if one of the fields are empty and a warning next to the form. Is the problem because I use dispatch? Any help would be appreciated. Thanks! -- Tjaart de Beer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] ANN: AJAX widgets with jquery
Hi, I'm glad to release my 2nd. jquery wrapper widdget (1.1.2w2) http://www.python.org/pypi/jquery It provided a jquery wrapper and shiped with 3 easy ajax calls: * addCallback(target, update, href) * addPeriodBack(update, href, interval) * addFormback(target, update, href) addCallback (rails equivalent: link_to_remote), addPeriodBack (rails: periodically_call_remote), and addFormback (rails: form_remote_tag) provide you three common ajax callback functions. How to use them? check the simple code here: [div id=timelink][a href = /time]get time[/a][/div] -- Original link [div id=timediv][/div] -- field to update ${addCallback(target=timelink ,update=timediv, href=/time)} --our ajax callback So the ajax request is totally an 'add-on' which let your app still functionable while browser's JS is disabled. The concept is here: http://docs.turbogears.org/1.0/RemoteLink -- Fred Lin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: My turbogears.flash() alternative
Thanks, Marco; glad you like it. I think it would be a good idea to package this up a little better for distribution, and then, in theory, people could do: import flash2 flash2.info('Yadda yadda') ...and it would just work by binding to the request like you suggest. Ansel On Jun 12, 8:10 am, Marco Mariani [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ha scritto: That's an interesting suggestion. I'm not a CherryPy expert, so how do I bind something to a request like that? This way: def get_flash_service(): try: ret = cherrypy.request.flash_service except AttributeError: ret = cherrypy.request.flash_service = Flash() return ret def info(*args, **kw): get_flash_service().info(*args, **kw) I use this method to attach any kind of object to the request (even short-lived db or ldap connections) I've already switched to your class and it's cute :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Form validation not working
It took me a short while as well to figure out how it works. The problem is that you need an _instance_ of the form in your class that you can pass to to the @validate decorator, a class def as shown in some of the tutorials is not enough. This also means that you cannot set values in the form within the script, but there is a very easy and handy way to do that in the template. I'll post a code snippet later today. On 13 jun, 08:43, Tjaart de Beer [EMAIL PROTECTED] wrote: Hi I have a problem with form validation not working. Here is the setup. I have generic methods in controllers.py called view and model_view. The appropriate method (either method X which displays the form, or method Y which handles the form input) located in a sub_controllers.py is then decided on by dispatch. Here is my code for the form: class ModellingFields(widgets.WidgetsList): template = widgets.TextField(validator = validators.NotEmpty(), label = Template) target = widgets.TextField(validator = validators.NotEmpty(), label = Target) program = widgets.TextField(validator = validators.NotEmpty(), label = program:) form = widgets.TableForm(fields = ModellingFields(),submit_text = Submit) Method X which displays the form: @generics.view.when(viewtype.startswith('modelling')) def X(sid,viewtype,tg_errors=None): if tg_errors: print tg_errors, submit_action = model_view?viewtype=modelling_result return dict(tg_template=.templates.modelling,sid=sid,form=modelling_form, action=submit_action,tg_errors=tg_errors) Method Y which should handle the validation and if correct proceed: @validate(form=modelling_form) @error_handler(X) @generics.model_view.when(viewtype == 'modelling_result') def Y(viewtype, target, template, program,**kwargs): result = modelling.modelling(target, template, program) return dict(tg_template=.templates.modelling_results, result = result) Code for the generic function which dispatches it: @expose() def view(self, sid=,viewtype=): try: return generics.view(sid,viewtype) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=sid) @expose() def model_view(self, viewtype, target, program, template): try: return generics.model_view(viewtype, target, template, program) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=) I followed the example in the Turbogears book as well as numerous tutorials on the web but I simply do not get any validation. I just want the same form to be redisplayed if one of the fields are empty and a warning next to the form. Is the problem because I use dispatch? Any help would be appreciated. Thanks! -- Tjaart de Beer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Form validation not working
Just one typo in the code... the @validator should read @validator(form=form) NOT @validator(form=modelling_form) If possible could you also paste the form code with the template code? Thanks! On 13 Jun, 10:42, [EMAIL PROTECTED] wrote: It took me a short while as well to figure out how it works. The problem is that you need an _instance_ of the form in your class that you can pass to to the @validate decorator, a class def as shown in some of the tutorials is not enough. This also means that you cannot set values in the form within the script, but there is a very easy and handy way to do that in the template. I'll post a code snippet later today. On 13 jun, 08:43, Tjaart de Beer [EMAIL PROTECTED] wrote: Hi I have a problem with form validation not working. Here is the setup. I have generic methods in controllers.py called view and model_view. The appropriate method (either method X which displays the form, or method Y which handles the form input) located in a sub_controllers.py is then decided on by dispatch. Here is my code for the form: class ModellingFields(widgets.WidgetsList): template = widgets.TextField(validator = validators.NotEmpty(), label = Template) target = widgets.TextField(validator = validators.NotEmpty(), label = Target) program = widgets.TextField(validator = validators.NotEmpty(), label = program:) form = widgets.TableForm(fields = ModellingFields(),submit_text = Submit) Method X which displays the form: @generics.view.when(viewtype.startswith('modelling')) def X(sid,viewtype,tg_errors=None): if tg_errors: print tg_errors, submit_action = model_view?viewtype=modelling_result return dict(tg_template=.templates.modelling,sid=sid,form=modelling_form, action=submit_action,tg_errors=tg_errors) Method Y which should handle the validation and if correct proceed: @validate(form=modelling_form) @error_handler(X) @generics.model_view.when(viewtype == 'modelling_result') def Y(viewtype, target, template, program,**kwargs): result = modelling.modelling(target, template, program) return dict(tg_template=.templates.modelling_results, result = result) Code for the generic function which dispatches it: @expose() def view(self, sid=,viewtype=): try: return generics.view(sid,viewtype) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=sid) @expose() def model_view(self, viewtype, target, program, template): try: return generics.model_view(viewtype, target, template, program) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=) I followed the example in the Turbogears book as well as numerous tutorials on the web but I simply do not get any validation. I just want the same form to be redisplayed if one of the fields are empty and a warning next to the form. Is the problem because I use dispatch? Any help would be appreciated. Thanks! -- Tjaart de Beer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: turbomail and tg-admin shell
I'm getting the same problem in Python 2.4. Did you manage to solve it? On May 13, 2:42 am, noah.gift [EMAIL PROTECTED] wrote: Anyone have any problems withturbomailandtg-adminshellworking on python2.5? I get this traceback: In [10]: message.plain = Helloturbomailworld In [11]:turbomail.enqueue(message) ERROR: Internal Python error in the inspect module. Below is the traceback from this internal error. Traceback (most recent call last): File /usr/local/lib/python2.5/site-packages/ipython-0.8.1-py2.5.egg/ IPython/ultraTB.py, line 491, in text records = _fixed_getinnerframes(etb, context,self.tb_offset) File /usr/local/lib/python2.5/site-packages/ipython-0.8.1-py2.5.egg/ IPython/ultraTB.py, line 124, in _fixed_getinnerframes records = inspect.getinnerframes(etb, context) File /usr/local/lib/python2.5/inspect.py, line 877, in getinnerframes framelist.append((tb.tb_frame,) + getframeinfo(tb, context)) File /usr/local/lib/python2.5/inspect.py, line 841, in getframeinfo lines, lnum = findsource(frame) File /usr/local/lib/python2.5/inspect.py, line 510, in findsource if pat.match(lines[lnum]): break IndexError: list index out of range Unfortunately, your original traceback can not be constructed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Turbogears and Tiny ERP
Hello, We'd like to announce our initial release of the Tiny ERP web client. It's a complete open source enterprise management software (project mgt, accounting, sales, manufacturing, stock, ...). We had to develop some new widgets and we will try to released them as standalone soon, eg: a multi-column/root/selection tree. We used turbogears/kid/mochikit. For the model, we did not used SO nor SA but the Tiny ERP server connected in XML-RPC or NETRPC to TG. Tiny ERP can be used with the GTK client too, so that you can develop a GTK and Turbogears application with same code. Example: * Online demo for TG: http://www.tinyerp.com/demonstration.html * The same in GTK: http://www.tinyerp.com/demo-animations.html Download on TinyERP.com (development version): * http://www.tinyerp.com/component/option,com_joomlaxplorer/Itemid,132/ We are now planning to develop: * Calendar widget like the one you can find in Oprius * Editable lists Thanks, -- Fabien --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: turbomail and tg-admin shell
I haven't focused on turbomail in a bit, so no. Since all programs will eventually be able to send mail : ) ...it seems like this is manifest destiny for the turbogears built in shell? On 6/13/07, Singletoned [EMAIL PROTECTED] wrote: I'm getting the same problem in Python 2.4. Did you manage to solve it? On May 13, 2:42 am, noah.gift [EMAIL PROTECTED] wrote: Anyone have any problems withturbomailandtg-adminshellworking on python2.5? I get this traceback: In [10]: message.plain = Helloturbomailworld In [11]:turbomail.enqueue(message) ERROR: Internal Python error in the inspect module. Below is the traceback from this internal error. Traceback (most recent call last): File /usr/local/lib/python2.5/site-packages/ipython-0.8.1-py2.5.egg/ IPython/ultraTB.py, line 491, in text records = _fixed_getinnerframes(etb, context,self.tb_offset) File /usr/local/lib/python2.5/site-packages/ipython-0.8.1-py2.5.egg/ IPython/ultraTB.py, line 124, in _fixed_getinnerframes records = inspect.getinnerframes(etb, context) File /usr/local/lib/python2.5/inspect.py, line 877, in getinnerframes framelist.append((tb.tb_frame,) + getframeinfo(tb, context)) File /usr/local/lib/python2.5/inspect.py, line 841, in getframeinfo lines, lnum = findsource(frame) File /usr/local/lib/python2.5/inspect.py, line 510, in findsource if pat.match(lines[lnum]): break IndexError: list index out of range Unfortunately, your original traceback can not be constructed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
Not only without UMTS but without any 3G support at all. The device is 2.5G (GPRS) only. This thing is going to be glacier slow. Diez B. Roggisch wrote: Bob Ippolito schrieb: On 6/12/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: Noah Gift schrieb: Anyone thinking about writing something for the iPhone in Turbogears? Will that work? I doubt it. The Apps will be like the dashboard-widgets in OSX. That is Safari-based rendering with special JS-Objects for system access. No python/TG in the equation. That's not how it works. iPhone's only support for 3rd party apps is bookmarked URLs that point to regular web pages. A web stack is pretty much a necessary part of the equation. You can't do widgets, just web pages that act pretty much like a widget. Presumably it will have some special JS objects or URL schemes, I haven't seen any docs yet. Thanks for the clarification. They really want to have the apps making requests over the wire? Without support for UMTS? That's going to be either a costly or time-consuming experience I guess. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
The Steve Jobs OS X Apple era has few if any bombs. My bet is that if they say you can run AJAX apps then it will be killer performance. He is on too much of a roll to fail... On 6/13/07, List [EMAIL PROTECTED] wrote: Not only without UMTS but without any 3G support at all. The device is 2.5G (GPRS) only. This thing is going to be glacier slow. Diez B. Roggisch wrote: Bob Ippolito schrieb: On 6/12/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: Noah Gift schrieb: Anyone thinking about writing something for the iPhone in Turbogears? Will that work? I doubt it. The Apps will be like the dashboard-widgets in OSX. That is Safari-based rendering with special JS-Objects for system access. No python/TG in the equation. That's not how it works. iPhone's only support for 3rd party apps is bookmarked URLs that point to regular web pages. A web stack is pretty much a necessary part of the equation. You can't do widgets, just web pages that act pretty much like a widget. Presumably it will have some special JS objects or URL schemes, I haven't seen any docs yet. Thanks for the clarification. They really want to have the apps making requests over the wire? Without support for UMTS? That's going to be either a costly or time-consuming experience I guess. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: FE messages not localized since TG 1.0.2.2
Christoph Zwerschke wrote: W-Mark Kubacki wrote: Unluckily, with TG 1.0.2.2 FE's messages are neither localizable (no .MO created or added) nor displayed localized (even if apropriate PO was shipped with it). To make things worse what has at least worked with my own validators now does not! It is working for me. But I think you need to copy FormEncode's .po files over to the locale directory of your TG project. Does not work. To point it out: Although my validators are already translated they're not displayed correctly - as if gettext didn't work. -- Mark smime.p7s Description: S/MIME Cryptographic Signature
[TurboGears] Re: iPhone applications
On Wednesday 13 June 2007 15:41, Noah Gift wrote: The Steve Jobs OS X Apple era has few if any bombs. My bet is that if they say you can run AJAX apps then it will be killer performance. He is on too much of a roll to fail... I'm a Mac-owner my own, so I'm all in favor of apple. But that statement is just hilarious. NEXT failed big-time under Steve, the release of Safari for Windows is a bit premature - to say the least - and there even is a recent slashdot/economist article on apple's failures: http://apple.slashdot.org/article.pl?sid=07/06/08/1821215from=rss As good as SJ might be - he doesn't magically speed up 2.5G networks. That's a few Billion if non Trillion dollars worth of equipment... Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears manual
On 6/12/07, asm [EMAIL PROTECTED] wrote: This is great to see. What are you plans for this? Document the things i need to know in order for me to create Turbogears app. Am also starting to accumulate material and wondering how to contribute to the Turbogears documentation effort ... if I get that close to guru status. One thought: the instructions refer to apt-get which implies a Debian variant. These days there are so many Debian based distribution - perhaps you should say which one are you using? I am using Debian stable. Regards A On Jun 12, 4:43 pm, Lukasz Szybalski [EMAIL PROTECTED] wrote: In case somebody is interested in little manual/how-to on Turbogears http://www.lucasmanual.com/mywiki/TurboGears Enjoy, Lucas -- -- Linux is not magic. It just works.http://www.lucasmanual.com Fax Server from start to finish:http://www.lucasmanual.com/pdf/FaxServer.pdf -- -- Linux is not magic. It just works. http://www.lucasmanual.com Fax Server from start to finish: http://www.lucasmanual.com/pdf/FaxServer.pdf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Form validation not working
This the pattern I am using: class Customers: #you need to have an _instance_ of widgets.TableForm within your class! email_form = widgets.TableForm(fields =[widgets.HiddenField(name=mailID), widgets.HiddenField(name=customerID), widgets.TextField(validator=validators.Email(not_empty=True), label = Email, name=address), widgets.TextField(validator=validators.NotEmpty(), label = Contacto, name=contact), widgets.CheckBox(label=Mandar Pruebas, name=draftshere)]) ... @turbogears.expose(template=jobtickets.templates.edit_customer_email) def editform_email(self, mailID): try: mailID = int(mailID) mail = model.CustomerEmail.get(mailID) data = dict(mailID=mail.id, customerID=mail.customer, address=mail.address, contact=mail.contact, draftshere=mail.draftshere) except (ValueError, model.SQLObjectNotFound): raise cherrypy.NotFound return dict(data=data, form=self.email_form) @turbogears.expose() @turbogears.validate(email_form) @turbogears.error_handler(editform_email) def edit_email(self, mailID, customerID, address, contact, draftshere=False): try: mailID = int(mailID) mail = model.CustomerEmail.get(mailID) mail.address = address mail.contact = contact mail.draftshere = draftshere except (ValueError, model.SQLObjectNotFound): raise cherrypy.NotFound raise redirect(turbogears.url(/customers)) ... class Root(controllers.RootController): ... customers = Customers() ... this is your template: p py:content=form(value=data, action=tg.url('/customers/ edit_email'), submit_text='Guardar')Email Form/p On 13 jun, 11:07, Tjaart [EMAIL PROTECTED] wrote: Just one typo in the code... the @validator should read @validator(form=form) NOT @validator(form=modelling_form) If possible could you also paste the form code with the template code? Thanks! On 13 Jun, 10:42, [EMAIL PROTECTED] wrote: It took me a short while as well to figure out how it works. The problem is that you need an _instance_ of the form in your class that you can pass to to the @validate decorator, a class def as shown in some of the tutorials is not enough. This also means that you cannot set values in the form within the script, but there is a very easy and handy way to do that in the template. I'll post a code snippet later today. On 13 jun, 08:43, Tjaart de Beer [EMAIL PROTECTED] wrote: Hi I have a problem with form validation not working. Here is the setup. I have generic methods in controllers.py called view and model_view. The appropriate method (either method X which displays the form, or method Y which handles the form input) located in a sub_controllers.py is then decided on by dispatch. Here is my code for the form: class ModellingFields(widgets.WidgetsList): template = widgets.TextField(validator = validators.NotEmpty(), label = Template) target = widgets.TextField(validator = validators.NotEmpty(), label = Target) program = widgets.TextField(validator = validators.NotEmpty(), label = program:) form = widgets.TableForm(fields = ModellingFields(),submit_text = Submit) Method X which displays the form: @generics.view.when(viewtype.startswith('modelling')) def X(sid,viewtype,tg_errors=None): if tg_errors: print tg_errors, submit_action = model_view?viewtype=modelling_result return dict(tg_template=.templates.modelling,sid=sid,form=modelling_form, action=submit_action,tg_errors=tg_errors) Method Y which should handle the validation and if correct proceed: @validate(form=modelling_form) @error_handler(X) @generics.model_view.when(viewtype == 'modelling_result') def Y(viewtype, target, template, program,**kwargs): result = modelling.modelling(target, template, program) return dict(tg_template=.templates.modelling_results, result = result) Code for the generic function which dispatches it: @expose() def view(self, sid=,viewtype=): try: return generics.view(sid,viewtype) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=sid) @expose() def model_view(self, viewtype, target, program, template): try: return generics.model_view(viewtype, target, template, program) except dispatch.interfaces.NoApplicableMethods: return dict(tg_template=.templates.missing_record,sid=) I followed the example in the Turbogears book as well as numerous tutorials on the web but I simply do not get any validation. I just want the same form to be redisplayed if one of the fields are empty and a warning next to the form. Is the problem
[TurboGears] Re: Turbogears and Tiny ERP
Fabien Pinckaers schrieb: We'd like to announce our initial release of the Tiny ERP web client. Congratulations! You might like to add it to http://docs.turbogears.org/TurboGearsApplications Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
I'll make you a Gentlemen's bet and we can do it off list so we don't clutter the tglist :) I am not a fanboy, just my take on the situation is Apple is peaking..hitting on all cylinders in the osx area, not talking about NeXT. I bet Ajax support is damn good if I had to bet money on it. It is like Michael Jordon in the Fourth quarter...Jobs in the zone right now..maybe later he will crumble...but right now he is money! On 6/13/07, Diez B. Roggisch [EMAIL PROTECTED] wrote: On Wednesday 13 June 2007 15:41, Noah Gift wrote: The Steve Jobs OS X Apple era has few if any bombs. My bet is that if they say you can run AJAX apps then it will be killer performance. He is on too much of a roll to fail... I'm a Mac-owner my own, so I'm all in favor of apple. But that statement is just hilarious. NEXT failed big-time under Steve, the release of Safari for Windows is a bit premature - to say the least - and there even is a recent slashdot/economist article on apple's failures: http://apple.slashdot.org/article.pl?sid=07/06/08/1821215from=rss As good as SJ might be - he doesn't magically speed up 2.5G networks. That's a few Billion if non Trillion dollars worth of equipment... Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
With something like Google Gears a web based iPhone application could be taken offline if it's supported. I can't see there not being something similar (if not Gears itself) to handle those times when you don't have any connectivity. That being said, I still think having no official SDK is a dumb idea. The iPhone is running a stripped down OS X for [insert deity]'s sake, *not* allowing developers to harness that potential power is just silly. -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com skype: fireflisystems --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Comet Tutorial with Orbited and CherryPy
Hello, Orbited ( www.brbx.com/orbited ) is a daemon that allows you to send events from your application server (such as a cherrypy or turbogears app) directly to the browser. This is asynchronous communication and allows for you to create real-time applications such as gmail's chat or meebo's instant messenger. The project is still in the alpha stage of development, but it is quite usable. For anyone interested in incorporating comet-style communication into their turbogears applications, please take a look at http://brbx.com/orbited/tutorials/cherrychat.html which is a tutorial on creating a simple cherrypy-based chat application. The project is in its early stage, but a more turbogears-oriented tutorial is planned in the near future. I would appreciate community input on the current tutorial and recommendations to better utilize turbogears infrastructure. Couple of notes about orbited: - Orbited is very simple to use. The server code for the cherrychat application in the tutorial is about thirty lines, but only thirteen after you remove the boilerplate (cherrypy config and imports) - It runs as a standalone daemon, though it can be given its own thread and run from an existing python application such as turbogears/cherrypy - Its based on pyevent/libevent so its scales very well for this sort of communication - The architecture for scaling laterally (multiple server nodes) is based on memcached and makes it trivial to add orbited nodes to your application - The client api is very straightforward. Right now there is a simple pure python implementation thats used in the tutorial, but there is also a twisted-based implementation, as well as a pyevent/libevent based implementation. Any suggestions, questions, or criticisms are very welcome. -Michael Carter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Test Fixtures
Hello, Does anyone have any suggestions or examples of using fixtures with model testing. I want to test several interrelated models and it would be far easier if I could load a few fixtures that we available to each test. Any help would be greatly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: iPhone applications
On 6/13/07, Lee McFadden [EMAIL PROTECTED] wrote: With something like Google Gears a web based iPhone application could be taken offline if it's supported. I can't see there not being something similar (if not Gears itself) to handle those times when you don't have any connectivity. The phone is assumed to always have connectivity, either cellular or wifi. It currently has no support for offline. That being said, I still think having no official SDK is a dumb idea. The iPhone is running a stripped down OS X for [insert deity]'s sake, *not* allowing developers to harness that potential power is just silly. Stripped down OS X is basically speculation. A real issue is that the phone almost certainly isn't x86 or ppc based so the compilers they ship would be useless. Perhaps it's some proprietary compiler that they don't have license to give away to every developer in the Mac universe, or just something they can't afford to publicly support at this time. -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: FE messages not localized since TG 1.0.2.2
W-Mark Kubacki wrote: Christoph Zwerschke wrote: W-Mark Kubacki wrote: Unluckily, with TG 1.0.2.2 FE's messages are neither localizable (no .MO created or added) nor displayed localized (even if apropriate PO was shipped with it). To make things worse what has at least worked with my own validators now does not! It is working for me. But I think you need to copy FormEncode's .po files over to the locale directory of your TG project. Does not work. To point it out: Although my validators are already translated they're not displayed correctly - as if gettext didn't work. Just checked it out again. You don't even need to copy FormEncode's .po file; the .mo file is copied automatically when FormEncode is installed. Here is how you should get a dummy project running: * install TurboGears 1.0.2.2 * at the console: tg-admin quickstart foo cd foo tg-admin i18n collect tg-admin i18n add de * in welcome.kid, after body insert: div py:replace=form()/ * replace controllers.py with the following: -- from turbogears import controllers, expose, validate, error_handler from turbogears import widgets, validators class NoWar(validators.FancyValidator): def _(s): return s gettextargs = {'domain': 'messages'} messages = {'war': _(Don't mention the war!)} def validate_python(self, value, state): if 'war' in value: raise validators.Invalid( self.message('war', state), value, state) foo_form = widgets.TableForm( fields=[widgets.TextField( name=Not_Empty, validator=validators.NotEmpty()), widgets.TextField( name=No_War, validator=NoWar())]) class Root(controllers.RootController): @expose(template=foo.templates.welcome) @validate(form) @error_handler() def index(self, **kw): return dict(form=foo_form, now='now') -- * at the console: tg-admin i18n collect tg-admin i18n merge * in foo/locales/de/LC_MESSAGES/messages.po set: msgid Don't mention the war! msgstr War da was? * at the console: tg-admin i18n compile python start-foo.py * Both error messages should show up in German, the standard message from FormEncode if you leave the first field empty, the custom message War da was if you enter war in the second field. -- Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Test Fixtures
If you are using sqlobject and nose try this: http://docs.turbogears.org/1.0/Testing See: Testing Your Model -Ian On 6/13/07, Andrew [EMAIL PROTECTED] wrote: Hello, Does anyone have any suggestions or examples of using fixtures with model testing. I want to test several interrelated models and it would be far easier if I could load a few fixtures that we available to each test. Any help would be greatly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: identity email shouldn't be unique
On Jun 13, 8:57 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: a field should be marked alternativeid only if it should be unique. not the other way ;-) . Erm - no. The way it is it's the right way - if something is supposed to be working as uniquely identifying something, it must be a unique column. we said the same thing. no problem :) . valid policy may be to require the forgetter to enter username AND email. this way, someone able to intercept the mail of an user should provide minimal proof of identity. conversely, if we'd aggree to send a password to any email address someone requests a remainder for, there would also be no problem to send a list of username and password pairs. What's the usecase for someone to have several accounts - with one email? About 100% of all online applications I'm registered require me to provide a unique mail, or even use my mailaddress as login. here is the difference: the login name should be unique for our system, since this is the token to identify the user on our system, but the email address should be treated in the same spirit as a street address, and we don't usually care to register 2 members of the same family. this is not the case in my home, but you can still find lots of families that are using the same email address they received from their isp, especially in windows. in computer terms, enforcing unique email addresses for users un our systems, is somehow maintaining an one to one relationship with the table of global email addresses. So I consider this the sensible default in the TG identity model. But you can change that for your apps in about 20 secs. So - where is the reason for this discussion? i have only proposed to change this default, since choosing it is obstructing freedom, thus i think there should be a reason for doing this. sorry to bother, but enforcing this cleanly is more than a 20 seconds to do (look for example at the tg-registration project). for the same project, to make it work both ways based on the identity submodule, is it a way to query the model as of the uniquety of a field? Diez thanks for your patience, alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears and apache. How to install?
Hello, After installing turbogear application myapp with this command: python setup.py install I can open python and import myapp. It seems there are 3 config files in myapp folder. dev.cfg which i configured my dbi path in. app.cfg and sample-prod.cfg -Which config file do i use for production version? -Where do i get prod.cfg (do i just copy sample-prod.cfg)(What do i need to modify?) -What does setup.py install does? Which config file will my production site use? Any help is appreciated. Thanks. Lucas On 6/12/07, Lukasz Szybalski [EMAIL PROTECTED] wrote: On 6/12/07, Jeremy Gransden [EMAIL PROTECTED] wrote: Is this what you are looking for? http://docs.turbogears.org/1.0/mod_python http://www.lucasmanual.com/mywiki/TurboGears --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 413 Request Entity Too Large while uploading file
Use server.max_request_body_size. Eg, add to config: # Max upload size: 150 MB server.max_request_body_size = 157286400 Cheers CM On 9 Jun 2007, at 09:07, Andrej wrote: I'm using the FileField widget to upload a large ~ 300MB file and I get the error bellow. Is there way to increase the limit? Thank you, Andrej 413 Request Entity Too Large Entity is too large. Page handler: None Traceback (most recent call last): File /usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ cherrypy/_cphttptools.py, line 98, in _run self.processBody() File /usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ cherrypy/_cphttptools.py, line 233, in processBody raise cherrypy.HTTPError(413) HTTPError: 413 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears and apache. How to install?
I use mod_proxy with Apache, and have been happy enough with it so far. See: http://docs.turbogears.org/1.0/BehindApache http://groups.google.com/group/turbogears/msg/91e2cadf3c16c1c9 Cheers CM On 12 Jun 2007, at 21:11, Lukasz Szybalski wrote: On 6/12/07, Jeremy Gransden [EMAIL PROTECTED] wrote: Is this what you are looking for? http://docs.turbogears.org/1.0/mod_python At the bottom of this page there is a quote:Please note that I do not use this setup on any machine because of performance issues. I have long since switched to mod_proxy for deployment. If someone has any idea why there is such a performance impact when running on mod_python, please add some information here. Is there a different setup that should be used? How bad is the performance issue with this setup? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears and apache. How to install?
You would normally copy sample-prod.cfg to prod.cfg and modify it as appropriate (add any important settings from dev.cfg such as dburi. If you use start-app.py to start your TG app it will use dev.cfg by default if it exists. Pass it the config file you want it to use as an argument, eg: $ start-app.py prod.cfg The app/config/app.cfg file will used in either case. It should only contain global application settings that are needed in both development and production modes. Cheers CM On 13 Jun 2007, at 20:23, Lukasz Szybalski wrote: Hello, After installing turbogear application myapp with this command: python setup.py install I can open python and import myapp. It seems there are 3 config files in myapp folder. dev.cfg which i configured my dbi path in. app.cfg and sample-prod.cfg -Which config file do i use for production version? -Where do i get prod.cfg (do i just copy sample-prod.cfg)(What do i need to modify?) -What does setup.py install does? Which config file will my production site use? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: i18n enhancements
On Jun 10, 2007, at 7:53 PM, Diez B. Roggisch wrote: I've tried it out in a freshly quickstarted app (attached at the ticket) and looks great. These are the steps I took in case anyone wants to try it out: 1) tg-admin quickstart 2) wrote a sample and dumb helloworld.js at ${package}/static/ javascript and placed a button at welcome.kid to trigger the function. 3) registered that directory with widgets.register_statict_directory 4) set tg.include_widget = [turbogears.jsi18nwidget] in app.cfg 5) tg-admin collect 6) generated po in the toolbox 7) tg-admin compile 8) start app and enjoy Some comments suggestions: 1) It took me some time to figure out 3. Couldn't the widget or something be more clever and do this automatically. I guess it's kind of unintuitive for those not using widgets to include their js files at the template. Maybe the i18n widget should be just an implementation detail and this functionallity work for those not using widgets at all. I'm not sure I understand what you want here. I _do_ understand that the registration step can be done - I just did it in my testing-app that first didn't have any code in TG itself, so I just missed that things don't work without it. I just added the necessary code and it works, I replaced the patch in the trac. What I don't understand is the rest. Everybody is free to include js-files herself, but then she is on his/her own. I think that all is needed is to register the project/static/ javascript so the messages-X.js file can be served Hmm, I see that your latest patch does this... cool. 2) Do you have plans to make this useful for distributing 18n bundles with packaged widgets? From the code I guess messages-X.js must live inside a TG app but I might be wrong... So far it has to live there, yes. I currently don't use packaged widgets, but I can see it would be helpful to have this functionality there. The collect/merge/create-js-stuff should work the same way. What is missing is the inclusion of the message-files with another package-name - the packaged widget one. I can thing of one of several ways to accomplish this. One would be to factorize out the JSLink-creation facilities of the JSI18NWidget, giving a packaged widget author a way to create the links with her own package name as argument. The other one would be a static registration of package names. Benefit of the first approach: the amount of js-files included in each template is reduced. Benefit of the second approach: the author has less to write. Hmm, whatever you think it's best I think too since I'm not very much into the details of your patch's code. However, the the author has less to write part sounds appealing... :) Maybe a future improvement of TG-Widgets/TW could be to concatenate, jsminify and gzip all js files into a single file to optimize load time so having many js files isn't too problematic after all. Either or even both options could be included - but I need to get on speed with packaged widgets, which I'm currently not - so I'm open for help here. Well, I'm open for help in any case :) tg-admin quickstart -t tgwidget MyWidget creates a bare-bones widget package. There's really not much more into it... just keep in mind the neccesary entry point for the toolbox to load them for the widget browser. I can't help much more since my TG-widgets-foo is pretty rusty now since I've been using TW since it was born :) BTW, I finally implemented JS i18n with a similar approach as yours in the (pylons) app I talked about so thanks for the inspiration :) Some thinks I found which you might want to consider as ideas for the patch: 1) pygettext.py can extract localizable strings from JS files. I'm not sure how robust this would be in the long run or the degree of hackiness it achieves, but it's certainly easier than the regexps (however, now that they're already implemented I see no good reason to change them) 2) A gettext.translations instance has a private attribute called _catalog which is a dict with the translation mapping once the What I did to create the translation mapping for the JS side is something like: import gettext t = gettext.translation(domain, localedir, [langs]) js_mapping = var MESSAGES = %s; % simplejson.dumps(t._catalog) and then serve this dynamically from a controller method (no need to maintain the js files but certainly not as efficient) Alberto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: going through the Tutorial
Hi Walter, thanks very much for your comments and that you took the time to post them to the list! [EMAIL PROTECTED] schrieb: Setup and Startup Quickstart it would be useful to remind users that tg-admin ends up in the Scripts directory of your Python installation. Not entirely obvious for Windows users... Sounds sensible. On my TODO list now. the fact that tgsetup quickstart creates the project directory inside the current directory should be said at the beginning of the paragraph, so that you don't end up with the project directory inside e.g. your Scripts directory Ditto. Page2 Creating the tables If you are using postgresql and you do not have psycopg installed, of course tg-admin sql breaks. Psycopg is at http://initd.org/tracker/psycopg I added a sentence to paragraph two on page 2 about installing support for alternative databases yesterday. Was that already there when you read the page? Do you think this is enough or is too easy to miss? Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Localized numbers
Michael Bienia schrieb: It mentions that one should use the turbogears.i18n formating functions for formating numbers but doesn't explain how to do it. All have full docstrings explaining parameters and provide sophisticated control over formatting. Fire up the interactive Python console: from turbogears.i18n import * help(format_date) I managed to format a decimal number with turbogears.i18n.format.format_decimal() from my controller but how do I do it from my template? You could bind this function to a custom template variable. See thsi doc on how to do that: http://docs.turbogears.org/1.0/stdvars#custom-additions How do I get forms to use localized numbers? Especially when I want to edit a database record and pass the existing data to the form. I think you would need to attach a custom validator with a 'from_python' method to the form field: http://formencode.org/Validator.html#using-validation Somebody correct me, if I'm wrong. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] TGWebServices xml input
Hi List, I've been playing around with the TGWebServices and I'm trying to parse the XML payload of an event notification. My controller code is very simple: class WebServices(WebServicesRoot): @wsexpose() def bakeryHook(self, value): Do something return Thank you. The error I'm getting is: ValueError: invalid literal for int(): id type The XML payload looks like this: image collection-id type=integer18/collection-id content-typeimage/jpeg/content-type created-at type=datetime2007-06-06T10:07:34-04:00/created-at /image Any help is appreciated! Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 413 Request Entity Too Large while uploading file
Thanks! I ended up using a third party video-conversion service - one less headache to worry about. The less 300mb files hit my server, the better. On Jun 13, 5:15 pm, Chris Miles [EMAIL PROTECTED] wrote: Use server.max_request_body_size. Eg, add to config: # Max upload size: 150 MB server.max_request_body_size = 157286400 Cheers CM On 9 Jun 2007, at 09:07, Andrej wrote: I'm using the FileField widget to upload a large ~ 300MB file and I get the error bellow. Is there way to increase the limit? Thank you, Andrej 413 Request Entity Too Large Entity is too large. Page handler: None Traceback (most recent call last): File /usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ cherrypy/_cphttptools.py, line 98, in _run self.processBody() File /usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/ cherrypy/_cphttptools.py, line 233, in processBody raise cherrypy.HTTPError(413) HTTPError: 413 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] TurboGears News Ticker goes online
I'm pleased to announce the creation of the TurboGears News page on the wiki: http://docs.turbogears.org/News This page will keep you updated about important events around TurboGears like new releases, new third-party software, the progress of documentation efforts and so on. Everybody is free to post news there, but I would like to ask you to get a Wiki account and create a homepage for it, so we can see who's responsible for an article. You can find more information about editing the news in the source of the news page. Let the stories flow! Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---