[web2py] insert into web2py tablel with field indices

2012-04-29 Thread rahulserver
The insert function in web2py expects db.tablename.insert(...) with column name and value pairs. What if the table has lengthy field names and i wish to insert in the table by iterating through all the fields. I tried: for field in db[db.MyTable]: nme='\''+field.name+'\''

[web2py] Re: insert into web2py tablel with field indices

2012-04-29 Thread simon
You could do: for field in db.mytable: field.default=somevalue db.mytable.insert() However why would you want to do this? On Sunday, 29 April 2012 08:08:44 UTC+1, rahulserver wrote: > > The insert function in web2py expects db.tablename.insert(...) with column > name and value pairs. What

Re: [web2py] autodelete image computed field

2012-04-29 Thread CtrlSoft
on row delete works, but on row edit when i change row image or delete only image, image_thumb stil remains on disk

[web2py] Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Hi I am using this code to create a crude grid of images with links: {{for a in adverts:}} {{=A(IMG(_src=URL('static', 'images/ads/' + a.advert.thumbnail), _alt="My Logo"), _href=URL('default','index'))}} This renders as: Shows up fine in IE9 but doesnt in Firefox 10. If I go to the

Re: [web2py] Re: Reloading modules

2012-04-29 Thread Yarin
@Bruno- Thanks for confirming this issue @Anthony - Thoughts? On Saturday, April 28, 2012 4:31:09 PM UTC-4, rochacbruno wrote: > > I have a similar problem. > > example: > > if I change this modules under this package: > https://github.com/rochacbruno/Movuca/tree/master/modules/datamodel they >

Re: [web2py] Re: Reloading modules

2012-04-29 Thread Yarin
@Bruno- Thanks for confirming this issue @Anthony - Thoughts? >

[web2py] Re: insert into web2py tablel with field indices

2012-04-29 Thread Anthony
If you're using Python 2.7, you can use a dictionary comprehension: db.Account_Master.insert(**{f: 'somevalue' for f in db.MyTable.fields}) otherwise, a generator expression passed to dict: db.Account_Master.insert(**dict((f, 'somevalue') for f in db.MyTable.fields )) Anthony On Sunday, April

Re: [web2py] Re: Reloading modules

2012-04-29 Thread Yarin
Got to say this is scary- we're about to go into production with our first web2py app, and having erratic module behavior persist across server restarts is not something we signed up for. Please let's address this. On Sunday, April 29, 2012 9:12:55 AM UTC-4, Yarin wrote: > > @Bruno- Thanks for c

Re: [web2py] Re: Reloading modules

2012-04-29 Thread Anthony
> > @Bruno- Thanks for confirming this issue > @Anthony - Thoughts? > Not sure what's going on. Perhaps Massimo or Pierre (creator of custom importer) could weigh in. Anthony

[web2py] Re: SQLFORM

2012-04-29 Thread Anthony
What do you want to change? Generally you would handle styling via CSS. Anthony On Sunday, April 29, 2012 1:58:17 AM UTC-4, Vibhor Purandare wrote: > > HOW TO CHANGE STYLE OF SQLFORM(eg TEXT BOX Style) > I want to change text box style? >

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Anthony
What does Firefox show -- missing image icons? Do the links work? Side note -- is a.advert.thumbnail a recursive select? Note that they execute a separate query for each item, so if you're looping through a long list of adverts, yo

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Thanks for the reply. Oddly there is no missing image icon. The alt text seems to flash up then disappear. I thought there was some CSS or js weirdness going on but it makes no difference if I extend 'layout.html', ie use no CSS and js. Firebug gives a preview of the image in question so Firefox

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Anthony
Have you confirmed it's not related to any Firefox settings ( http://support.mozilla.org/en-US/kb/Images%20or%20animations%20do%20not%20show)? Can you pack and attach a minimal app that reproduces the problem? Anthony On Sunday, April 29, 2012 10:32:07 AM UTC-4, Simon Pickles wrote: > > Thanks

[web2py] sqlite int field that behave as string ?

2012-04-29 Thread Sebastian E. Ovide
Hi All, I have a field defined as integer but for some reason it is string In [34]: db.agreement.client_stars.type Out[34]: 'integer' In [35]: db(db.agreement.client_stars >10 ).select(db.agreement.client_stars).first() Out[35]: In [36]: db._lastsql Out[36]: 'SELECT agreement.client_star

Re: [web2py] Re: Emails never making it to hotmail accounts

2012-04-29 Thread Massimo Di Pierro
Than I was wrong and I do not know what the problem may be. On Sunday, 29 April 2012 00:53:50 UTC-5, Bruce Wade wrote: > > Domain youadworld.com sending address sys...@youadworld.com > > On Sat, Apr 28, 2012 at 9:34 PM, Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >> When you send it

Re: [web2py] Re: Reloading modules

2012-04-29 Thread Massimo Di Pierro
Let's clarify something web2py always uses the most comment models/controllers/views. web2py (as Python does) loads modules onces and keeps them in memory, even when modules are shipped with the app. The fact that from gluon.custom_import import track_changes; track_changes(True) overr

[web2py] web2py + leaflet

2012-04-29 Thread dancer`
Hello, I'm working on a project involving the Leaflet API along with OSM, and was wondering if there was any documentation on integrating this with web2py. If not, are there any other people working on the same thing? Thank you.

[web2py] Re: web2py + leaflet

2012-04-29 Thread Ashraf Mansour
Hi, Can i know the reason of avoiding google mape api v3 ?

[web2py] IOErrors

2012-04-29 Thread Bruce Wade
Hi, I am getting a lot of these errors: Traceback (most recent call last):\n File "/home/developer/bossteam_pro/projects/yaw/gluon/main.py", line 447, in wsgibase\nparse_get_post_vars(request, environ)\n File "/home/developer/bossteam_pro/projects/yaw/gluon/main.py", line 275, in parse_get_

[web2py] are 8 stickys really necessary at the top of this forum?

2012-04-29 Thread simon
Is it really necessary to have 8 stickies pinned to the top of this forum? It is particularly intrusive on a mobile taking up a whole screen! Have managed to filter it out on my laptop with an adblock filter: "*google.com##table[role="list"] tbody tr:nth-child(-n+8)"* This works but chops off

[web2py] Re: are 8 stickys really necessary at the top of this forum?

2012-04-29 Thread Ashraf Mansour
OR they can be aggregated in one sticky topic. >

Re: [web2py] Reading web2py tickets on app engine

2012-04-29 Thread David Phillips
Thank you, howesc and especially Ricardo. That code snippet worked. I can now see my tickets on app engine. On Tuesday, April 24, 2012 8:41:33 PM UTC-5, Ricardo Pedroso wrote: > > On Tue, Apr 24, 2012 at 12:57 AM, David Phillips > > wrote: > > I don't know how to read the tickets web2py generates

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-29 Thread Bill Barry
I am running web2py on Debian with nginx and the uwsgi-plugin-python package. My configuration is similar to yours, but uses mount instead of app python 127.0.0.1:9001 /=/home/www-data/web2py/wsgihandler.py Bill On Friday, April 27, 2012 1:16:07 AM UTC-7, rif wrote: > > I had the sa

[web2py] Re: are 8 stickys really necessary at the top of this forum?

2012-04-29 Thread Massimo Di Pierro
will do. On Sunday, 29 April 2012 14:06:19 UTC-5, Ashraf Mansour wrote: > > OR they can be aggregated in one sticky topic. > > >>

[web2py] request.intargs RFC

2012-04-29 Thread Massimo Di Pierro
I often run into this problem: def index(): record=db.tablename(request.args(0)) or redirect(URL('error')) which assumes request.args(0) is integer or missing. If not it issues a ticket. In trunk there is a new request.intargs which allows def index(): record=db.tablename(request.i

[web2py] Re: request.intargs RFC

2012-04-29 Thread Anthony
On Sunday, April 29, 2012 7:54:11 PM UTC-4, Massimo Di Pierro wrote: > > I often run into this problem: > > def index(): > record=db.tablename(request.args(0)) or redirect(URL('error')) > > which assumes request.args(0) is integer or missing. If not it issues a > ticket. > If request.args(

[web2py] Re: File generation using web2py

2012-04-29 Thread Brian M
Yep, I've got a processing app that spits out all sorts of csv files based on data gathered from multiple sources. Here's a little helper function I use def csv_export(records, column_names, fields, mode = 'dal'): """Export DAL result set, list of dicts or list of lists to CSV stream for re

Re: [web2py] Re: Emails never making it to hotmail accounts

2012-04-29 Thread tsvim
i just looked up your domain. You should setup DKIM and SPF records for your domain. Don't have the links to explanations handy, but basically those are two different technologies that allow you to authenticate the source of the mail thereby proving that a spammer didn't just set the from field

Re: [web2py] Re: File generation using web2py

2012-04-29 Thread RAHUL PRIYADARSI
Dear All, Thanks for your answers.But what I was looking for was,putting into simple words,implementing a use case similar to the following "The system maintains the data related to each transaction.Each transaction includes the list of items demanded per transaction with each item belonging to a c

[web2py] Re: are 8 stickys really necessary at the top of this forum?

2012-04-29 Thread Ashraf Mansour
Thank you... >>>

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Adblock plus. That was the issue. It intercepted the images and turned all the css to null. http://stackoverflow.com/questions/3558071/img-tag-greyed-out-in-firebug-hence-found-the-reason-for-image-not-showing-up Thanks for help, Antony

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Stefan Scholl
Simon Pickles wrote: > Thanks for the reply. Oddly there is no missing image icon. The > alt text seems to flash up then disappear. Don't try to load the whole page, just the image with its image URL. This way you could see if there is any error reported.