[web2py] Re: request.env.http_host[-5]

2010-09-01 Thread annet
Bruno and Massimo, Thanks for your explanations, now that I understand the syntax I will be able to use this in my controller. Kind regards, Annet.

[web2py] Re: manipulating form elements

2010-09-01 Thread annet
Hi David, I customized my forms like this: > {{form.element('input',_name='name')['_size']=50}} However, after some time I found myself repeating this to often, so I moved the customization to a .css file: #no_table_name {width: 72px;} or #table_field {width:72px;} Kind regards, Annet.

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread berubejd
Here are the answers to your questions in my case: - I am using 1.83.2 on Windows. - The DB in this test is sqlite. - I am using a custom auth but 2 of the 3 instances of the problem (another db table file was removed since I posted earlier today) occurred in non-auth tables. - I am not using

[web2py] Re: lazyT objects behave like str

2010-09-01 Thread Dominic
Oh - sorry, I thought Fran had named it already. A butterfly issue: our CRUD update/create calls use to put T()'d messages into session.flash. When web2py tries to restore such sessions, this fails silently and creates a new session, which appears to the user as a sudden logout. The issue is tha

[web2py] Re: Model with many to many defined across multiple database instances

2010-09-01 Thread ron_m
> > Commenting out the following lines shows servers as a drop down list > on the insert site_servers form, leaving the line active causes the > servers line to be a text input field. > > # Test for uniqueness across site_id and server_id > db.site_servers.server_id.requires = IS_NOT_IN_DB(db > > (

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread mdipierro
Can you also try the nightly build from the download page? On Sep 1, 11:07 pm, mdipierro wrote: > before we work on a fix. Let me understand what is causing this. What > version are you upgrading from? > > massimo > > On Sep 1, 6:07 pm, berubejd wrote: > > > This has happened to me twice in the

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread mdipierro
... and what db are you using, sqlite? do you use a custom auth table? do you use notnull=True in any of your tables? Massimo On Sep 1, 11:07 pm, mdipierro wrote: > before we work on a fix. Let me understand what is causing this. What > version are you upgrading from? > > massimo > > On Sep 1, 6

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread mdipierro
before we work on a fix. Let me understand what is causing this. What version are you upgrading from? massimo On Sep 1, 6:07 pm, berubejd wrote: > This has happened to me twice in the last week on two different > tables.  I have started backing up the table files so that I can > restore them.  I

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread berubejd
This has happened to me twice in the last week on two different tables. I have started backing up the table files so that I can restore them. I will try to use fake_migrate next time. Is there any way to avoid having this happen in the first place? Thanks! Jeff On Sep 1, 10:55 am, mdipierro w

[web2py] Re: lazyT objects behave like str

2010-09-01 Thread mdipierro
I was not ware of this. Not sure this is quite the same problem and I do not understand the proposed fix. On Sep 1, 5:59 pm, Dominic wrote: > We had an issue with that change in lazyT, > seehttp://eden.sahanafoundation.org/ticket/621 > > I wonder ifhttp://bazaar.launchpad.net/~mdipierro/web2py/d

[web2py] Re: resize image validator using PIL

2010-09-01 Thread mdipierro
not 100% thread safe but ok in most of the cases. On Sep 1, 5:57 pm, Jose wrote: > What I did was the following: > 1) upload image > 2) resize the image on the server > > if form.accepts(request.vars, session): >         import os >         import my_module_resize > >         id = form.vars.id >

[web2py] Re: rewrite.py patch

2010-09-01 Thread mart
k, thanks for that! :) On Sep 1, 8:24 pm, Jonathan Lundell wrote: > On Sep 1, 2010, at 5:14 PM, mart wrote: > > > > > just a quick question: is this related to the 1.84 build issue on Mac > > os with python 2.7? > > Not exactly, I don't think. That was fixed, afaik, by the default logger > patc

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread vince
since it's the auth's table i do not know how to do fake_migrate. however it seems to be file locking seems. after auth.define_tables(migrate=False), the error seems to be gone. On Sep 2, 1:55 am, mdipierro wrote: > yes. db.define_table(...,fake_migrate=True) > > On Sep 1, 12:11 pm, vince wro

Re: [web2py] Re: rewrite.py patch

2010-09-01 Thread Jonathan Lundell
On Sep 1, 2010, at 5:14 PM, mart wrote: > > just a quick question: is this related to the 1.84 build issue on Mac > os with python 2.7? Not exactly, I don't think. That was fixed, afaik, by the default logger patch. This is a bug in app-specific routing that we don't have a solution to yet. No

[web2py] Re: rewrite.py patch

2010-09-01 Thread mart
just a quick question: is this related to the 1.84 build issue on Mac os with python 2.7? thanks, Mart :) On Aug 31, 9:08 pm, Jonathan Lundell wrote: > One more change to rewrite.py. > > http://web.me.com/jlundell/filechute/rewrite.zip > > I took out the custom logging logic, which was confusing

[web2py] lazyT objects behave like str

2010-09-01 Thread Dominic
We had an issue with that change in lazyT, see http://eden.sahanafoundation.org/ticket/621 I wonder if http://bazaar.launchpad.net/~mdipierro/web2py/devel/revision/2242 fixes the problem, and if yes - wouldn't the patch as suggested in the ticket not have been easier (and cleaner)? Best regards,

[web2py] Re: resize image validator using PIL

2010-09-01 Thread Jose
What I did was the following: 1) upload image 2) resize the image on the server if form.accepts(request.vars, session): import os import my_module_resize id = form.vars.id row= mytable[id] path = os.path.join(os.getcwd(), 'applications', 'myapp', 'uploads',

[web2py] Re: manipulating form elements

2010-09-01 Thread david.waldrop
You think right :-) Thanks. On Sep 1, 5:26 pm, mdipierro wrote: > I think > > {{form.element('input',_name='name')['_size']=50}} > > On Sep 1, 4:14 pm, "david.waldrop" wrote: > > > > > I am trying to customize a form by explicitly specifying the length of > > the namefield : > > > {{form.elemen

[web2py] Re: manipulating form elements

2010-09-01 Thread mdipierro
I think {{form.element('input',_name='name')['_size']=50}} On Sep 1, 4:14 pm, "david.waldrop" wrote: > I am trying to customize a form by explicitly specifying the length of > the namefield : > > {{form.element('input',name='name')['_size']=50}} > {{=form.custom.begin}} > >         {{=form.cust

[web2py] Re: gae memcace clear?

2010-09-01 Thread mdipierro
no. sorry On Sep 1, 3:49 pm, Jurgis Pralgauskis wrote: > Hello, > > inhttp://www.web2py.com/book/default/chapter/04book says > > The time_expire can be set to 0 to force a cache refresh and to None > to prevent the content from ever expiring. > You can clear one or more cache variables with > cac

[web2py] Re: resize image validator using PIL

2010-09-01 Thread mdipierro
This is a bit more complex than it seems because upload expects a ci.FieldStorage object so the validator __call__ should return a cgi.FieldStoarge. On Sep 1, 3:50 pm, kachna wrote: > Hi, > I am trying to write validator to resize my image before storing in DB > field. > > class RESIZE_IMG(object

[web2py] manipulating form elements

2010-09-01 Thread david.waldrop
I am trying to customize a form by explicitly specifying the length of the namefield : {{form.element('input',name='name')['_size']=50}} {{=form.custom.begin}} {{=form.custom.widget.name}} ... This does not seem to work. I have tried putting the statement changing the size both inside

[web2py] Re: have you used web2py for teaching?

2010-09-01 Thread mdipierro
Last call. Please respond to this thread if you do. Do not assume that you know you are teaching. I have very short memory. Massimo On Aug 29, 7:54 pm, mdipierro wrote: > If you use or have used web2py for teaching please let me know. > > The deadline for SIGCSE 2011 papers is next week. I am th

[web2py] Re: have you used web2py for teaching?

2010-09-01 Thread mdipierro
Hi Jurgis, please email me more details about the school, the course, etc. On Aug 30, 9:26 am, Jurgis Pralgauskis wrote: > I haven't, but I am going to do it this year. > > one moment, which I remember from learning myself (PHP in earlier > days), > is that with web2py templates there is very

[web2py] gae memcace clear?

2010-09-01 Thread Jurgis Pralgauskis
Hello, in http://www.web2py.com/book/default/chapter/04 book says The time_expire can be set to 0 to force a cache refresh and to None to prevent the content from ever expiring. You can clear one or more cache variables with cache.ram.clear(regex='...') does this apply to gae memcache? if memca

[web2py] resize image validator using PIL

2010-09-01 Thread kachna
Hi, I am trying to write validator to resize my image before storing in DB field. class RESIZE_IMG(object): def __init__(self, isThumb=False, error_message='unresizable'): (self.isThumb, self.error_message) = (isThumb, error_message) def __call__(self, value):

[web2py] Re: plugin wiki

2010-09-01 Thread david.waldrop
I am using web2py Version 1.82.1 (2010-08-05 01:00:12) . Will look at cube2py. does it replace theplugin wiki? On Aug 31, 9:16 am, Bruno Rocha wrote: > What is your web2py version? > > did you try cloning cube2py?http://code.google.com/p/cube2py/ > > 2010/8/31 david.waldrop > > > > > > > after

[web2py] Re: plugin wiki

2010-09-01 Thread mart
sounds good :) found trailmix (internotes wasn't compatible with my firefox version)... was thinking smething a little more "web2py app-ish" in the sense that i would be able to parse/view routing history with maybe something where I could search by "stop-over" (a semantic approach ?) like: {{high

[web2py] Re: request.env.http_host[-5]

2010-09-01 Thread mdipierro
s='hello' for i in range(1,6): print s[-i] o l l e h On Sep 1, 12:31 pm, annet wrote: > What does the -5 stand for in this line of code: > > request.env.http_host[-5] > > Kind regards, > > Annet.

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread mdipierro
yes. db.define_table(...,fake_migrate=True) On Sep 1, 12:11 pm, vince wrote: > upgraded to 1.83.2, the application itself run fine just with this > error appearing in error log sometimes. > > is there any way to regenerate the db table file? > > Traceback (most recent call last): >   File "gluon/

[web2py] Typo in admin/cron/expire_sessions.py

2010-09-01 Thread Jim Meyer
Line 18 has a transposition typo: logging.wanr('failure to stat %s: %s' % (filename,e)) Should be .warn, I think. --j

Re: [web2py] request.env.http_host[-5]

2010-09-01 Thread Bruno Rocha
>>> http_host = '127.0.0.1' >>> http_host[-5] '0' 2010/9/1 annet > What does the -5 stand for in this line of code: > > request.env.http_host[-5] > > > Kind regards, > > Annet. -- http://rochacbruno.com.br

[web2py] request.env.http_host[-5]

2010-09-01 Thread annet
What does the -5 stand for in this line of code: request.env.http_host[-5] Kind regards, Annet.

Re: [web2py] Re: ANN: first pre-alfa release (v0.2) of Web2Py_CC

2010-09-01 Thread Stef Mientki
hi Chris, On 01-09-2010 04:21, sociotech wrote: > Stef, > > Thanks for developing what looks like an awesome environment for > web2py. > your welcome. > I tried installing it with your recommended dependencies on my Ubuntu > 10.04 system (Python 2.6) and got the following error: > > Traceback (mo

[web2py] upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread vince
upgraded to 1.83.2, the application itself run fine just with this error appearing in error log sometimes. is there any way to regenerate the db table file? Traceback (most recent call last): File "gluon/restricted.py", line 186, in restricted exec ccode in environment File "/home/web2py/

[web2py] upgraded to 1.83.2 with db table file appears corrupted

2010-09-01 Thread vince
upgraded to 1.83.2, the application itself run fine just with this error keeps appearing in error log. is there any way to regenerate the db table file? Traceback (most recent call last): File "gluon/restricted.py", line 186, in restricted exec ccode in environment File "/home/web2py/appl

[web2py] Re: How to manipulate a file uploaded to server using web2py framework

2010-09-01 Thread Carl
thanks for responding Martin I don't want to fight the framework and certainly prefer to adapt my approach to leverage a framework's advantages. I can get Pyjamas to submit to default/upload Do you know a) is this bit Web2py friendly? and b) if so, then what code I should be putting in upload()

[web2py] Re: How to manipulate a file uploaded to server using web2py framework

2010-09-01 Thread Martin.Mulone
In my point of view i don't recommend this approach for uploading images or files. You lost many good things of web2py in that area, file verification and in gae you are going to have problems. You can use an iframe for showing in another page. On Sep 1, 12:48 pm, Carl wrote: > I'm uploading a fi

[web2py] Re: js.call_function with arguments

2010-09-01 Thread mr.freeze
Something like this maybe?: def restaurants(): restaurant_id = ... event.listen('change',"input[name='timer']",timer_tick,args=restaurant_id) def timer_tick(): restaurant_id=request.args(0) last_updates = db(...) if last_updates: new_rows = [TR(update) for update in last

[web2py] How to manipulate a file uploaded to server using web2py framework

2010-09-01 Thread Carl
I'm uploading a file from a html form submitted from a page built by "pyjamas" pyjs.org Such files contain XML and I have a method on the server to parse the content of such files and generate rows in various tables. Such files are <1MB in size (probably ~50KB at most). What is a good approach to

[web2py] Re: view SQL query

2010-09-01 Thread Pai
+1 On Sep 1, 8:40 am, mdipierro wrote: > You cannot see all of them, You can see the last one > > print db._lastdb > > perhaps now that we have app logging capabilities we should add teh > ability to log all queries. > > On Sep 1, 6:24 am, Francisco Costa wrote: > > > How can I see the SQL queri

Re: [web2py] Re: plugin wiki

2010-09-01 Thread Bruno Rocha
I am using InterNote firefox extension ( https://addons.mozilla.org/en-US/firefox/addon/2011/) it is a "post-it" tool, which you can include notes to webpages, alows various notes per page, I am using a lot to remind things in web2py.com/book You just have to keep your own "backup" of the notes!

[web2py] Re: js.call_function with arguments

2010-09-01 Thread Francisco Costa
Any help? I'm becoming desperate for a solution that works :/ On Sep 1, 3:42 pm, Francisco Costa wrote: > this is at the the controller that loads the restaurant page > >     callback = js.call_function(timer_tick, args=restaurant_id) > > this is at the timer_tick > >     restaurant_id=request.ar

[web2py] Re: plugin wiki

2010-09-01 Thread mart
Thanks to the both of you ! :) I remember seeing that there was a video a while back but seemed it was taken offline (my bad, should have checked again). So again, thanks for both the video and and pointer to the doc location which will help (wasn't up to chapter 13 yet ;) but will be now). BTW Ma

[web2py] Re: dbio=False + autocomplete field = Error

2010-09-01 Thread Tito Garrido
nobody? On Mon, Aug 30, 2010 at 12:02 AM, Tito Garrido wrote: > Hi Folks, > > I'm trying to validade a form before sending it. There is a hidden field > and an autocomplete field on the form and there is what I get: > > > % repr(invalid_fieldnames) > SyntaxError: invalid field names: ['_autoc

Re: [web2py] Re: bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
On Sep 1, 2010, at 7:32 AM, mdipierro wrote: > > request.application is already there. Where is it used and the > appmname is not available? If request were always available, we could store the appropriate params link there as request.params. Here's an example (not, I think, the only one): str

[web2py] Re: problem list:string in GAE

2010-09-01 Thread Martin.Mulone
Thanks Massimo, now working right! On Sep 1, 10:58 am, mdipierro wrote: > Interesting the bug is because of an off feature of GAE (at least on > localhost). If two fields are type StringListProperty they must be two > different instances of the StringListProperty class else the two > fields are j

[web2py] Re: js.call_function with arguments

2010-09-01 Thread Francisco Costa
this is at the the controller that loads the restaurant page callback = js.call_function(timer_tick, args=restaurant_id) this is at the timer_tick restaurant_id=request.args(0) last_updates = db((db.reviews.event_id==restaurant_id)&(db.reviews.created_on>session.last_check)).select(o

[web2py] Re: js.call_function with arguments

2010-09-01 Thread Francisco Costa
My app has some restaurants. I have a restaurant for each page where you can comment or leave a review. I'm using timer_tick to query if there are newer reviews after you open the page every 10seconds. If there is, timer_tick returns those reviews. The problem I'm having is when I have 2 restaurant

Re: [web2py] Re: Upload with SQLFORM.factory

2010-09-01 Thread Andrew Buchan
Massimo, I fixed this by replacing "SQLFORM.factory" with the use of "SQLFORM" and "dbio = False", and it works fine. However, in case you thought it should behave differently I have copied my code below. The html generated by SQLFORM.factory gives the likes of id="no_table _Attachment", even tho

Re: [web2py] Re: plugin wiki

2010-09-01 Thread Bruno Rocha
plugin_wiki and cube2py has a list of widgets, there are "load_action" which made an ajax call to a Python function defined in the running app. per example, if you have an action in your controllers called 'list_names' in any page of plugin_wiki you can call this action using `` name: load_actio

[web2py] Re: bug in app-specific routing

2010-09-01 Thread mdipierro
request.application is already there. Where is it used and the appmname is not available? On Sep 1, 9:17 am, Jonathan Lundell wrote: > On Sep 1, 2010, at 7:01 AM, mdipierro wrote: > > > > > No we cannot. > > > rewrite.params[appname]? > > That structure exists, but where would appname come from

[web2py] Re: plugin wiki

2010-09-01 Thread mdipierro
http://vimeo.com/13485916 On Sep 1, 9:11 am, mart wrote: > since we have a cube2py thread... thought I'd ask my here... I read > somewhere that we could integrate with existing web2py applications > (or it may have been with T3?). SO, the question is how do you do > that? can we, for example embe

[web2py] Re: js.call_function with arguments

2010-09-01 Thread mr.freeze
The value that you return from timer_tick will be eval'd by default. What do you want to do with the value from your db query in the UI? On Sep 1, 9:17 am, Francisco Costa wrote: > please be more specific.. > > In timer_tick I do a db query, and I need to pass a value to succeed > on that query.

[web2py] Re: js.call_function with arguments

2010-09-01 Thread Francisco Costa
please be more specific.. In timer_tick I do a db query, and I need to pass a value to succeed on that query. I could save the value in the session.value, but that wouldn't work out when there are 2 pages open, that's why I want to pass it to timer_tick On Sep 1, 3:13 pm, "mr.freeze" wrote: > Y

Re: [web2py] Re: bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
On Sep 1, 2010, at 7:01 AM, mdipierro wrote: > > No we cannot. > > rewrite.params[appname]? That structure exists, but where would appname come from (in general)? I think that's the same problem. We could maybe stick it in request or response, but params is used a couple of places where that'

[web2py] Re: js.call_function with arguments

2010-09-01 Thread mr.freeze
You can't pass arguments to exposed functions. Use the method(s) I outlined instead: def timer_tick(): if request.vars.my_var_passed_in_data: I can be more specific if you tell me what you are trying to pass to timer_tick. On Sep 1, 8:57 am, Francisco Costa wrote: > But i want t

[web2py] Re: plugin wiki

2010-09-01 Thread mart
since we have a cube2py thread... thought I'd ask my here... I read somewhere that we could integrate with existing web2py applications (or it may have been with T3?). SO, the question is how do you do that? can we, for example embed an existing app within the cube2py body (as opposed to redirectin

[web2py] Re: bug in app-specific routing

2010-09-01 Thread mdipierro
No we cannot. rewrite.params[appname]? On Sep 1, 8:46 am, Jonathan Lundell wrote: > Massimo, it dawned on me (literally--I was lying in bed with the sun coming > up) that we can't use the global rewrite.params to store the app-specific > routing parameters because it's not thread-safe. Right?

[web2py] Re: very straaaaaaange

2010-09-01 Thread mdipierro
Just make sure you use trunk or latest stable, since XML was redefined recently. Massimo On Sep 1, 8:29 am, weheh wrote: > I suspect a db corruption. I will try to rebuild my db app from > scratch and test again, then report back.

[web2py] Re: problem list:string in GAE

2010-09-01 Thread mdipierro
Interesting the bug is because of an off feature of GAE (at least on localhost). If two fields are type StringListProperty they must be two different instances of the StringListProperty class else the two fields are just alias of each other. I did not see this documented anywhere. Massimo On Sep

[web2py] Re: js.call_function with arguments

2010-09-01 Thread Francisco Costa
But i want to pass a value to the function timer_tick something like this callback = js.call_function(timer_tick(arg)) but the function def timer_tick(arg): doesn't load properly On Sep 1, 2:02 pm, "mr.freeze" wrote: > If you're talking about the Client Tools module located > here...

[web2py] Re: problem list:string in GAE

2010-09-01 Thread mdipierro
There was a bug and I just fixed it in trunk. Also do not use posts = db(db.posts.id == 1).select() on GAE because ids are not sequential but random uuid. On Sep 1, 6:24 am, "Martin.Mulone" wrote: > * > /models/db.py > ** > > db.define_table('posts', > d

[web2py] Re: GAE: recipies to cope with long loading of pages?

2010-09-01 Thread Jurgis Pralgauskis
probably SOLVED: **cache view** seems to work ok :) it improved stats from 1354ms 1068cpu_ms 582api_cpu_ms to 310ms 310cpu_ms 77api_cpu_ms but if i cache just controller, which returns DIV(...) I get: PicklingError: Can't pickle : it's not found as gluon.html.__tag__ so I needed to: return

[web2py] Re: view SQL query

2010-09-01 Thread Francisco Costa
Yes, that would be very nice! On Sep 1, 2:40 pm, mdipierro wrote: > You cannot see all of them, You can see the last one > > print db._lastdb > > perhaps now that we have app logging capabilities we should add teh > ability to log all queries. > > On Sep 1, 6:24 am, Francisco Costa wrote: > > >

[web2py] bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
Massimo, it dawned on me (literally--I was lying in bed with the sun coming up) that we can't use the global rewrite.params to store the app-specific routing parameters because it's not thread-safe. Right? But I can't think of where we *could* keep that info, given the places that need to use i

[web2py] Re: view SQL query

2010-09-01 Thread mdipierro
You cannot see all of them, You can see the last one print db._lastdb perhaps now that we have app logging capabilities we should add teh ability to log all queries. On Sep 1, 6:24 am, Francisco Costa wrote: > How can I see the SQL queries made after loading a page?

[web2py] Re: view SQL query

2010-09-01 Thread Francisco Costa
I really need to see the SQL that this generate last_updates = db((db.event_social.created_on>session.verificado)&(db.event_social.event_id==this_event)).select(db.event_social.ALL,orderby=~db.event_social.created_on) On Sep 1, 12:24 pm, Francisco Costa wrote: > How can I see the SQL queries

[web2py] Re: Expoerting then importing isn't working...

2010-09-01 Thread mdipierro
It works but not via appadmin. If you want to import data from two tables which reference eahc other you must to: id_map={} db.table.import_from_csv_file(csvfile1,id_map=id_map) db.table.import_from_csv_file(csvfile2,id_map=id_map) passing the same id_map makes sures the relative references are

[web2py] Re: Upload with SQLFORM.factory

2010-09-01 Thread mdipierro
I need to see the code because I miss the logic. If a form is generate with SQLFORM.factory than there is table and no model and the uploaded file cannot go in the database becsause there isn't any connected to it. On Sep 1, 5:24 am, Andrew Buchan wrote: > Hello, > > I have two tables with 'file

[web2py] Re: 250+ users one application

2010-09-01 Thread mdipierro
Nothing obviously wrong with your model. Anyway, if we see we may be able to say more. On Sep 1, 1:55 am, annet wrote: > Last week someone asked me if I could build a web app for a node in a > network. Over the past couple of days I gave this question some > thought, and I came up with a design o

[web2py] Re: very straaaaaaange

2010-09-01 Thread weheh
I suspect a db corruption. I will try to rebuild my db app from scratch and test again, then report back.

[web2py] Re: js.call_function with arguments

2010-09-01 Thread mr.freeze
If you're talking about the Client Tools module located here... http://www.web2pyslices.com/main/slices/take_slice/8 ...there is an 'data' parameter in event.listen that you can use. It can be a jQuery selector (default is 'form:first') and will show up in request.vars. If you don't need to grab th

[web2py] js.call_function with arguments

2010-09-01 Thread Francisco Costa
i have this autorefresh form = SQLFORM.factory(Field('AutoUpdates', requires=IS_IN_SET(['On','Off']),default="On", widget=SQLFORM.widgets.radio.widget)) refresh.ready(jq("input[type='submit']").hide()()) callback = js.call_function(timer_tick) refresh.ready(js.timer(callback,1)

[web2py] view SQL query

2010-09-01 Thread Francisco Costa
How can I see the SQL queries made after loading a page?

[web2py] Re: problem list:string in GAE

2010-09-01 Thread Martin.Mulone
* /models/db.py ** db.define_table('posts', db.Field('id', 'id'), db.Field('keywords', 'list:string'), #tags db.Field('fulltext', 'list:string'), migrate=True) posts=db(db.posts.id>0).select() if not posts: db.posts.insert(keywords=['key1','key2','key3'],full

[web2py] Re: Expoerting then importing isn't working...

2010-09-01 Thread selecta
I encountered the same problem when copying auth_user auth_group auth_membership user and group went fine, even the ids are identical to those of the original db but copying auth_membership gives me undefine_record errors On Sep 1, 12:48 pm, Jason Brower wrote: > I have 3 tables to make a many t

[web2py] Expoerting then importing isn't working...

2010-09-01 Thread Jason Brower
I have 3 tables to make a many to many relationship. I can export the two. But the linking table for the many to many keeps giving me an error of "undefined record" meaning it's trying to reference to something that doesnt exist. These datbases are clean when I start. and I am doing a direct expor

[web2py] Upload with SQLFORM.factory

2010-09-01 Thread Andrew Buchan
Hello, I have two tables with 'file upload' fields. One is populated from a form generated with SQLFORM, and the other with SQLFORM.factory. The file uploads in the table populated by the SQLFORM.factory form cannot be downloaded, not even in appadmin, which generates hyperlinks like the one belo

[web2py] Re: problem list:string in GAE

2010-09-01 Thread Martin.Mulone
This is a writing mistake, Massimo please take a look to the application, i make it with keywords = ['keywords1','keywords2'] and the problem still there. On 1 sep, 00:21, mdipierro wrote: > there is an error right here: > > post.update_record(keywords = 'keywords1 keywords2') > > should be > >

[web2py] Re: handing a file upload submitted outside of web2py

2010-09-01 Thread Carl
found the answer here: http://groups.google.com/group/web2py/msg/f755a9d17eaeac26 the format is this: db.MYTABLE.insert(MYFIELD=db.MYTABLE.MYFIELD.store(request.vars.MYFORMFIELD.file,request.vars.MYFORMFIELD.filename)) one can of course insert any other fields using this insert function. On Au