[web2py] Re: trailling space on crud.update form for field string type that is part of sql standard seems not logic
Please provide an example. Massimo On Jul 4, 2:55 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, Is Web2py suppose to follow SQL standard on trailling space for string type field on crud.update?? If I update a record containing field with string type, I got trailling space restored from the database in my field form... On submit it cause problem since I transform to int() for validation purpose... Why is crud.update restore trailing space? Does it liked to be like that or it is just a mistake or something Could it breaks anything to change this behavior? Richard
[web2py] Re: Call functions periodically from WEB2PY at short time basis (like 0.05 ... 5 seconds)
Compatible yes but we do not have a simple API to use it. I promised we would have an API for it by the end of August if not sooner. On Jul 4, 4:06 pm, Francisco Costa m...@franciscocosta.com wrote: Is Celery compatible or easy to use with web2py? On Jul 4, 6:35 pm, Mengu whalb...@gmail.com wrote: go ahead and use celery. On Jul 4, 3:47 pm, Valter Foresto valter.fore...@gmail.com wrote: It is possible to call from inside WEB2PY a 'short user function' based on time tick periodically (like any 0.05 ... 5 seconds) ? This functionality can be very usefull to collect data from the field (for example from equipments on the Ethernet LAN or on the Internet or simply attached to the Server), execute some short algorithm on the readed data and then store results on the database using DAL. Users can access and see database contents from the web using MVC in WEB2PY. In other words, WEB2PY will be used to do acquisition, processing, storage and presentation of field data over the web and the Internet ?
[web2py] Re: why doesn't INPUT _type='checkbox' return values of True or False, instead of 'on' or None?
This cannot be changed. The problem is how they behave according to HTML specs. They velue is either returned or not. On Jul 4, 6:08 pm, Luis Goncalves lgoncal...@gmail.com wrote: Hello! It seems to me that the behavior of checkboxes is different and non-standard from the rest of input types, causing one to handle it as a special case (when trying to automate input field processing). In my application, an admin can create profile forms through a friendly interface. These forms can include string, text, checkbox, and lists (sets). A user of the system can see his current profile (rendered by generating a form given a definition of the form elements stored in a database), and edit it. The editing is very clean and straightforward: for field in event_fields: value = form.vars[str(field.id)] if value: # check if entry already exists and update, otherwise create prev_entry = db( (db.event_profile_entry.person == me.id) (db.event_profile_entry.event == session.cur_event) (db.event_profile_entry.event_profile_field == field.id) ).select().first() if prev_entry: prev_entry.update_record( data = value ) else: db.event_profile_entry.insert( person = me.id, event = session.cur_event, event_profile_field = field.id, data = value ) EXCEPT that a checkbox either has a value = 'on' or = None. If checkbox returned values of True or False, the code would work fine for checkboxes too, but as it is now, they will require special code. Is it worth changing the behavior of checkbox to be more like the rest of the input types? Thanks, Luis.
[web2py] estore
Is this no longer maintained? It does not seem to be available to dowload. Are there any other examples of web2py ecommerce sites?
[web2py] web2py and DreamPie - The Python shell you've always dreamed about!
Does anybody knows how can we run web2py in shell mode under DreamPie? http://dreampie.sourceforge.net/ -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]
[web2py] PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)
HI, I just finished the refactoring for PFWizard plugin, major bug fixes (thanks everyone testing and reporting) *# NOTES* - It works only wih web2py 1.97+ - It works only for SQLFORM based forms, you have to pass a db.table - It does not works for Crud() , does not allows editing or delete yet (can you contribute?) - It receives any arg that SQLFORM receives *# FIXES* - Fixed Issue #2 - Now it works with tables which has '_' or '__' in fieldnames. - Fixed Issue #1 - Now it works with Python 2.6 - removed enumerate() - Ommit fields - Fixed issue, now you cam ommit fields with no break in validation (client and server side) - Code cleanup, PEP8 checkups # But I really does not matter about it :P *# FEATURES* - Added form.auto_validation method Now you don t need to always write if form.accepts()elif form.errors. Just use in this way: form = PowerFormWizard(db, steps) form.auto_validate() return dict(form=form) or # define flash message form.auto_validate(messages=['Yeah it works', 'Ops, error']) or #execute a function after validation def myfunction(success, x,y,z): #first argument receives True or False form.auto_validate(flash=my_function, args=[x, y, z]) DEMO DOWNLOAD : http://labs.blouweb.com/powerformwizard REPO:https://bitbucket.org/rochacbruno/powerformwizard *# Whats next?* working on a new plugin for the 'Power' family, it is a JSON based tableless grid (which is much more than a grid) hope to release with examples, by the end of the week, preview - http://labs.blouweb.com/PowerGrid Need help, contribution, test.. []'s -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]
[web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)
Smalll typo, the new method is called *.auto_validation()* #not auto_validate()
[web2py] help for a query
supposing to have a table of data like this: tab = define_table('measured_data', Field('measure', 'double'), Field('timestamp', 'datetime') ) how can I get from a query how many measures I have for each day? thanks for any help Manuele
Re: [web2py] help for a query
_count = tab.measure.count() _gr = (tab.timestamp.year(),tab.timestamp.month(),tab.timestamp.day()) rows = db(tab).select(_count, groupby=_gr) for row in rows: print row[_count]
[web2py] Missing authorization header in 1.97.1 under Apache
Hi, we have a very strange behaviour. We have 2 apps: CAS (the one from the free appliances), modified in order to receive 2 types more of authorization. DevelApp this application sends a REST call to CAS to create a user. This works under web2py 1.94.6 in both rocket and apache servers, included 1.97.1 with rocket. But using 1.97.1 on production, with apache, we don't receive the authorization header. Whe make the rest petition in this way: @staticmethod def create_user(data): admin_auth=admin %s % base64.b64encode(CAS_PASSPHRASE) rret=rest(%s/user % (CAS_REST), method='put', headers={'ACCEPT': 'application/json', 'CONTENT-TYPE': 'application/json', 'AUTHORIZATION': admin_auth}, data=json.dumps([{name: data.name, email: data.email, password: data.password}]) ) the header is called authorization as mandated by the standard. but in 1.97.1 under apache, we dont receive the request.env.http_authorization variable. somebody knows why happen this? thanks in advance
Re: [web2py] help for a query
On 05/07/2011 12:32, Vasile Ermicioi wrote: _count = tab.measure.count() _gr = (tab.timestamp.year(),tab.timestamp.month(),tab.timestamp.day()) rows = db(tab).select(_count, groupby=_gr) for row in rows: print row[_count] nice solution... thank you very mutch! :) Manuele
[web2py] Re: estore
I sure hope so... The only thing I have been looking to is Massimo's brief tutorial on credit card payments http://groups.google.com/group/web2py/msg/00df672fe3d67aab On Jul 5, 4:48 am, apple simo...@gmail.com wrote: Is this no longer maintained? It does not seem to be available to dowload. Are there any other examples of web2py ecommerce sites?
Re: [web2py] Re: Call functions periodically from WEB2PY at short time basis (like 0.05 ... 5 seconds)
This loops every 5 seconds regardless of how long the remainder of the loop takes (as long as it is somewhat less than 5 seconds) from time import time, sleep next_time = time()+5 while True: sleep(next_time-time()) next_time+=5 # ... Cheers, John La Rooy On Mon, Jul 4, 2011 at 10:52 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: You should run a background process that does it white True: sleep(5) On Jul 4, 7:47 am, Valter Foresto valter.fore...@gmail.com wrote: It is possible to call from inside WEB2PY a 'short user function' based on time tick periodically (like any 0.05 ... 5 seconds) ? This functionality can be very usefull to collect data from the field (for example from equipments on the Ethernet LAN or on the Internet or simply attached to the Server), execute some short algorithm on the readed data and then store results on the database using DAL. Users can access and see database contents from the web using MVC in WEB2PY. In other words, WEB2PY will be used to do acquisition, processing, storage and presentation of field data over the web and the Internet ?
[web2py] Why using 'statusbar' for menu zone?
Why not using 'menu' or some others? Is there any reason?
Re: [web2py] Re: Call functions periodically from WEB2PY at short time basis (like 0.05 ... 5 seconds)
This loops every 5 seconds regardless of how long the remainder of the loop takes (as long as it is somewhat less than 5 seconds) from time import time, sleep next_time = time()+5 while True: sleep(next_time-time()) next_time+=5 # ... I do not know if it is pertinent with the topic, but uWSGI has tons of (cheap, very cheap compared with solutions like celery) facilities to allow this sort of tasks: http://projects.unbit.it/uwsgi/wiki/Decorators -- Roberto De Ioris http://unbit.it
Re: [web2py] how to implement database tables with one level of indirection?
I thougth about it too, but I didn't find the thread... ;-) Richard On Mon, Jul 4, 2011 at 9:19 PM, Bruno Rocha rochacbr...@gmail.com wrote: The web2py app wizard has a Dynamic model creator, may be you can take a look in to the wizard code. And fork as a plugin. On Mon, Jul 4, 2011 at 9:38 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: It surely a missing feature... Richard On Mon, Jul 4, 2011 at 8:30 PM, Luis Goncalves l...@vision.caltech.eduwrote: Thanks for the links!! Django dynamic formsets seems powerful! When I first started off, I investigated using django, but found it very difficult. Web2py is so much easier to use (especially with the clear manual, and one click install with working apps ('Welcome'))!!! Maybe I'll end up contributing a friendly dynamic form creator for web2py ... merci, Luis. On Mon, Jul 4, 2011 at 4:54 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Maybe you could find some inspiration from this project for Django : http://code.google.com/p/django-dynamic-formset/ You need to install Django to test it... What you seems to do is adding an arbitrary number of input for a given field... Following good database design pratice you will normalise your schema... I had try to find a solution similar to django dynamic formset, but I give up in the pass. You have this thread that could maybe bring some answer : http://groups.google.com/group/web2py/browse_thread/thread/50af0d67554c94d9/ad553c6a5514ecc7?pli=1 Web2py let you do this : http://www.web2py.com/book/default/chapter/07?search=filter#One-form-for-multiple-tables But you can't have fields with the same name in your table... Finally it maybe possible with component now to load a arbitrary number of fields inputs for a given table and with jQuery submit the differents forms as one I would investigate in that direction too... Good luck Richard On Mon, Jul 4, 2011 at 7:17 PM, Luis Goncalves lgoncal...@gmail.comwrote: Hello Richard! I looked at this, but wasn't sure how it could help -- what I need is a way for a (non-technical) admin to create profile forms with arbitrary fields (through a friendly web interface), and then users to be able to view and edit their (run-time reconfigurable) profiles. At any rate, the method I described above seems to work quite well, thanks to web2py's versatility, allowing me to define forms programmatically (excerpt below). I was wondering if there was a more clever/efficient/proper way to do so. Perhaps not! Thanks!! Luis. for field in event_fields: # see if person has a pre-defined value found = False for my_efield in me.event_field: if my_efield.display_title == field.display_title: found = True break if found: if field.data_type == 'string': new_input = INPUT(_type = field.data_type, _name = field.id, requires=IS_NOT_EMPTY(), _value=my_efield.data ) form[0].insert(-2, TR(field.display_title+':', new_input )) elif field.data_type == 'text': . else: if field.data_type == 'string': new_input = INPUT(_type = field.data_type, _name = field.id, requires=IS_NOT_EMPTY()) form[0].insert(-2, TR(field.display_title+':', new_input )) elif field.data_type == 'text': -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
Re: [web2py] how to implement database tables with one level of indirection?
That type of method will work, but it will result in a new database table being created for each event/custom profile. There are various alternatives for implementing user defined fields -- here are some Stackoverflow links: http://stackoverflow.com/questions/5106335/how-to-design-a-database-for-user-defined-fields http://stackoverflow.com/questions/4151468/how-to-store-custom-user-fields-in-database http://stackoverflow.com/questions/2924027/db-design-to-store-custom-fields-for-a-table Anthony On Monday, July 4, 2011 9:19:00 PM UTC-4, rochacbruno wrote: The web2py app wizard has a Dynamic model creator, may be you can take a look in to the wizard code. And fork as a plugin. On Mon, Jul 4, 2011 at 9:38 PM, Richard Vézina ml.richa...@gmail.comwrote: It surely a missing feature... Richard On Mon, Jul 4, 2011 at 8:30 PM, Luis Goncalves lu...@vision.caltech.eduwrote: Thanks for the links!! Django dynamic formsets seems powerful! When I first started off, I investigated using django, but found it very difficult. Web2py is so much easier to use (especially with the clear manual, and one click install with working apps ('Welcome'))!!! Maybe I'll end up contributing a friendly dynamic form creator for web2py ... merci, Luis. On Mon, Jul 4, 2011 at 4:54 PM, Richard Vézina ml.richa...@gmail.comwrote: Maybe you could find some inspiration from this project for Django : http://code.google.com/p/django-dynamic-formset/ You need to install Django to test it... What you seems to do is adding an arbitrary number of input for a given field... Following good database design pratice you will normalise your schema... I had try to find a solution similar to django dynamic formset, but I give up in the pass. You have this thread that could maybe bring some answer : http://groups.google.com/group/web2py/browse_thread/thread/50af0d67554c94d9/ad553c6a5514ecc7?pli=1 Web2py let you do this : http://www.web2py.com/book/default/chapter/07?search=filter#One-form-for-multiple-tables But you can't have fields with the same name in your table... Finally it maybe possible with component now to load a arbitrary number of fields inputs for a given table and with jQuery submit the differents forms as one I would investigate in that direction too... Good luck Richard On Mon, Jul 4, 2011 at 7:17 PM, Luis Goncalves lgonc...@gmail.comwrote: Hello Richard! I looked at this, but wasn't sure how it could help -- what I need is a way for a (non-technical) admin to create profile forms with arbitrary fields (through a friendly web interface), and then users to be able to view and edit their (run-time reconfigurable) profiles. At any rate, the method I described above seems to work quite well, thanks to web2py's versatility, allowing me to define forms programmatically (excerpt below). I was wondering if there was a more clever/efficient/proper way to do so. Perhaps not! Thanks!! Luis. for field in event_fields: # see if person has a pre-defined value found = False for my_efield in me.event_field: if my_efield.display_title == field.display_title: found = True break if found: if field.data_type == 'string': new_input = INPUT(_type = field.data_type, _name = field.id, requires=IS_NOT_EMPTY(), _value=my_efield.data ) form[0].insert(-2, TR(field.display_title+':', new_input )) elif field.data_type == 'text': . else: if field.data_type == 'string': new_input = INPUT(_type = field.data_type, _name = field.id, requires=IS_NOT_EMPTY()) form[0].insert(-2, TR(field.display_title+':', new_input )) elif field.data_type == 'text': -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
Re: [web2py] Added filtering in autocomplete
i'm seeing the online demo, exacltly in which part of the code is the autocomplete with filtering stuff? I;d like to use that On Mon, Jul 4, 2011 at 5:25 PM, Alfonso de la Guarda alfons...@gmail.com wrote: Hi, Because SISVENTI, i have made some minor changes to the autocomplete widget adding filtering, is possible add to the main branch? https://bitbucket.org/alfonsodg/sisventi/ Thanks, Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4
Re: [web2py] Added filtering in autocomplete
Hello, When you search a product, by example, you can filter warehouse items or sales items (in the db, both are differents with the genero (genere) flag in mode 1 or 2) Try: http://ictec.biz:8000/sisventi/almacen/kardex And http://ictec.biz:8000/sisventi/ventas/totales_productos Just put (by example) betun , you will see that both autocomplete widgets display different data (filter by genere) Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 09:59, Nicolas Palumbo napalu...@gmail.com wrote: i'm seeing the online demo, exacltly in which part of the code is the autocomplete with filtering stuff? I;d like to use that On Mon, Jul 4, 2011 at 5:25 PM, Alfonso de la Guarda alfons...@gmail.com wrote: Hi, Because SISVENTI, i have made some minor changes to the autocomplete widget adding filtering, is possible add to the main branch? https://bitbucket.org/alfonsodg/sisventi/ Thanks, Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4
Re: [web2py] Added filtering in autocomplete
How do you log in -- is there a demo account (doesn't appear to be any way to register)? Note, some of use have had problems getting the autocomplete widget to work in IE. Anthony On Tuesday, July 5, 2011 11:07:39 AM UTC-4, Alfonso de la Guarda wrote: Hello, When you search a product, by example, you can filter warehouse items or sales items (in the db, both are differents with the genero (genere) flag in mode 1 or 2) Try: http://ictec.biz:8000/sisventi/almacen/kardex And http://ictec.biz:8000/sisventi/ventas/totales_productos Just put (by example) betun , you will see that both autocomplete widgets display different data (filter by genere) Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 09:59, Nicolas Palumbo napa...@gmail.com wrote: i'm seeing the online demo, exacltly in which part of the code is the autocomplete with filtering stuff? I;d like to use that On Mon, Jul 4, 2011 at 5:25 PM, Alfonso de la Guarda alfo...@gmail.com wrote: Hi, Because SISVENTI, i have made some minor changes to the autocomplete widget adding filtering, is possible add to the main branch? https://bitbucket.org/alfonsodg/sisventi/ Thanks, Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4
[web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)
Do we have a method to upload plugins in web2pyslices? If not, I will extend web2py.com/plugins it is becoming hard for me to keep track On Jul 5, 4:53 am, Bruno Rocha rochacbr...@gmail.com wrote: HI, I just finished the refactoring for PFWizard plugin, major bug fixes (thanks everyone testing and reporting) *# NOTES* - It works only wih web2py 1.97+ - It works only for SQLFORM based forms, you have to pass a db.table - It does not works for Crud() , does not allows editing or delete yet (can you contribute?) - It receives any arg that SQLFORM receives *# FIXES* - Fixed Issue #2 - Now it works with tables which has '_' or '__' in fieldnames. - Fixed Issue #1 - Now it works with Python 2.6 - removed enumerate() - Ommit fields - Fixed issue, now you cam ommit fields with no break in validation (client and server side) - Code cleanup, PEP8 checkups # But I really does not matter about it :P *# FEATURES* - Added form.auto_validation method Now you don t need to always write if form.accepts()elif form.errors. Just use in this way: form = PowerFormWizard(db, steps) form.auto_validate() return dict(form=form) or # define flash message form.auto_validate(messages=['Yeah it works', 'Ops, error']) or #execute a function after validation def myfunction(success, x,y,z): #first argument receives True or False form.auto_validate(flash=my_function, args=[x, y, z]) DEMO DOWNLOAD :http://labs.blouweb.com/powerformwizard REPO:https://bitbucket.org/rochacbruno/powerformwizard *# Whats next?* working on a new plugin for the 'Power' family, it is a JSON based tableless grid (which is much more than a grid) hope to release with examples, by the end of the week, preview -http://labs.blouweb.com/PowerGrid Need help, contribution, test.. []'s -- Bruno Rocha [ About me:http://zerp.ly/rochacbruno]
Re: [web2py] Added filtering in autocomplete
Hello, The demo account is explained here: https://bitbucket.org/alfonsodg/sisventi/wiki/onlinedemo Only adds filtering to the existing widget provided for web2py (using jquery), i am not really a windows explorer user (only use Beos/Linux from 1999) with the mozilla or chrome browsers (and before that the Mosaic for Amiga)... then i can't help with that Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 10:19, Anthony abasta...@gmail.com wrote: How do you log in -- is there a demo account (doesn't appear to be any way to register)? Note, some of use have had problems getting the autocomplete widget to work in IE. Anthony On Tuesday, July 5, 2011 11:07:39 AM UTC-4, Alfonso de la Guarda wrote: Hello, When you search a product, by example, you can filter warehouse items or sales items (in the db, both are differents with the genero (genere) flag in mode 1 or 2) Try: http://ictec.biz:8000/**sisventi/almacen/kardexhttp://ictec.biz:8000/sisventi/almacen/kardex And http://ictec.biz:8000/**sisventi/ventas/totales_**productoshttp://ictec.biz:8000/sisventi/ventas/totales_productos Just put (by example) betun , you will see that both autocomplete widgets display different data (filter by genere) Saludos, --**-- Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 09:59, Nicolas Palumbo napa...@gmail.com wrote: i'm seeing the online demo, exacltly in which part of the code is the autocomplete with filtering stuff? I;d like to use that On Mon, Jul 4, 2011 at 5:25 PM, Alfonso de la Guarda alfo...@gmail.com wrote: Hi, Because SISVENTI, i have made some minor changes to the autocomplete widget adding filtering, is possible add to the main branch? https://bitbucket.org/**alfonsodg/sisventi/https://bitbucket.org/alfonsodg/sisventi/ Thanks, Saludos, --**-- Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4
[web2py] Re: estore
Also take a look at this: https://bitbucket.org/alfonsodg/sisventi On Jul 5, 7:53 am, Chris May chrisma...@gmail.com wrote: I sure hope so... The only thing I have been looking to is Massimo's brief tutorial on credit card paymentshttp://groups.google.com/group/web2py/msg/00df672fe3d67aab On Jul 5, 4:48 am, apple simo...@gmail.com wrote: Is this no longer maintained? It does not seem to be available to dowload. Are there any other examples of web2py ecommerce sites?
[web2py] Re: Why using 'statusbar' for menu zone?
I do not understand the question On Jul 5, 2:25 am, chinakr chin...@gmail.com wrote: Why not using 'menu' or some others? Is there any reason?
Re: [web2py] PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)
Hello, Nice... i will add to SISVENTI for the composition lists.. works with autocomplete? Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 04:53, Bruno Rocha rochacbr...@gmail.com wrote: HI, I just finished the refactoring for PFWizard plugin, major bug fixes (thanks everyone testing and reporting) *# NOTES* - It works only wih web2py 1.97+ - It works only for SQLFORM based forms, you have to pass a db.table - It does not works for Crud() , does not allows editing or delete yet (can you contribute?) - It receives any arg that SQLFORM receives *# FIXES* - Fixed Issue #2 - Now it works with tables which has '_' or '__' in fieldnames. - Fixed Issue #1 - Now it works with Python 2.6 - removed enumerate() - Ommit fields - Fixed issue, now you cam ommit fields with no break in validation (client and server side) - Code cleanup, PEP8 checkups # But I really does not matter about it :P *# FEATURES* - Added form.auto_validation method Now you don t need to always write if form.accepts()elif form.errors. Just use in this way: form = PowerFormWizard(db, steps) form.auto_validate() return dict(form=form) or # define flash message form.auto_validate(messages=['Yeah it works', 'Ops, error']) or #execute a function after validation def myfunction(success, x,y,z): #first argument receives True or False form.auto_validate(flash=my_function, args=[x, y, z]) DEMO DOWNLOAD : http://labs.blouweb.com/powerformwizard REPO:https://bitbucket.org/rochacbruno/powerformwizard *# Whats next?* working on a new plugin for the 'Power' family, it is a JSON based tableless grid (which is much more than a grid) hope to release with examples, by the end of the week, preview - http://labs.blouweb.com/PowerGrid Need help, contribution, test.. []'s -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]
[web2py] Re: trailling space on crud.update form for field string type that is part of sql standard seems not logic
I do not think this is a web2py issue. You are defining a table manually and the database is doing padding of the fields. It is not web2py's doing, it is the database. You can make custom web2py validators that remove the spaces in forms when data is extracted but it is not always obvious you want to remove straining spaces when data comes from database. On Jul 5, 9:20 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok, I found the problem... It does not seems to come from web2py... It happens with Postgres as backend when the not using web2py to create the database schema. Look at this example : Web2py model : db.define_table('table1', Field('field1','string',length=25), Field('field2','string',length=50)) Give this Postgres table : CREATE TABLE table1 ( id serial NOT NULL, field1 character varying(25), field2 character varying(50), CONSTRAINT table1_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE table1 OWNER TO richard; If you define this table like I did like this : -- Table: table1 -- DROP TABLE table1; CREATE TABLE table1 ( id serial NOT NULL, field1 character(25), field2 character(50), CONSTRAINT table1_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE table1 OWNER TO richard; You will get trailling space to occure in web2py form... I attach little app. So it not exactly a web2py issue. But maybe it could be wise to prevent this to happen... Richard On Tue, Jul 5, 2011 at 2:30 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please provide an example. Massimo On Jul 4, 2:55 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, Is Web2py suppose to follow SQL standard on trailling space for string type field on crud.update?? If I update a record containing field with string type, I got trailling space restored from the database in my field form... On submit it cause problem since I transform to int() for validation purpose... Why is crud.update restore trailing space? Does it liked to be like that or it is just a mistake or something Could it breaks anything to change this behavior? Richard web2py.app.trainling_space.w2p 167KViewDownload
Re: [web2py] Re: trailling space on crud.update form for field string type that is part of sql standard seems not logic
No problem... As you say since I change the model definition by hand and it's coming from the database... it is not a web2py issue. Thank to taking care. Richard On Tue, Jul 5, 2011 at 11:31 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I do not think this is a web2py issue. You are defining a table manually and the database is doing padding of the fields. It is not web2py's doing, it is the database. You can make custom web2py validators that remove the spaces in forms when data is extracted but it is not always obvious you want to remove straining spaces when data comes from database. On Jul 5, 9:20 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok, I found the problem... It does not seems to come from web2py... It happens with Postgres as backend when the not using web2py to create the database schema. Look at this example : Web2py model : db.define_table('table1', Field('field1','string',length=25), Field('field2','string',length=50)) Give this Postgres table : CREATE TABLE table1 ( id serial NOT NULL, field1 character varying(25), field2 character varying(50), CONSTRAINT table1_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE table1 OWNER TO richard; If you define this table like I did like this : -- Table: table1 -- DROP TABLE table1; CREATE TABLE table1 ( id serial NOT NULL, field1 character(25), field2 character(50), CONSTRAINT table1_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE table1 OWNER TO richard; You will get trailling space to occure in web2py form... I attach little app. So it not exactly a web2py issue. But maybe it could be wise to prevent this to happen... Richard On Tue, Jul 5, 2011 at 2:30 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please provide an example. Massimo On Jul 4, 2:55 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, Is Web2py suppose to follow SQL standard on trailling space for string type field on crud.update?? If I update a record containing field with string type, I got trailling space restored from the database in my field form... On submit it cause problem since I transform to int() for validation purpose... Why is crud.update restore trailing space? Does it liked to be like that or it is just a mistake or something Could it breaks anything to change this behavior? Richard web2py.app.trainling_space.w2p 167KViewDownload
Re: [web2py] Insert One to many related tables in GAE
GAE will always choose the ID for you (at least with web2py dal, custom GAE keys are not implemented). You could maybe add an extra field to the province table to store your internal id and use the for lookup when loading the second table. or if you are doing the load back to back, create a dict in memcache that maps your ID to the google ID and do the lookup as you write the city rows.
[web2py] json call
I have this code, in the initial view shows the elements of the table service with a json call, i want whenever insert a new element in the form of form.html view (the view form.html is a popup window) re-make the json call and refresh the initial view, i tried several variations and all have failed me, anyone have a similar example??? or any idea??? db.define_table('service', Field('name')) controller.py def index(): return dict() def form(): form=FORM(INPUT(_name='name',requires=IS_NOT_EMPTY()),INPUT(_type='submit')) if form.accepts(request.vars, session): db.service.insert(name = form.vars.name) return dict(form=form) @service.json def hello(): l = [] for row in db(db.service.id 0).select(): l.append(row.name) return l //--- index.html.. {{extend 'layout.html'}} label class='link' style='color:green'+/label div id='target' /div script jQuery('.link').click(function(){popup({{=URL(r=request, f='form')}})}); jQuery.getJSON({{=URL(r=request,f='call',args=['json','hello'])}}, function(msg){ jQuery.each(msg, function(){ jQuery(#target).append(this + br /); } ) } ); /script form.html {{extend 'layout.html'}} {{=form}
[web2py] Re: URGENT: help needed with Auth and Facebook data
http://www.web2pyslices.com/slices/take_slice/77 see the update from 2010-May-04. The code has not been tested against the latest versions of web2py and may do things in outdated/less efficient ways, but it has worked in the past. at least perhaps you can see how to implement a custom authentication method, extending the default auth class.
Re: [web2py] Insert One to many related tables in GAE
2011/7/5 howesc how...@umich.edu: GAE will always choose the ID for you (at least with web2py dal, custom GAE keys are not implemented). You could maybe add an extra field to the province table to store your internal id and use the for lookup when loading the second table. That's the method I used finally. Thanks. or if you are doing the load back to back, create a dict in memcache that maps your ID to the google ID and do the lookup as you write the city rows.
[web2py] Re: estore
There are no downloads listed at this link. On Jul 5, 5:28 pm, pbreit pbreitenb...@gmail.com wrote: The estore is dated but seems to work:https://code.google.com/p/web2py-estore/ The sisventi thing is a total mess. 100+ tables and very little web2py code. I was not able to get much working.
[web2py] Re: estore
Apple, When dealing with Google Code, it is expected that you use Mercurial to get the code rather than waiting on the author to provide a direct download link. You should use: hg clone https://web2py-estore.googlecode.com/hg/ web2py-estore Or if you just want to browse the code: https://code.google.com/p/web2py-estore/source/browse/
[web2py] Re: estore
The estore is dated but seems to work: https://code.google.com/p/web2py-estore/ The sisventi thing is a total mess. 100+ tables and very little web2py code. I was not able to get much working.
Re: [web2py] Temporary changing default values of a Form
This doesn't seem to work with auth() forms: form = auth.register() form.vars.email = 'l...@vision.caltech.edu' return dict(form=form) doesn't show the predefined value for 'email' in a view that renders {{=form}} Does anybody know why? Thanks!! Luis.
[web2py] cron Too many open files regression?
I'm getting the following stack trace in my console after leaving my app running overnight. We use cron for several tasks. I saw the below thread, which indicated that the issue has been resolved: http://groups.google.com/group/web2py/browse_thread/thread/e788b0783e8fc758/6a210abb2898763d?lnk=raot Has there been a regression? Here's the stack trace. Thanks! Traceback (most recent call last): File /usr/local/lib/python2.7/threading.py, line 552, in __bootstrap_inner self.run() File /root/web2py/gluon/newcron.py, line 63, in run s.run() File /usr/local/lib/python2.7/sched.py, line 117, in run File /root/web2py/gluon/newcron.py, line 55, in launch crondance(self.path, 'hard', startup = False) File /root/web2py/gluon/newcron.py, line 234, in crondance cronmaster = token.acquire(startup=startup) File /root/web2py/gluon/newcron.py, line 101, in acquire self.master = open(self.path,'rb+') IOError: [Errno 24] Too many open files: '/root/web2py/applications/ admin/cron/cron.master'
[web2py] Re: Temporary changing default values of a Form
Can you explain the logic? Are you trying to override whatever emails is typed in by the user on registration? On Jul 5, 12:08 pm, Luis Goncalves lgoncal...@gmail.com wrote: This doesn't seem to work with auth() forms: form = auth.register() form.vars.email = 'l...@vision.caltech.edu' return dict(form=form) doesn't show the predefined value for 'email' in a view that renders {{=form}} Does anybody know why? Thanks!! Luis.
Re: [web2py] Temporary changing default values of a Form
I'm not sure you can pre-populate a registration form that way. form.vars.email has to be set after the form is created but before form.accepts is called -- however, auth.register() creates the form and calls form.accepts. Instead, you can pre-populate by manipulating the form DOM directly: form.element(_name='email').update(_value='lu...@vision.caltech.edu') Anthony On Tuesday, July 5, 2011 1:08:31 PM UTC-4, Luis Goncalves wrote: This doesn't seem to work with auth() forms: form = auth.register() form.vars.email = 'lu...@vision.caltech.edu' return dict(form=form) doesn't show the predefined value for 'email' in a view that renders {{=form}} Does anybody know why? Thanks!! Luis.
Re: [web2py] Re: Temporary changing default values of a Form
Yes, I am trying to create an 'invitation' only registration, where the person receives an email with a link (and identifying token), and on my website I use the token to pre-populate the registration form, so that the user only has to pick his password. thx, Luis. On Tue, Jul 5, 2011 at 10:20 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Can you explain the logic? Are you trying to override whatever emails is typed in by the user on registration? On Jul 5, 12:08 pm, Luis Goncalves lgoncal...@gmail.com wrote: This doesn't seem to work with auth() forms: form = auth.register() form.vars.email = 'l...@vision.caltech.edu' return dict(form=form) doesn't show the predefined value for 'email' in a view that renders {{=form}} Does anybody know why? Thanks!! Luis.
Re: [web2py] Re: estore
pbreit, SISVENTI has 10 years and a lot of tables because is a BIG system (including production, logistics, distribution), was develop for Dunkin Donuts in Peru... but the POS module only requires some tables (filled in the demo) The target is not the e-commerce if not presencial o remote sales Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 On Tue, Jul 5, 2011 at 11:28, pbreit pbreitenb...@gmail.com wrote: The estore is dated but seems to work: https://code.google.com/p/web2py-estore/ The sisventi thing is a total mess. 100+ tables and very little web2py code. I was not able to get much working.
Re: [web2py] Temporary changing default values of a Form
That worked great!!! Thanks so much, Anthony!!! L. On Tue, Jul 5, 2011 at 10:23 AM, Anthony abasta...@gmail.com wrote: I'm not sure you can pre-populate a registration form that way. form.vars.email has to be set after the form is created but before form.accepts is called -- however, auth.register() creates the form and calls form.accepts. Instead, you can pre-populate by manipulating the form DOM directly: form.element(_name='email').update(_value='lu...@vision.caltech.edu') Anthony On Tuesday, July 5, 2011 1:08:31 PM UTC-4, Luis Goncalves wrote: This doesn't seem to work with auth() forms: form = auth.register() form.vars.email = 'lu...@vision.caltech.edu' return dict(form=form) doesn't show the predefined value for 'email' in a view that renders {{=form}} Does anybody know why? Thanks!! Luis.
[web2py] Re: cron Too many open files regression?
Are you starting a lot of cron tasks that do not terminate before the next one starts? I suggest you use a background process and do not use cron. To my knowledge there is no bug but cron become unpredictable if jobs take too long. Massimo On Jul 5, 10:34 am, John Duddy jdu...@gmail.com wrote: I'm getting the following stack trace in my console after leaving my app running overnight. We use cron for several tasks. I saw the below thread, which indicated that the issue has been resolved: http://groups.google.com/group/web2py/browse_thread/thread/e788b0783e... Has there been a regression? Here's the stack trace. Thanks! Traceback (most recent call last): File /usr/local/lib/python2.7/threading.py, line 552, in __bootstrap_inner self.run() File /root/web2py/gluon/newcron.py, line 63, in run s.run() File /usr/local/lib/python2.7/sched.py, line 117, in run File /root/web2py/gluon/newcron.py, line 55, in launch crondance(self.path, 'hard', startup = False) File /root/web2py/gluon/newcron.py, line 234, in crondance cronmaster = token.acquire(startup=startup) File /root/web2py/gluon/newcron.py, line 101, in acquire self.master = open(self.path,'rb+') IOError: [Errno 24] Too many open files: '/root/web2py/applications/ admin/cron/cron.master'
Re: [web2py] Re: cron Too many open files regression?
I am seeing lots of processes (20 or so) backing up, yet as far as I can tell, they are not doing anything. I'll add some tracing to see if they are actually processing, but slowly. On Tue, Jul 5, 2011 at 12:32 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you starting a lot of cron tasks that do not terminate before the next one starts? I suggest you use a background process and do not use cron. To my knowledge there is no bug but cron become unpredictable if jobs take too long. Massimo On Jul 5, 10:34 am, John Duddy jdu...@gmail.com wrote: I'm getting the following stack trace in my console after leaving my app running overnight. We use cron for several tasks. I saw the below thread, which indicated that the issue has been resolved: http://groups.google.com/group/web2py/browse_thread/thread/e788b0783e... Has there been a regression? Here's the stack trace. Thanks! Traceback (most recent call last): File /usr/local/lib/python2.7/threading.py, line 552, in __bootstrap_inner self.run() File /root/web2py/gluon/newcron.py, line 63, in run s.run() File /usr/local/lib/python2.7/sched.py, line 117, in run File /root/web2py/gluon/newcron.py, line 55, in launch crondance(self.path, 'hard', startup = False) File /root/web2py/gluon/newcron.py, line 234, in crondance cronmaster = token.acquire(startup=startup) File /root/web2py/gluon/newcron.py, line 101, in acquire self.master = open(self.path,'rb+') IOError: [Errno 24] Too many open files: '/root/web2py/applications/ admin/cron/cron.master' -- John Duddy jdu...@gmail.com
[web2py] Re: Call functions periodically from WEB2PY at short time basis (like 0.05 ... 5 seconds)
I do not know if it is pertinent with the topic, but uWSGI has tons of (cheap, very cheap compared with solutions like celery) facilities to allow this sort of tasks: http://projects.unbit.it/uwsgi/wiki/Decorators I have uwsgi-0.9.7.1 installed is it compatible with uwsgi decorators?
Aw: Re: [web2py] Re: estore
You can use estore for simple shop systems. But it is very basic, you will have to implement the payment systems by yourself. It is not suited for bigger ecommerce sites. Marco
[web2py] Auth Tables not exposed in AppAdmin
Hi. N00b and presumably doing something stupid. Picked the below up from the book and dropped into my own model file in my own Application. All good except the auth tables aren't exposed in Appadmin. This is a problem at the moment because I'm playing around with authentication to see what it does and have set up some usernames I want to clear out. The Welcome App is still in there, and auth tables are exposed in there. Presumably, I'm missing some setting which I require when I define an alternative auth table, but having gone through the book, its not clear to me what that is. Also, if there is a simple spec of objects (methods, attributes etc) somewhere could someone point me at it? Thanks. # after # auth = Auth(globals(),db) db.define_table( auth.settings.table_user_name, Field('first_name', length=128, default=''), Field('last_name', length=128, default=''), Field('locality', 'string', length=20, requires=IS_IN_SET(['East','North Central','South'])), Field('manager', 'string', length=30, requires=IS_IN_SET(['Ruth Gilpin','Marie Malferiol-Force','Jeannie Osmond','Ruth Staples'])), Field('email', length=128, default='', unique=True), Field('password', 'password', length=512, readable=False, label='Password'), Field('registration_key', length=512, writable=False, readable=False, default=''), Field('reset_password_key', length=512, writable=False, readable=False, default=''), Field('registration_id', length=512, writable=False, readable=False, default='')) custom_auth_table = db[auth.settings.table_user_name] # get the custom_auth_table custom_auth_table.first_name.requires = \ IS_NOT_EMPTY(error_message=auth.messages.is_empty) custom_auth_table.last_name.requires = \ IS_NOT_EMPTY(error_message=auth.messages.is_empty) custom_auth_table.password.requires = [IS_STRONG(), CRYPT()] custom_auth_table.email.requires = [ IS_EMAIL(error_message=auth.messages.invalid_email), IS_NOT_IN_DB(db, custom_auth_table.email)] auth.settings.table_user = custom_auth_table # tell auth to use custom_auth_table # before # auth.define_tables()
[web2py] Re: Auth Tables not exposed in AppAdmin
If you don't need to customize the auth_user table, I would suggest not including this code and just using Web2py's default auth_user table which works fine for most applications. If you are going to customize auth_user table with that code, you need to uncomment: auth = Auth(db) and auth.define_tables()
[web2py] PowerTable question?
Not sure if this is the right place to ask questions about PowerTable, but I have 3. 1. Where to find the documentation, can't seem to locate it at http://powertable.blouweb.com/ 2. I want to enable clicking on a row to navigate to a URL containing the record key field. Can't seem to find where to put the JS to do so 3. I want to have my table taller than the default and have set the default number of rows to display at one time to 20. Again, not sure if this is the right place to ask for help. Just hoping to find some answers. -Jim
[web2py] Re: Auth Tables not exposed in AppAdmin
Exactly where is auth being defined -- is it in /app/models/db.py, or is it in a subfolder of /app/models? Note, if you're using the current version of web2py, you no longer need to pass globals() to auth, so just do auth=Auth(db). Also, for API details, see http://web2py.com/book/default/chapter/04#API and http://www.web2py.com/examples/static/epydoc/index.html. Anthony On Tuesday, July 5, 2011 4:58:57 PM UTC-4, beedge wrote: Hi. N00b and presumably doing something stupid. Picked the below up from the book and dropped into my own model file in my own Application. All good except the auth tables aren't exposed in Appadmin. This is a problem at the moment because I'm playing around with authentication to see what it does and have set up some usernames I want to clear out. The Welcome App is still in there, and auth tables are exposed in there. Presumably, I'm missing some setting which I require when I define an alternative auth table, but having gone through the book, its not clear to me what that is. Also, if there is a simple spec of objects (methods, attributes etc) somewhere could someone point me at it? Thanks. # after # auth = Auth(globals(),db) db.define_table( auth.settings.table_user_name, Field('first_name', length=128, default=''), Field('last_name', length=128, default=''), Field('locality', 'string', length=20, requires=IS_IN_SET(['East','North Central','South'])), Field('manager', 'string', length=30, requires=IS_IN_SET(['Ruth Gilpin','Marie Malferiol-Force','Jeannie Osmond','Ruth Staples'])), Field('email', length=128, default='', unique=True), Field('password', 'password', length=512, readable=False, label='Password'), Field('registration_key', length=512, writable=False, readable=False, default=''), Field('reset_password_key', length=512, writable=False, readable=False, default=''), Field('registration_id', length=512, writable=False, readable=False, default='')) custom_auth_table = db[auth.settings.table_user_name] # get the custom_auth_table custom_auth_table.first_name.requires = \ IS_NOT_EMPTY(error_message=auth.messages.is_empty) custom_auth_table.last_name.requires = \ IS_NOT_EMPTY(error_message=auth.messages.is_empty) custom_auth_table.password.requires = [IS_STRONG(), CRYPT()] custom_auth_table.email.requires = [ IS_EMAIL(error_message=auth.messages.invalid_email), IS_NOT_IN_DB(db, custom_auth_table.email)] auth.settings.table_user = custom_auth_table # tell auth to use custom_auth_table # before # auth.define_tables()
[web2py] Re: Auth Tables not exposed in AppAdmin
Also, for API details, see http://web2py.com/book/default/chapter/04#API and http://www.web2py.com/examples/static/epydoc/index.html. And, of course, there's always the source code: http://code.google.com/p/web2py/source/browse/
[web2py] Re: talks
Damn, will be up there weekend of the 16th. Anyone in the L.A. area btw who is involved with socal-piggies? Mike
[web2py] Re: OffTopic Google+
I am interested, but not anxious to add to my social load at the moment. What are your impressions? Mike
Re: [web2py] Re: cron Too many open files regression?
I have dug further, and it is definitely a cron issue. I have 3 cron tasks firing every minute, and they always completed in under 1 second. But every so often, the process lauched by web2py would seem to hang - it never executed my code (first line was logging, not executed for that process). These processes never exit. lsof shows the normal cacaphony of open files, lots of stuff under python2.7, a few shared libs pipes, cron.master, and a deleted file in / tmp. http://tmp.cd Any ideas on how to track this down? On Tue, Jul 5, 2011 at 12:47 PM, John Duddy jdu...@gmail.com wrote: I am seeing lots of processes (20 or so) backing up, yet as far as I can tell, they are not doing anything. I'll add some tracing to see if they are actually processing, but slowly. On Tue, Jul 5, 2011 at 12:32 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you starting a lot of cron tasks that do not terminate before the next one starts? I suggest you use a background process and do not use cron. To my knowledge there is no bug but cron become unpredictable if jobs take too long. Massimo On Jul 5, 10:34 am, John Duddy jdu...@gmail.com wrote: I'm getting the following stack trace in my console after leaving my app running overnight. We use cron for several tasks. I saw the below thread, which indicated that the issue has been resolved: http://groups.google.com/group/web2py/browse_thread/thread/e788b0783e. .. Has there been a regression? Here's the stack trace. Thanks! Traceback (most recent call last): File /usr/local/lib/python2.7/threading.py, line 552, in __bootstrap_inner self.run() File /root/web2py/gluon/newcron.py, line 63, in run s.run() File /usr/local/lib/python2.7/sched.py, line 117, in run File /root/web2py/gluon/newcron.py, line 55, in launch crondance(self.path, 'hard', startup = False) File /root/web2py/gluon/newcron.py, line 234, in crondance cronmaster = token.acquire(startup=startup) File /root/web2py/gluon/newcron.py, line 101, in acquire self.master = open(self.path,'rb+') IOError: [Errno 24] Too many open files: '/root/web2py/applications/ admin/cron/cron.master' -- John Duddy jdu...@gmail.com -- John Duddy jdu...@gmail.com
[web2py] Re: Error on LOAD() in trunk
00 Preface - whilst always maintaining backward compatibility Please, return previous ajax=False functionality (with passing current request to all LOAD(ajax=False) functions). It's a really important feature for component development. I have 2 sites broken because of it. =\ Massimo, I agree with LightOfMooN. I have a lot of apps for differents customers I wrote 1 year ago, when I started learning web2py. All apps have been working correctly from 1 year ago. These last days, I have been reported by various customers about a lot of broken webapps. I have to dedicate next days to review all these webs to patch , which I barely remember how I did. So, this unexpected compatibility change, also it's an unexpected mail from an old customer. It should have an adaptation period when changes could breaking old apps, or an alternative option for these cases.
[web2py] Re: Error on LOAD() in trunk
On Tuesday, July 5, 2011 8:38:07 PM UTC-4, GoldenTiger wrote: These last days, I have been reported by various customers about a lot of broken webapps. I have to dedicate next days to review all these webs to patch , which I barely remember how I did. So, this unexpected compatibility change, also it's an unexpected mail from an old customer. What is the compatibility change? Is it the fact that the 'vars' argument to LOAD is no longer ignored (and instead replaced with request.vars) when ajax=False? Or is there something else that has changed? Anthony
Re: [web2py] Re: Call functions periodically from WEB2PY at short time basis (like 0.05 ... 5 seconds)
I do not know if it is pertinent with the topic, but uWSGI has tons of (cheap, very cheap compared with solutions like celery) facilities to allow this sort of tasks: http://projects.unbit.it/uwsgi/wiki/Decorators I have uwsgi-0.9.7.1 installed is it compatible with uwsgi decorators? Hardo to say. 0.9.7 branch is now obsolete, and a lot of fix has been added to signal framework in 0.9.8. If you want to manage timer reliably you should use the latest tip (it is really the 0.9.8.2 release, i am only waiting for a last patch before release) -- Roberto De Ioris http://unbit.it
Re: [web2py] Temporary changing default values of a Form
One more question: How do I make the pre-populated elements of the form appear read-only (so that they cannot be altered)? I've tried in the view: {{=form.custom.begin}} divFirst name: {{=predef.fname}}/div divLast name: {{=predef.lname}}/div divEmail: {{=predef.email}}/div divPassword: {{=form.custom.widget.password}}/div divVerify password: {{=form.custom.widget.password_two}}/div {{=form.custom.submit}} {{=form.custom.end}} but then the elements for which I don't use the widget (to avoid being edited), seem not to be passed with the submit ( the auth.register method did not accept the form as complete ) is there some way to set an element of a form to be read-only? Thanks again! Luis.
[web2py] Re: Error on LOAD() in trunk
I referred to generic views by default, like http://web2py.com/examples/simple_examples/hello6 and discussed recently here Invalid view in 1.97.1: https://groups.google.com/group/web2py/browse_thread/thread/c3a14f5ee0997e2a/3b6898c0e70e8dd2 I agree the security issue, in fact I have thought so since ever, but in my opinion, It has not been taken on mind some cases affected by this change On 6 jul, 03:09, Anthony abasta...@gmail.com wrote: On Tuesday, July 5, 2011 8:38:07 PM UTC-4, GoldenTiger wrote: These last days, I have been reported by various customers about a lot of broken webapps. I have to dedicate next days to review all these webs to patch , which I barely remember how I did. So, this unexpected compatibility change, also it's an unexpected mail from an old customer. What is the compatibility change? Is it the fact that the 'vars' argument to LOAD is no longer ignored (and instead replaced with request.vars) when ajax=False? Or is there something else that has changed? Anthony
[web2py] Query construction question
I have the following models. I am storing memos in table *memo_store*, and user_views in *viewed_memos*. Each user can have multiple views for each memo. Every time they look at a memo, I store a new entry in* viewed_memos*. My question is: *How can I construct a query which will display all unread memos from a particular user?* I was hoping to do it in a single-step query, however, I am struggling. *Table Definitions:* db.define_table ('memo_store', Field ('created_by', db.auth_user, default = auth.user_id, readable = False, writable = False), Field ('created_on', 'datetime', default = request.now, writable = False, readable = False), Field ('memo', 'upload', uploadfolder = os.path.join (request.folder, 'memo_uploads'), ondelete = 'NO ACTION', uploadseparate = True,), Field ('file_name', 'string', readable = False, writable = False), Field ('author', 'string'), Field ('department', 'string', requires = IS_IN_SET (department_list)), Field ('memo_title', 'string'), Field ('memo_note', 'text'), Field ('tags', 'list: string'), ) db.define_table ('viewed_memos', Field ('created_by', db.auth_user, default = auth.user_id, readable = False, writable = False), Field ('created_on', 'datetime', default = request.now, writable = False, readable = False), Field ('memo', db.memo_store), Field ('my_tags', 'list: string'), )