[web2py] Re: problem with migrating a sqlite db

2010-03-26 Thread Peter Etchells
Thanks for taking the time to look at this problem. len(dx.executesql('SELECT * from fields')) gave 43815, ie the correct answer. I finally realized it was because the anki application for some reason had a negative id about 1/3 of the records. I was just using the default query dx.fields.id

[web2py] How to best design a date/geographic proximity query on GAE?

2010-03-26 Thread Dane
Hi all, I'm building a directory for ultimate frisbee tournaments on GAE with a Flex front end. The user selects a location, a radius, and a maximum date. I have a basic version of this query implemented, but it's inefficient and slow. One way I know I can improve it is by condensing the many

[web2py] Re: wsgi won't load modules

2010-03-26 Thread Ian Reinhart Geiser
I just copied the applications folder from my test machine to the apache server. I checked and the welcome and admin apps work. It just seems the imports from modules don't work. I have them installed in the following tree: applications/vmanager applications/vmanager/modules

[web2py] Re: Ajax and Auth API

2010-03-26 Thread Yannick
Thanks Massimo, Yes it's working now... Thousand thanks... BUT I still don't know how I can have more control on the display of each field: Like it's possible to load each field and display them as I want ? - And I also wanted to know how to catch the error messages so I can display them like I

[web2py] my problem with datatables jq

2010-03-26 Thread Kuba Kucharski
Hi in datatables datetime is displayed like this: 2010-03-26 13... by default so i cannot see minutes and seconds How to change this behaviour? I have this problem with appadmin but also when using sortable table plugin I tried setting bAutoWidth but either it doesn't work or I do smth wrong

[web2py] Re: feature request - database record locking

2010-03-26 Thread mdipierro
It is incomplete but good enough. On Mar 26, 12:58 am, szimszon szims...@gmail.com wrote: In sort I'll test it. off   I'm somewhat lost in plugin threads :( Is the plugin system stable now? Are there any complete documentation about it in current state? /off On márc. 26, 03:04, mdipierro

[web2py] Re: Ajax and Auth API

2010-03-26 Thread mdipierro
You just need a view for register.html that does not extend layout and contains a custom form. On Mar 26, 6:49 am, Yannick ytchatch...@gmail.com wrote: Thanks Massimo, Yes it's working now... Thousand thanks... BUT I still don't know how I can have more control on the display of each field:

[web2py] Re: disabling https/local host restriction for admin?

2010-03-26 Thread mdipierro
yes, comment the checks at the top of applications/admin/models/ access.py On Mar 26, 8:00 am, Philip philip.el...@gmail.com wrote: Is it possible to disable the https/localhost restriction for admin and make it accessible by http? I recognize the security issues with doing so, but I have an

[web2py] Re: my problem with datatables jq

2010-03-26 Thread mdipierro
The proper way is use internationalization db.table.field.requires=IS_DATE(format=T('%Y-%m-%d')) On Mar 26, 8:02 am, Kuba Kucharski kuba.kuchar...@gmail.com wrote: Hi in datatables datetime is displayed like this: 2010-03-26 13... by default so i cannot see minutes and seconds How

Re: [web2py] Re: my problem with datatables jq

2010-03-26 Thread Kuba Kucharski
I mean your example for month/year/day seems fine but there is a problem with time -- Kuba -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email

[web2py] Re: feature request - database record locking

2010-03-26 Thread szimszon
Seems to work. Thank you! Anyway I think in long term it would be better to have such feature integrated in core web2py. On márc. 26, 03:04, mdipierro mdipie...@cs.depaul.edu wrote: No... that  did not work. This does: http://web2py.com/plugins/default/locking On Mar 25, 5:20 pm, Massimo

[web2py] Re: MySQL server has gone away

2010-03-26 Thread David Zejda
Thanks. The workaround works, even when keeping the pool. :) D. try:     db=DAL(mysql://a:b...@localhost/c, pool_size=5) except:     db=DAL(mysql://a:b...@localhost/c, pool_size=5) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to

[web2py] Re: feature request - database record locking

2010-03-26 Thread szimszon
And what if: - there is no ajax - the controller do the locking with controllable expiration - form validation checks if there is a proper lock for the record - if not invalidate the submit - if there is a lock then update/delete/... the record and release the lock it could be done with crud

[web2py] pass arguments to a function used by cache

2010-03-26 Thread David Zejda
Hello :) I'd like to do something like this: def load_chapter(book, chapter): args = ('Alice', 3) a = cache.ram('%s_%s' % args, load_chapter, arguments=args, time_expire=50) where the cache would execute load_chapter('Alice', 3) if necessary. Any advices, please? Regards, David --

[web2py] response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
In my dft controller I have: response.headers['web2py-component- command']='''jQuery('.DB').click(function(e) { $(e.target).removeClass('click2loadTables'); } )''' response.headers['web2py-component-command'] is correctly set to: jQuery('.DB').click(function(e) {\n $

[web2py] cache language files

2010-03-26 Thread David Zejda
Hi, is it true, that languages.py reads language files per request (using read_dict)? If so, is it be possible to cache the loaded languages somehow? Thanks! David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send

[web2py] Re: first attempt to use mysql web2py = unknown field type: INTEGER

2010-03-26 Thread mdipierro
Something is wrong in your model For example SQLField(employee_password, VARCHAR, length=128,default=None)) should be Field(employee_password, password, length=128,default=None)) field types are listed here: http://web2py.com/book/default/section/6/4 If you have 'INTEGER' it should

[web2py] Re: cache language files

2010-03-26 Thread mdipierro
Unfortunately it is true. I can change this. It is in my todo list. Massimo On Mar 26, 11:06 am, David Zejda d...@atlas.cz wrote: Hi, is it true, that languages.py reads language files per request (using read_dict)? If so, is it be possible to cache the loaded languages somehow? Thanks!

[web2py] Re: pass arguments to a function used by cache

2010-03-26 Thread mdipierro
a=cache.ram('%s_%s' % args,lambda args=args: load_chapter(*args),time_expire=50) On Mar 26, 10:44 am, David Zejda d...@atlas.cz wrote: Hello :) I'd like to do something like this: def load_chapter(book, chapter):     args = ('Alice', 3) a = cache.ram('%s_%s' % args, load_chapter,

[web2py] Re: cache language files

2010-03-26 Thread mdipierro
I changed this in trunk. The language files are now cached but please check that I did not not break them. Massimo On Mar 26, 11:06 am, David Zejda d...@atlas.cz wrote: Hi, is it true, that languages.py reads language files per request (using read_dict)? If so, is it be possible to cache

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
But works fine when typed like this: response.headers['web2py-component- command']='''jQuery('.DB').click(function(e) { $(e.target).removeClass('click2loadTables');} )''' Any ideas?. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
I was just getting there, since I tried adding some comments to the code which only made it worse. Good to know. Thanks. On Mar 26, 3:24 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes. response.headers cannot be multi-line. Massimo On 26 Mar, 14:15, DenesL denes1...@yahoo.ca wrote: But

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
Ended up moving the code into a SCRIPT tag as part of the response. This is in reply to a web2py LOAD. Any objections to doing this?. On Mar 26, 3:35 pm, DenesL denes1...@yahoo.ca wrote: I was just getting there, since I tried adding some comments to the code which only made it worse. Good to

[web2py] Re: download URL for existing folder structure

2010-03-26 Thread mdipierro
say you have db.define_table('myfile',Field('path')) you can create an action like: def serve_myfile(): import os file_id=request.args(0) row=db.myfile[file_id] root_path = '/path/to/root/of/paths/' return

[web2py] sqlite development

2010-03-26 Thread Yarko Tymciurak
I recently had a need to quickly look at sqlite data tables (not a web2py app) - and was rather pleased with this tcl/tk written tool: http://sqlitestudio.one.pl/ I will try using this for a while to monitor data during development / debugging cycles. Maybe you'll find it useful too.

[web2py] plotkit realtime

2010-03-26 Thread Kuba Kucharski
I need to draw charts realtime I do: $(#plot).load('http://127.0.0.1:8001/monitoring/default/plotme2', '', call2back); in plotme2 I have: =PLOT(.. Which is javascript HELPER from Massimo's appliance I am loading the site with js code but javascipt is not getting executed - so I don't get to

[web2py] Re: sqlite development

2010-03-26 Thread Hillman
This is another great tool: https://addons.mozilla.org/en-US/firefox/addon/5817 A Firefox extension for managing Sqlite databases. On Mar 26, 2:50 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: I recently had a need to quickly look at sqlite data tables (not a web2py app) - and was

[web2py] Re: plotkit realtime

2010-03-26 Thread mdipierro
I think this is browser dependent. You cannot do it. I would use a iframe instead of {{=LOAD}} On 26 Mar, 15:58, Kuba Kucharski kuba.kuchar...@gmail.com wrote: I need to draw charts realtime I do: $(#plot).load('http://127.0.0.1:8001/monitoring/default/plotme2', '', call2back); in plotme2

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
The code is actually larger than the given example. I guess I could minify it. Are you sure this is browser dependent?. On Mar 26, 4:31 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think this is browser dependent. I am not sure scrips in pages loaded via ajax are always executed. That is why

[web2py] Re: sqlite development

2010-03-26 Thread Yarko Tymciurak
On Mar 26, 4:00 pm, Hillman hillma...@gmail.com wrote: This is another great tool:https://addons.mozilla.org/en-US/firefox/addon/5817 A Firefox extension for managing Sqlite databases. Oh! Nice; and a browser plugin - yes, I like it; THanks for sharing! ;-) On Mar 26, 2:50 pm, Yarko

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread mdipierro
I a not sure. I know I tried once and it did not work (firefox). I could not find specs anywhere about this. On 26 Mar, 16:11, DenesL denes1...@yahoo.ca wrote: The code is actually larger than the given example. I guess I could minify it. Are you sure this is browser dependent?. On Mar 26,

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread mdipierro
more here: http://www.webdeveloper.com/forum/showthread.php?t=138830 On 26 Mar, 16:11, DenesL denes1...@yahoo.ca wrote: The code is actually larger than the given example. I guess I could minify it. Are you sure this is browser dependent?. On Mar 26, 4:31 pm, mdipierro

[web2py] Passing values to widgets

2010-03-26 Thread Avik Basu
Is there a way to pass arguments to a field's widget from the controller? For example: db.define_table(food, Field(name, string')) db.define_table(units, Field(food_id, db.food), Field(name, string) ) db.define_table(ate, Field(food_id, db.food), Field(quantity, double),

[web2py] Query by list of ids on GAE

2010-03-26 Thread Dane
Can this be done through the DAL? I see there is a get() method on google.appengine.ext.db that can take multiple keys, but that syntax confuses me. -Dane -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py] Re: response.headers web2py-component-command is being cut short

2010-03-26 Thread DenesL
On Mar 26, 4:53 pm, mdipierro mdipie...@cs.depaul.edu wrote: I a not sure. I know I tried once and it did not work (firefox). It did work for me with Firefox 3.6.2 on Win. I could not find specs anywhere about this. Can anybody expand our limited knowledge on the subject?. Or propose

[web2py] Re: Passing values to widgets

2010-03-26 Thread DenesL
It depends on what specifically you are trying to accomplish. You could set the validator instead, for example: rr=db(db.food.name.like('m%')).select() db.ate.food_id.requires=IS_IN_SET([(r.id,r.name) for r in rr]) Denes On Mar 26, 6:26 pm, Avik Basu avikb...@gmail.com wrote: Is there a

[web2py] Re: Query by list of ids on GAE

2010-03-26 Thread mdipierro
Not through the dal but if you find out how to do it using GAE API, post an example here and we can look into implementing it. Massimo On 26 Mar, 18:31, Dane dane.schnei...@gmail.com wrote: Can this be done through the DAL? I see there is a get() method on google.appengine.ext.db that can take

[web2py] Re: Passing values to widgets

2010-03-26 Thread mdipierro
in the controller you can do db.table.field.widget = SomeWidgetConstructor(args) Not sure if this is what you are asking. On 26 Mar, 18:26, Avik Basu avikb...@gmail.com wrote: Is there a way to pass arguments to a field's widget from the controller?  For example: db.define_table(food,

[web2py] Re: gaema

2010-03-26 Thread Pepe
oh yes, that would be great! On Mar 21, 11:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: Perhaps we could simplify some code and include this in auth. http://code.google.com/p/gaema/ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post

[web2py] webserver slow, misreported

2010-03-26 Thread Michael Toomim
I'm using web2py+rocket to serve jobs on mechanical turk. The server probably gets a hit per second or so by workers on mechanical turk using it. When I have no users, everything is fast. But in active use, I notice that web pages often load reay slow in my web browser, but the httpserver.log

[web2py] Re: webserver slow, misreported

2010-03-26 Thread Michael Toomim
Actually it's handling about 5 requests per second, so there is def some concurrency. On Mar 26, 10:06 pm, Michael Toomim too...@gmail.com wrote: I'm using web2py+rocket to serve jobs on mechanical turk. The server probably gets a hit per second or so by workers on mechanical turk using it.