[web2py] Re: Check

2011-07-07 Thread beedge
Apologises. Stupid. Double (differeing) definition of db in the model file, before and after some custom auth tables. Hence, app was pulling in my apps tables, but I couldn't see the auth stuff and odd behaviour.

[web2py] headers argument behavior in v1.97.1

2011-07-07 Thread niknok
While using crud, I sometimes define headers for *some* fields listed in the fields argument. This works until I upgraded to 1.97.1 and now I get an error if I do not define the headers for *all* fields listed in the fields argument. For example, the following code no longer works

Re: [web2py] headers argument behavior in v1.97.1

2011-07-07 Thread Bruno Rocha
Can you share some example app or model + controller code t reproduce the bug. Do you have a Traceback ticket error? what message, what file/line? The erro occurs when running the mentioned controller, or qhen doing some other action on this? Need more onfo to help tracking this issue. []'s

Re: [web2py] Re: Metaprogramming in controller

2011-07-07 Thread Miguel Lopes
I see closures are not even necessary. The solution is using routes. For the interested routes is ok for production (the embargo was old-news). Here's some info: https://mail.google.com/mail/?shva=1#search/routes+production/12a53a18e7f6b2d5 Miguel On Wed, Jul 6, 2011 at 4:03 PM, Miguel Lopes

Re: [web2py] cron Too many open files regression?

2011-07-07 Thread ron_m
The code running this is in gluon/newcron.py From your stack trace you are using hard cron which is a class at line 44. It runs launch once a minute This runs crondance which puts a wrapper on the tasks that should be run adding web2py run line parameters if * or ** is at the beginning of the

[web2py] A catchall action per controller - would be proposal

2011-07-07 Thread Miguel Lopes
Yesterday I posted about implementing dynamic actions (functions) in a controller. This is interesting because one can achieve clean urls, instead of passing the names of the dynamic pages in args or vars. In a system with a cms this has the benefit of user defined pages being indistinguishable

Re: [web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)

2011-07-07 Thread Bruno Rocha
Massimo Di Pierro massimo.dipie...@gmail.com wrote: 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 Not yet, but I am writing 2.0 and this will allow some cool options for plugins!

[web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)

2011-07-07 Thread Bruno Rocha
UPDATE: auto_validate renamed to .validate() Now we have another method that allows this: return dict(form=PowerFormWizard(db.table).process(messages=['Sucess!','Fail try again'])) which creates and auto validate the form returning the form itsef. Other thing I guess no one tought about is

Re: [web2py] headers argument behavior in v1.97.1

2011-07-07 Thread Martín Mulone
Did you use trunk version?, I submitted recently some changes there.- 2011/7/7 Bruno Rocha rochacbr...@gmail.com Can you share some example app or model + controller code t reproduce the bug. Do you have a Traceback ticket error? what message, what file/line? The erro occurs when running

Re: [web2py] headers argument behavior in v1.97.1

2011-07-07 Thread Martín Mulone
Yes you need to define all the headers. 2011/7/7 niknok nikolai...@gmail.com ** While using crud, I sometimes define headers for *some* fields listed in the fields argument. This works until I upgraded to 1.97.1 and now I get an error if I do not define the headers for *all* fields listed in

[web2py] gluon.cache on functions with arguments

2011-07-07 Thread PhE
Hello, I'm trying to use gluon.cache and @cache decorator in my web2py application. It works fine for decorating controller methods. Now, I would like to use web2py cache in my modules : @cache('fct1_key', time_expire=5, cache_model=cache.ram) def my_function1(a, b, c): #... return

[web2py] web2py added on PyPy compatibility page

2011-07-07 Thread cjrh
Hi group I added compatibility details for web2py here (list page): https://bitbucket.org/pypy/compatibility/wiki/Home and here (detail page): https://bitbucket.org/pypy/compatibility/wiki/web2py I have successfully run web2py on PyPy 1.5, on Windows XP for several days. I have noticed

[web2py] Re: web2py added on PyPy compatibility page

2011-07-07 Thread cjrh
On further examination, it looks like leaking file descriptors is enough to mark a library as incompatible (this happened with mercurial), so I have changed web2py's to incompatible until we can fix all the leaks.

[web2py] Google App Engine datastor

2011-07-07 Thread stargate
is Google App Engine datastor supported in web2py?

[web2py] Re: web2py hosting

2011-07-07 Thread stargate
For hosting I would use https://www.dotcloud.com/ But only for big projects. On Jul 1, 1:17 pm, DenesL denes1...@yahoo.ca wrote: Information collected from actual users of the service. Comments can belong to several people, and can be positive (+), negative (-) or other (~). This post will

[web2py] Re: web2py added on PyPy compatibility page

2011-07-07 Thread cjrh
On Jul 7, 1:27 pm, cjrh caleb.hatti...@gmail.com wrote: On further examination, it looks like leaking file descriptors is enough to mark a library as incompatible (this happened with mercurial), so I have changed web2py's to incompatible until we can fix all the leaks. I should also point out,

Re: [web2py] Re: web2py added on PyPy compatibility page

2011-07-07 Thread danto
2011/7/7 cjrh caleb.hatti...@gmail.com On Jul 7, 1:27 pm, cjrh caleb.hatti...@gmail.com wrote: On further examination, it looks like leaking file descriptors is enough to mark a library as incompatible (this happened with mercurial), so I have changed web2py's to incompatible until we

[web2py] Re: A catchall action per controller - would be proposal

2011-07-07 Thread pbreit
The 404 and error functionality works pretty well for that. Are you suggesting that something could be done in a clean install of Web2py?

[web2py] Re: A catchall action per controller - would be proposal

2011-07-07 Thread Anthony
Are you suggesting the possibility of defining a function like: def __catchall(): # do stuff return dict(...) in a controller, and any time a request comes in for a function that doesn't exist in the controller, web2py looks for a function called __catchall, and if it exists, passes

[web2py] Passing JavaScript variable to web2py session variable?

2011-07-07 Thread Vasil Petkov
Hello! I am having that JavaScript function inside a web2py view: function submit_form(input_number, input_goal) { $('input#user_input_number').val(input_number); $('input#user_input_goal').val(input_goal); $('form:first').submit(); return false; } I would like to assign the

[web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
Hi Looking for help with form generation. I have: form = FORM(LABEL('Name', _for='permissionName'), INPUT(_type='text', __name='permissionName', _id='permissionName', _style=width:150px;, _class='listPanelRow'),

[web2py] can a login_onaccept callback open another view?

2011-07-07 Thread Luis Goncalves
Hello!! As part of the login process, I need the user to make a choice (select one of the multiple versions of the site he has access to, for example), before being redirected to whatever _login_next is. Is it possible for a login_onaccept callback to present a view with a form? My

[web2py] Re: Passing JavaScript variable to web2py session variable?

2011-07-07 Thread Vasil Petkov
I tried the following: function submit_form(input_number, input_egn) { $('input#user_input_number').val(input_number); $('input#user_input_egn').val(input_egn); $.ajax({ url: http://127.0.0.1:8000/games/xs-software/vaucher.html;, method:

[web2py] Re: Google App Engine datastor

2011-07-07 Thread pbreit
I'm not sure what datastor is but GAE is explicitly supported: http://web2py.com/book/default/chapter/11#Google-App-Engine

[web2py] Re: Passing JavaScript variable to web2py session variable?

2011-07-07 Thread Vasil Petkov
On Jul 7, 9:47 pm, Vasil Petkov petko...@dir.bg wrote: I tried the following:     function submit_form(input_number, input_egn) {         $('input#user_input_number').val(input_number);         $('input#user_input_egn').val(input_egn);         $.ajax({                 url:

Re: [web2py] Re: replace delete with inactive

2011-07-07 Thread Richard Vézina
Hello, But how to implement db foreign key constraint at web2py model level?? Thank you. Richard On Thu, Nov 18, 2010 at 2:41 PM, mdipierro mdipie...@cs.depaul.edu wrote: good point. This will work: if request.post_vars.delete_this_record: del

Re: [web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Richard Vézina
try formstyle='divs' Then if still not above you can make it above by css and the appropriate div class of id... Look at you generate html view source file. Ctrl+U in most nav ;-) Richard On Thu, Jul 7, 2011 at 2:09 PM, Jim Steil j...@qlf.com wrote: Hi Looking for help with form

[web2py] how to enforce foreign key constraint at w2p model level

2011-07-07 Thread Richard Vézina
Hello, I would like to avoid this traceback : IntegrityError: ERREUR: UPDATE ou DELETE sur la table « ref_fnaregistry » viole la contrainte de clé étrangère « fnaregistry_id » de la table « ref_vregistry » DETAIL: La clé (fnaregistry_id)=(1) est toujours référencée à partir de la table «

[web2py] Script to deploy Python in Linux (CentOS)

2011-07-07 Thread Alfonso de la Guarda
Hello, I have published under a free license, some scripts that let you install python, mongoand nginx on CentOS. Nginx configurations apply load balancing to Tornado (but can set it to uwsgi or any other). Supervisor is also added to manage the services installed. You can review the project,

[web2py] Re: found it

2011-07-07 Thread JorgeH
cool ;) Now, in the future, consider using more appropriate and specific titles for your posts.

Re: [web2py] Re: web2py added on PyPy compatibility page

2011-07-07 Thread Richard Vézina
Does it speed up web2py? Richard On Thu, Jul 7, 2011 at 11:28 AM, danto web2py.n...@gmail.com wrote: 2011/7/7 cjrh caleb.hatti...@gmail.com On Jul 7, 1:27 pm, cjrh caleb.hatti...@gmail.com wrote: On further examination, it looks like leaking file descriptors is enough to mark a library

[web2py] Re: FORM helper - formstyle='table2cols'

2011-07-07 Thread Anthony
No, formstyle is not an option with the FORM helper. The FORM helper simply generates the opening and closing form tags: print FORM() form action= enctype=multipart/form-data method=post/form If you want to use the FORM helper, you'll have to figure out the appropriate HTML/CSS to

[web2py] Re: FORM helper - formstyle='table2cols'

2011-07-07 Thread Anthony
Also, if you want to take advantage of the SQLFORM functionality, but your form is not based on a database table, you can use SQLFORM.factory. See http://web2py.com/book/default/chapter/07#SQLFORM.factory. Anthony On Thursday, July 7, 2011 3:27:51 PM UTC-4, Anthony wrote: No, formstyle is

[web2py] confused on routes.py

2011-07-07 Thread kasapo
Hi, So I think I might not really understand routes.py. Here is my problem: my web2py app is run at a url like: http://host.domain.tld/meetings/2011/MYAPP But, there is a proxypass rule for /meetings/2011/MYAPP to go to localhost:8180/MYAPP (which is what web2py is running on) So, I think I

[web2py] Re: Integrity error with IS_NOT_IN_DB [Solved]

2011-07-07 Thread Lenkaster
In the following link(1) bellow, Massimo explains how validation mechanism works: db.table.field2.requires=IS_NOT_IN_DB(db (db.table.field1==request.vars.field1),db.table.field2) [1]

Re: [web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
Richard Thanks for the tip. I've switched to using SQLFORM with no data updates for my purpose now and it is much closer to what I want. Only problem now is that the input field lengths are getting set to 280px and I can't find how to override them. I'm just trying a bunch of different

Re: [web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Anthony
On Thursday, July 7, 2011 3:46:10 PM UTC-4, Jim S wrote: Only problem now is that the input field lengths are getting set to 280px and I can't find how to override them. I think that's set in the /static/css/base.css file: input[type=text], input[type=password], textarea, select {

Re: [web2py] Re: FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
Thanks for all the advice. SQLFORM has a lot little things built in that make it more attractive than just a form. I modified what I needed and now having it working with a little css in the component .load file. Thanks again, still playing with it but I think everything I need is there.

Re: [web2py] Re: web2py added on PyPy compatibility page

2011-07-07 Thread cjrh
That is a complicated question: 1) Single page load: no. This is generally an IO-bound kind of system, e.g. an infinitely fast processor would have almost no effect on response time. 2) Concurrency/Scaling: generally, no. This is dominated by the DB backend, and (generally) the speed at

[web2py] Re: OffTopic Google+

2011-07-07 Thread cjrh
If you've submitted a patch, then you're no lurker, you're part of the team...

[web2py] How to display 'complete strings' in a view table ?

2011-07-07 Thread Valter Foresto
I use the view : {{extend 'layout.html'}} {{=records}} to display a records table. One field in the record report the date and time : *logs.event_time_stamp* 2011-07-07 23... but the date and time is 2011-07-07 23... instead of the complete 2011-07-07 23:01:15 string. What can I

[web2py] Re: How to display 'complete strings' in a view table ?

2011-07-07 Thread Anthony
Rows objects are rendered via the SQLTABLE helper (see http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#1229). It takes a 'truncate' argument that defaults to 16 (i.e., it truncates text at 16 characters). Try: {{=SQLTABLE(records, truncate=xx)}} where xx is 19 or greater in

[web2py] Re: Temporary changing default values of a Form

2011-07-07 Thread Massimo Di Pierro
Please open a ticket in google code. If this is a web2py but will fix asap. On Jul 6, 11:24 pm, Luis Goncalves lgoncal...@gmail.com wrote: In fact, just to make sure there wasn't something hidden in my app affecting the behavior, I downloaded a fresh install of web2py, and get the same

[web2py] Re: Metaprogramming in controller

2011-07-07 Thread Massimo Di Pierro
yes. even better use router (vs routes) On Jul 6, 10:03 am, Miguel Lopes mig.e.lo...@gmail.com wrote: Humm, Nice. Yes, closures are enough, and cleaner too. Is routes OK for production mode? Txs, Miguel On Wed, Jul 6, 2011 at 3:54 PM, Massimo Di Pierro massimo.dipie...@gmail.com

[web2py] Re: Google App Engine datastor

2011-07-07 Thread Massimo Di Pierro
datastor[e] is supported. On Jul 7, 8:40 am, stargate kyoukh...@gmail.com wrote: is Google App Engine datastor supported in web2py?

Re: [web2py] Re: Temporary changing default values of a Form

2011-07-07 Thread Luis Goncalves
Done! Thank you!!! Luis. On Thu, Jul 7, 2011 at 6:24 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please open a ticket in google code. If this is a web2py but will fix asap. On Jul 6, 11:24 pm, Luis Goncalves lgoncal...@gmail.com wrote: In fact, just to make sure there wasn't

[web2py] Re: headers argument behavior in v1.97.1

2011-07-07 Thread niknok
Thanks for looking. Code runs without errors in v1.96.1 but throws an error on 1.97.1. Here's the traceback: Traceback (most recent call last): File /home/rwn/Projects/web2py/gluon/restricted.py, line 192, in restricted exec ccode in environment File

[web2py] Re: headers argument behavior in v1.97.1

2011-07-07 Thread niknok
Nope, I'm not using trunk. And yes, now I know that I have do define *all* the headers while in the old versions, that isn't a requirement. I guess it's part of being explicit.. On Jul 7, 6:36 pm, Martín Mulone mulone.mar...@gmail.com wrote: Did you use trunk version?, I submitted recently some

[web2py] ww response.files.append(URL('static','css/menu.css'))

2011-07-07 Thread tazjel
On 02/17/2011 01:13 AM, Ahmed Bani wrote: Problem solved: {{ # (CSS) -) import random response.files.append(URL('static','css/menu.css')) response.files.append(URL('static','css/home.css')) # (JavaScript) ---