[web2py] Cleanup sessions

2010-03-27 Thread annet
I have just moved my application from the development environment to a production environment. I read the web2py manual and some posts in the group on the subject of cleaning up sessions, but I am not sure which is the best way to proceed. I am running version 1.76.5 of web2py. Kind regards,

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

2010-03-27 Thread Dane
Hooray, I can contribute something! It's just a matter of converting the ids to Key types with the Key.from_path method. google's db.get takes a list of Keys. import google.appengine.ext.db as gae get_from_gae(idlist): keys = [] for id in idlist:

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

2010-03-27 Thread Dane
Also the result objects use some sort of wrapper class, similar to the web2py row object. Properties are accessed by dot syntax. Id is accessed by result.key().id() On Mar 27, 5:31 am, Dane dane.schnei...@gmail.com wrote: Hooray, I can contribute something! It's just a matter of converting the

[web2py] problems using web2py ajax function

2010-03-27 Thread salbefe
Hello, With the following code: div class=container style=color:#ff;text-align:center; span onclick=ajax('show_month',[3],'test'){{=month_str}}/ span div id=test/div /div I get the following javascript error message: document.getElementById(s[i]) is null I do not why I'm getting

[web2py] Re: HTML tags in string

2010-03-27 Thread abiggs
Thanks, thats great. I've tried that and it has done something. Now the string appears as includingbr your in the page but is still includinglt;brgt; your in the source and so it still appears and doesn't break the line. Any other ideas or am I doing it wrong? Code from html page:

[web2py] Re: webserver slow, misreported

2010-03-27 Thread mdipierro
Mind that if you use sqlite there is no concurrency. Still these numbers are very low. Are your models very complex? On 27 Mar, 00:06, 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

[web2py] Re: cache language files

2010-03-27 Thread David Zejda
Thanks :) I'll report if I find any troubles... D. On Mar 26, 6:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I changed this in trunk. The language files are now cached but please check that I did not not break them. -- You received this message because you are subscribed to the Google

[web2py] Drop-down ticket

2010-03-27 Thread Johann Spies
The ticket: Traceback (most recent call last): File /home/js/web2py/gluon/restricted.py, line 173, in restricted exec ccode in environment File /home/js/web2py/applications/sadec/controllers/appadmin.py, line 418, in module File /home/js/web2py/gluon/globals.py, line 96, in lambda

[web2py] Re: Drop-down ticket

2010-03-27 Thread mr.freeze
I think it should be this: db.policy_documents.policy_id.requires = IS_IN_DB(db,db.policies_and_strategies.id, '% (name_of_policy_strategy)s') On Mar 27, 9:48 am, Johann Spies johann.sp...@gmail.com wrote: The ticket: Traceback (most recent call last):   File

[web2py] Re: Ajax and Auth API

2010-03-27 Thread Yannick
Hello Massimo, First thanks for you help... I'm stil not successful with customizing the form for Auth Api using Ajax. Please let me know what I'm doing wrong... Here is my view and controller (I did not extend Layout.html) # # Register.html ## html script

[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-03-27 Thread jep
Tito, I had the same problem, but after i copied the latest jquery.js file to the static/ folder of my application, it automatically closes (after 2 or 3 seconds). Closing should/should be a little faster to give it a more responsive feeling. (i am on linux / firefox 3.5.8) On Mar 16, 11:59 pm,

[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-03-27 Thread jep
Cool feature, Is it possible to use the value in input A as a limiting select for input B. eg. If your targets can belong to different groups and Borg2 is only in Group2, not Group1. If i select Group2 in my first input field in a form, then in field 2 of the form the autocomplete should only

[web2py] Re: Passing values to widgets

2010-03-27 Thread Avik Basu
So, for my example, I tried your suggestion. I defined a widget in models/widgets.py: def units_widget(field,value,food_id): ... and then in the controller, I set the widget with: db.ate.units.widget = units_widget(food_id) But here I am not passing field and value so I get an error. What

[web2py] Re: Passing values to widgets

2010-03-27 Thread mr.freeze
You need to make your widget a class so you can pass args to it in the constructor: class Units_Widget(object): def __init__(**args): def widget(f,v): #build your widget #using args return widget db.ate.units.widget = Units_Widget(food_id) On Mar 27,

[web2py] Re: Passing values to widgets

2010-03-27 Thread mr.freeze
Sorry, the constructor should be: def __init__(*args,**kargs): On Mar 27, 10:53 am, mr.freeze nat...@freezable.com wrote: You need to make your widget a class so you can pass args to it in the constructor: class Units_Widget(object):     def __init__(**args):         def widget(f,v):      

[web2py] JqGrid Plugin

2010-03-27 Thread parroit
Hi. I've developed a plugin to use JqGrid with inline editing and json updates. I've published some help at this page: http://app.ebansoftware.net, but I think it be more useful to publish it also on http://www.web2py.com/plugins. What is the correct procedure to publish the plugin on that site?

[web2py] global name 'cx_Oracle' is not defined

2010-03-27 Thread Jason Lotz
I am trying to connect to an established oracle database. Working in Windows I downloaded and installed cx_Oracle. In the Python Shell I am able to make a connection. db = DAL('oracle://user/passw...@tns') Traceback (most recent call last): File console, line 1, in module File

Re: [web2py] global name 'cx_Oracle' is not defined

2010-03-27 Thread Thadeus Burgess
I think that it means to run the source version of cx_oracle not the binary version. This would entail downloading the source of cx_Oracle and installing it into your python's site-packages. -Thadeus On Sat, Mar 27, 2010 at 10:51 AM, Jason Lotz jayl...@gmail.com wrote: I am trying to

Re: [web2py] Re: cache language files

2010-03-27 Thread Thadeus Burgess
If a language file gets updated, does the cache get cleared? How long is the cache for, is this editable? -Thadeus On Sat, Mar 27, 2010 at 9:13 AM, David Zejda d...@atlas.cz wrote: Thanks :) I'll report if I find any troubles... D. On Mar 26, 6:21 pm, mdipierro

Re: [web2py] global name 'cx_Oracle' is not defined

2010-03-27 Thread Jason Lotz
I have tried to build and install from source but I get another error. python setup.py build running build running build_ext building 'cx_Oracle' extension error: Unable to find vcvarsall.bat You said ...installing it into your python's site-packages.. I have only installed the cx_Oracle

[web2py] OperationalError 1054 Unknown column 'auth_user.reset_password_key' in 'field list'

2010-03-27 Thread drayco
Hi everyone. I have a application in a server production with web2py 1.72.3 and MySQL, and in this moment, I try to do some modifications in my localhost, but when I try to use with web2py 1.76.5 I got this error when I try to enter, Only in auth. I see that you did some changes in auth tables,

[web2py] Re: zengarden anybody?

2010-03-27 Thread Christopher Steel
The Zengarden css code is not open source but we can easily create our own. I am just finishing up a css based theme for a client that uses div's and flow with a two columns (basically the same appearance as the current web2py default layout). I would be more than happy to create on using the

[web2py] Re: problem with migrating a sqlite db

2010-03-27 Thread Yarko Tymciurak
On Mar 26, 3:46 am, Peter Etchells peter.a.etche...@gmail.com wrote: 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

[web2py] Re: Passing values to widgets

2010-03-27 Thread Avik Basu
I get the following error: TypeError: __init__() should return None, not 'function' I think the problem has to do with the following return statement in the constructor: return widget Avik On Mar 27, 11:57 am, mr.freeze nat...@freezable.com wrote: Sorry, the constructor should be: def

[web2py] Re: Passing values to widgets

2010-03-27 Thread Avik Basu
Also, if i wanted to extend SQLFORM.widgets.options.widget, how would i go about doing that? Is it as simple as replacing: class Units_Widget(object): with: class Units_Widget(SQLFORM.widgets.options.widget): Thanks, Avik On Mar 27, 5:03 pm, Avik Basu avikb...@gmail.com wrote: I get the

[web2py] Re: Passing values to widgets

2010-03-27 Thread mr.freeze
Sorry, low blood sugar. def units_widget(food_id): def widget(f,v): #build your widget #using food_id return widget db.ate.units.widget = units_widget(food_id) On Mar 27, 4:05 pm, Avik Basu avikb...@gmail.com wrote: Also, if i wanted to extend

[web2py] Re: Passing values to widgets

2010-03-27 Thread Avik Basu
That works perfectly. Thanks. Avik On Mar 27, 5:21 pm, mr.freeze nat...@freezable.com wrote: Sorry, low blood sugar. def units_widget(food_id):     def widget(f,v):        #build your widget        #using food_id     return widget db.ate.units.widget = units_widget(food_id) On Mar 27,

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

2010-03-27 Thread Ben W.
Thanks! I got this working, but it seems I can't use my existing databases due to a requirement that every table have a pre-existing id field which is primary. :( -Ben On Mar 26, 12:26 pm, mdipierro mdipie...@cs.depaul.edu wrote: Something is wrong in your model For example    

[web2py] new on web2pyslices: aggregate search

2010-03-27 Thread mr.freeze
In an effort to alleviate my own search frustrations, I have added a google powered search to web2pyslices.com that searches these sites: web2pyslices.com web2py.com (including the wiki) groups.google.com/group/web2py Hopefully it will help people find answers quickly. -Nathan -- You received

[web2py] Re: problems using web2py ajax function

2010-03-27 Thread mdipierro
Not sure what you mean by ajax('show_month',[3],'test') the second argument of ajax had to be a list of IDs if input fields. The values of those fields will be passed. On 27 Mar, 06:00, salbefe salb...@gmail.com wrote: Hello, With the following code: div class=container

[web2py] Re: Ajax and Auth API

2010-03-27 Thread mdipierro
IF, as I assume, the register action is called via the {{=LOAD('controller','register')}} helper THEN there should be no ajax handling in register.html. It should just be: {{=form.custom.begin}} Full Name: input class=string id=auth_user_fullname name=fullname type=text value= / Email: input

[web2py] Re: JqGrid Plugin

2010-03-27 Thread mdipierro
I will look at it asap. Thank you! Massimo On 27 Mar, 11:51, parroit andrea.par...@ebansoftware.net wrote: Hi. I've developed a plugin to use JqGrid with inline editing and json updates. I've published some help at this page:http://app.ebansoftware.net, but I think it be more useful to

[web2py] Re: cache language files

2010-03-27 Thread mdipierro
This is not using cache.ram. This is using the mechanism in gluon.cfs that was created to cache bytecode compiled code on GAE. Cache is cleared every time the translation file changes. On 27 Mar, 12:18, Thadeus Burgess thade...@thadeusb.com wrote: If a language file gets updated, does the cache

[web2py] Re: global name 'cx_Oracle' is not defined

2010-03-27 Thread mdipierro
I suggest you email the creators of cx_Oracle. You should not need to install it under web2py/site-packages. If it is normally installed under Python, web2py should be able t use it. On 27 Mar, 13:07, Jason Lotz jayl...@gmail.com wrote: I have tried to build and install from source but I get

[web2py] Re: OperationalError 1054 Unknown column 'auth_user.reset_password_key' in 'field list'

2010-03-27 Thread mdipierro
You have set migrate=False or you have a custom auth.user table. But web2py 1.75.6 requires a new field in auth_user Field('reset_password_key', length=512, writable=False, readable=False, default='', label=auth,.messages.label_reset_password_key), You either create

[web2py] Re: zengarden anybody?

2010-03-27 Thread mdipierro
I like the idea. It would be ideal if you could do it using ez.css and jquery.ui naming conventions. Massimo On 27 Mar, 15:23, Christopher Steel chris.st...@gmail.com wrote: The Zengarden css code is not open source but we can easily create our own. I am just finishing up a css based theme for

[web2py] Re: JqGrid Plugin

2010-03-27 Thread mdipierro
I looked at it and you did excellent work. I have one issue and one proposal. The issue is that plugin_editable_jqgrid.py exposes classes and methods that do not start with plugin_editable_jqgrid and that is a problem because can potentially conflict with other plugins. The proposal is that we

[web2py] Re: new on web2pyslices: aggregate search

2010-03-27 Thread mr.freeze
Also, if there are other sites that might be helpful to search, let me know. Feel free to visit any sponsored links too :) On Mar 27, 7:29 pm, mr.freeze nat...@freezable.com wrote: In an effort to alleviate my own search frustrations, I have added a google powered search to web2pyslices.com

[web2py] Re: googling web2py

2010-03-27 Thread Jason Lotz
From Japan I get ~107,000. -- Jay On Mar 28, 10:23 am, mdipierro mdipie...@cs.depaul.edu wrote: When you google web2py how may hits do you get? from which country? When I do it from the US I get ~106,000. The number has been steady for one year. Before that is was much higher ~600,000.

Re: [web2py] googling web2py

2010-03-27 Thread Wes James
Results 1 - 10 of about 712,000 - via Digis internet in Utah, USA. On Sat, Mar 27, 2010 at 7:23 PM, mdipierro mdipie...@cs.depaul.edu wrote: When you google web2py how may hits do you get? from which country? -- You received this message because you are subscribed to the Google Groups

[web2py] Re: new on web2pyslices: aggregate search

2010-03-27 Thread mdipierro
Nice I should add that to web2py.com too. On 27 Mar, 19:29, mr.freeze nat...@freezable.com wrote: In an effort to alleviate my own search frustrations, I have added a google powered search to web2pyslices.com that searches these sites: web2pyslices.com web2py.com (including the wiki)

[web2py] Re: googling web2py

2010-03-27 Thread mdipierro
this is odd. When I do http://www.google.co.jp/search?q=web2py 1 - 10 su circa 606.000 per web2p I guess this test is not significant. It does not just depend on the destination country, but also on the originating country and perhaps on who is doing the search. So far the number ranges from

[web2py] Re: googling web2py

2010-03-27 Thread mr.freeze
I was getting 108k in Texas but it jumped to 607k after clearing the browser cache. On Mar 27, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: this is odd. When I do http://www.google.co.jp/search?q=web2py 1 - 10 su circa 606.000 per web2p I guess this test is not significant. It does

[web2py] Re: global name 'cx_Oracle' is not defined

2010-03-27 Thread Jason Lotz
The only problem is that python interpreter itself seems to recognize the cx_Oracle driver. I am able to make a connection in the Python Shell. I only get the error when trying to connect using web2py DAL in the Interactive Shell. Is there any version compatibilities issue? Windows 2003 Server

[web2py] Re: Cleanup sessions

2010-03-27 Thread Iceberg
On Mar27, 5:27pm, annet annet.verm...@gmail.com wrote: I have just moved my application from the development environment to a production environment. I read the web2py manual and some posts in the group on the subject of cleaning up sessions, but I am not sure which is the best way to proceed.

[web2py] Re: Cleanup sessions

2010-03-27 Thread mdipierro
If you install a new web2py app and, before you start web2py, you run your line below, then start web2py, welcome.w2p will package your cron task. All apps created after that will have it. Massimo On 27 Mar, 23:12, Iceberg iceb...@21cn.com wrote: On Mar27, 5:27pm, annet annet.verm...@gmail.com

Re: [web2py] Re: Cleanup sessions

2010-03-27 Thread Jonathan Lundell
On Mar 27, 2010, at 9:15 PM, mdipierro wrote: If you install a new web2py app and, before you start web2py, you run your line below, then start web2py, welcome.w2p will package your cron task. All apps created after that will have it. Though the way it's written, it depends on keeping