Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
temporarily solved with auth.settings.verify_email_next = URL(r=request, c='default', f='user', args='logout') so when user loggin again he got no auth.user.registration_key But, there is a way to do it inside tools.py verify_email ?

Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
Or, we need to logout the user and force the to login again.

Re: [web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Bruno Rocha
Very nice feature, I am using. but there is a small problem. to reproduce do this: set: auth.settings.registration_requires_verification = True auth.settings.login_after_registration = True decorate action with: @auth.requires(auth.user and not auth.user.registration_key) user registers and log

[web2py] Re: Get rid of a label in web2py SQLFORM

2011-08-25 Thread annet
Hi Jason, This would have worked: db.table.field.label=None Kind regards, Annet.

[web2py] Filtering dropdown

2011-08-25 Thread Noel Villamor
>From the manual: subset=db(db.person.id>100) db.dog.owner.requires = IS_IN_DB(db, 'person.id', '%(name)s', _and=IS_NOT_IN_DB(subset,'person.id')) Am I right in my interpretation that the dog.owner dropdown will only show person names who are not in the subset? Am trying to implement '_and' bu

Re: [web2py] Re: Memory problems on Webfaction

2011-08-25 Thread Vasile Ermicioi
thank yo Anthony :)

[web2py] Re: Database performance

2011-08-25 Thread HughBarker
Thanks for the reply. {{rows = db.executesql(dataSet._select())}} executes in 0.16s. On Aug 26, 2:09 pm, Massimo Di Pierro wrote: > Try by replacing > >  {{rows = dataSet.select()}} > > with > >  {{rows = db.executesql(dataSet._select())}} > > and tell me what get. > > Anyway, your raw sql selec

Re: [web2py] routes.py

2011-08-25 Thread Jonathan Lundell
On Aug 25, 2011, at 9:28 PM, Kenneth Lundström wrote: > On 26.8.2011 5:21, Jonathan Lundell wrote: >> On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote: >> >>> I'd like to have three types of routings: >>> >>> a) web2py.main_domain.comdefaults to init, but you can choose the >>> applicat

Re: [web2py] Re: CAS Auth redirect loop

2011-08-25 Thread Bruno Rocha
Anthony, as your code looks more compact, an you open an issue? and link your example code? ( I would do it but my code is too large to paste in) On Fri, Aug 26, 2011 at 1:44 AM, Anthony wrote: > Yes, I even created a custom table by copying the exact auth_user table > from Auth.define_tables, a

Re: [web2py] Re: CAS Auth redirect loop

2011-08-25 Thread Bruno Rocha
May be this url? http://0.0.0.0:8000/tutor/default/user/cas/login?service=http://0.0.0.0:8000/ client/default/user/login

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Anthony
Got it. On Thursday, August 25, 2011 11:45:59 PM UTC-4, Massimo Di Pierro wrote: > > Because there have been situations when there was a _next both in post > and get thus creating a list. > > On Aug 25, 6:29 pm, Anthony wrote: > > Syntax error: > > > > *or request.post_vars._next**:* > > Dr

Re: [web2py] Re: CAS Auth redirect loop

2011-08-25 Thread Anthony
Yes, I even created a custom table by copying the exact auth_user table from Auth.define_tables, and it still generated the redirect loop, so it doesn't appear to have anything to do with the particular fields or definition of the auth_user table -- just the fact that it is defined outside of d

Re: [web2py] routes.py

2011-08-25 Thread Kenneth Lundström
On 26.8.2011 5:21, Jonathan Lundell wrote: On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote: I'd like to have three types of routings: a) web2py.main_domain.comdefaults to init, but you can choose the application with web2py.main_domain.com b) testing.main_domain.com leads to app

Re: [web2py] Re: CAS Auth redirect loop

2011-08-25 Thread Bruno Rocha
I ran in the same problem, I figured out that using custom auth tables in provider app make the client app to run in infinite loop. I also tried to include 'username' field to the custom Auth table but did not solve the problem. My custom Auth Table https://gist.github.com/1172687 ( I tried with

[web2py] Re: Database performance

2011-08-25 Thread Massimo Di Pierro
Try by replacing {{rows = dataSet.select()}} with {{rows = db.executesql(dataSet._select())}} and tell me what get. Anyway, your raw sql select is only feting a third of the rows that that web2py is fetching. web2py is also doing a lot of extra work converting the list of records from tuples

[web2py] Re: GAE deployment problem

2011-08-25 Thread Jarrod Cugley
Oh I didn't know GAE had logs too whoops. It gives me the warning: File referenced by handler not found: gaehandler.py Any idea what that means? On Aug 26, 1:58 pm, Massimo Di Pierro wrote: > Check the GAE logs on the dashboard. > > On Aug 25, 10:32 pm, Jarrod Cugley wrote: > > > > > > > > >

[web2py] Re: GAE deployment problem

2011-08-25 Thread Massimo Di Pierro
Check the GAE logs on the dashboard. On Aug 25, 10:32 pm, Jarrod Cugley wrote: > So I've created a basic website that works on the web2py server, so I > wanted to test it on the GAE, these are my steps so far: > > 1. read:http://web2py.com/book/default/chapter/11#Google-App-Engine > 2. copied the

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Massimo Di Pierro
I think I fixed it. All but oracle expect SQL to be ; terminated. web2py adds the ; and removes it for Oracle. Because of a type it was not adding it so it was removing the last char thinking it was a ;. On Aug 25, 6:40 pm, Tim Korb wrote: > I did this, but am not sure what I'm looking for.  Thi

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Massimo Di Pierro
Because there have been situations when there was a _next both in post and get thus creating a list. On Aug 25, 6:29 pm, Anthony wrote: > Syntax error: > > *or request.post_vars._next**:* > Drop the colon at the end of that line. Actually, it's now short enough to > get it all on one line: > > ne

[web2py] Database performance

2011-08-25 Thread HughBarker
Hi, I'm new to web2py - first of all, thanks for such an excellent framework. It's certainly a breath of fresh air after writing J2EE webapps. Anyway, I'm building an application, part of which plots large datasets (using the JS Highstocks library). I've defined a table like this: db.define_table

[web2py] GAE deployment problem

2011-08-25 Thread Jarrod Cugley
So I've created a basic website that works on the web2py server, so I wanted to test it on the GAE, these are my steps so far: 1. read: http://web2py.com/book/default/chapter/11#Google-App-Engine 2. copied the app.example.yaml into my app.yaml and changed the id to the same id I used to create my

Re: [web2py] routes.py

2011-08-25 Thread Jonathan Lundell
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote: > I'd like to have three types of routings: > > a) web2py.main_domain.comdefaults to init, but you can choose the > application with web2py.main_domain.com > > b) testing.main_domain.com leads to application: testing > > c) developm

[web2py] Re: Passing web2py command line parameters when using apache/mod_wsgi

2011-08-25 Thread Eric Scott
No one is passing the -N or -J parameter for external cron jobs in web2py who is also using apache/mod_wsgi? On Aug 25, 12:20 pm, Eric Scott wrote: > How to I pass command line parameters to web2py when I'm not starting > web2py from the command line.  I'm using apache and mod_wsgi.  I've > looke

[web2py] Re: Problem creating forms inside a form.accepts

2011-08-25 Thread Francisco
Thanks for the tip. That was exactly the problem. I have found I fix, it's not yet fully working but it's a work in progress. What I'm doing is running a loop of all available forms in the dictionary and trying to accept the request.vars for each of them. It's not very efficent though, so if anyo

[web2py] Re: Changed field name in table def, database OK, but getting key error [SOLVED]

2011-08-25 Thread Eric Scott
Perfect! This thread solved at least one major headache, and perhaps another even greater headache. Massimo, I'm embarrassed I had not tried grep. It worked. I found the string in the db_wizard_populate.py file. I used the wizard to quickly recreate my app's database structure when I couldn't

Re: [web2py] Re: Memory problems on Webfaction

2011-08-25 Thread Anthony
On Wednesday, August 24, 2011 11:55:20 AM UTC-4, elffikk wrote: > > > - please add my website (fermer.md) to web2py powered websites > Done.

[web2py] Re: routes.py

2011-08-25 Thread Anthony
On Thursday, August 25, 2011 7:48:42 PM UTC-4, Kenneth wrote: > > In the controller code, where do I see what domain is used to access the > controller? If user goes to my application with user.domain.com where do > I see the user.domain.com? > request.env.http_host Anthony

[web2py] routes.py

2011-08-25 Thread Kenneth Lundström
I'd like to have three types of routings: a) web2py.main_domain.comdefaults to init, but you can choose the application with web2py.main_domain.com b) testing.main_domain.com leads to application: testing c) development.main_domain.comleads to application: testing, controller:tic

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Tim Korb
I did this, but am not sure what I'm looking for. This appears... function: select and last_query: db.auth_user.id>0 for example, and lots of other settings, etc. But I don't see anything that looks like an actual SQL query. So, working with one of my colleagues, we added tracing to dal.p

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Anthony
Syntax error: *or request.post_vars._next**:* Drop the colon at the end of that line. Actually, it's now short enough to get it all on one line: next = request.get_vars._next or request.post_vars._next Also, why isn't it just: next = request.vars._next Anthony On Thursday, August 25, 2011

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Massimo Di Pierro
Please check trunk.

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
It would appear that I can supply an 'onaccept' argument on a crud.create that is a function or list of functions to be executed after the record is updated. Is there a way I could use this to change the 'target' on the form submission in the event of a successful update? Again, any help woul

Re: [web2py] Re: Changed field name in table def, database OK, but getting key error

2011-08-25 Thread Anthony
Maybe he means use grep to see if 'name_string' is still somewhere in the application code. On Thursday, August 25, 2011 3:12:58 PM UTC-4, Richard wrote: > > Wrong thread?? > > On Thu, Aug 25, 2011 at 3:06 PM, Massimo Di Pierro > wrote: > >> Did you try grep (http://en.wikipedia.org/wiki/Grep)?

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread Anthony
On Thursday, August 25, 2011 3:28:38 PM UTC-4, G wrote: > > Hi, > Can you explain this a bit more? Is the idea to call > session.forget(response) in my main controller, but not in the > components that have forms in them? I had previously put the > session.forget() line in the model file so it

[web2py] Re: Allowing provisional login with email only

2011-08-25 Thread pbreit
Perhaps. But I would certainly advise respecting your users.

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread G
Hi, Can you explain this a bit more? Is the idea to call session.forget(response) in my main controller, but not in the components that have forms in them? I had previously put the session.forget() line in the model file so it was always executed. Thanks On Aug 25, 11:42 am, Anthony wrote: > If y

Re: [web2py] Re: fluxflex

2011-08-25 Thread Yota Ichino
Ray, I made it! I made repository light. Git filter-branch option is powerful. 2011/8/26 Ray (a.k.a. Iceberg) : > Hi Yota, > > Thanks for your time. Hopefully these can help. > [1] > http://stackoverflow.com/questions/872565/how-do-i-remove-sensitive-files-from-gits-history > [2] http://help.git

Re: [web2py] Re: Changed field name in table def, database OK, but getting key error

2011-08-25 Thread Richard Vézina
Wrong thread?? On Thu, Aug 25, 2011 at 3:06 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Did you try grep (http://en.wikipedia.org/wiki/Grep)? > > On Aug 25, 12:53 pm, Eric Scott wrote: > > I'm using postgresql. I had to change a field name in my table def, > > which are in the

[web2py] Re: Changed field name in table def, database OK, but getting key error

2011-08-25 Thread Massimo Di Pierro
Did you try grep (http://en.wikipedia.org/wiki/Grep)? On Aug 25, 12:53 pm, Eric Scott wrote: > I'm using postgresql.  I had to change a field name in my table def, > which are in the web2py models.  The database changed accordingly, but > now I get a key error when I try to insert a new record us

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread ee...@seccuris.com
OK. Issue created as requested http://code.google.com/p/web2py/issues/detail?id=388

Re: [web2py] Changed field name in table def, database OK, but getting key error

2011-08-25 Thread Richard Vézina
Hello Eric, I would help, but I have no clue... Do you alternate between SQLite and Postgres? If yes, web2py always try to recreate the auth(s) tables that is a problem I often have... To solve it you must define the auth(s) tables in the db.py and set them to migrate=false... so web2py stop to t

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Massimo Di Pierro
OK. I need to check when and why this got broken. This will be fixed by the next stable version. Please open a ticket so it is tracked. On Aug 25, 1:35 pm, Anthony wrote: > On Thursday, August 25, 2011 2:12:37 PM UTC-4, Massimo Di Pierro wrote: > > > We do not allow redirection outside the app, u

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread Anthony
If you don't explicitly "forget" the session, the session file will lock on each request, so subsequent requests will be blocked. Maybe you could forget the session on requests that don't need it and just keep it for requests that do need it (i.e., form submissions). Note, to immediately unlock

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Anthony
On Thursday, August 25, 2011 2:12:37 PM UTC-4, Massimo Di Pierro wrote: > > We do not allow redirection outside the app, unless there is a bug. > Yes, looks like we do. In Auth.login(): if next == DEFAULT: next = request.get_vars._next \ or request.post_vars._n

[web2py] Re: IMPORTANT on cron jobs, scheduled jobs and delayed jobs

2011-08-25 Thread Massimo Di Pierro
At 5am. This is the formula: next_run_time = task.last_run_time + timedelta(seconds=task.period) On Aug 25, 12:29 pm, Martín Mulone wrote: > I have a doubt, suppose I have a task I have to run every day, the task take > one hour to complete and suppose I scheduled to start at 5am every day. Th

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread G
I tried session.forget() but found that forms submitted by ajax in components don't seem to work without a session, so that won't work in my case. I also tried removing the SQLite db, it may have helped some but I'm still testing. Thanks again for the suggestions On Aug 24, 4:18 pm, Michele Comi

[web2py] Re: Lazy virtual fields - strange result!

2011-08-25 Thread Massimo Di Pierro
The nightly build or trunk. On Aug 25, 10:24 am, Martin Weissenboeck wrote: > Thank you. Which version of web2py? 1.98.2 does not know Field.lazy > > 2011/8/25 Massimo Di Pierro > > > > > > > > > We are moving away from this because of many problems. Try this > > instead. It is still experimenta

[web2py] Re: OWASP Top 10 web app vuln # 10

2011-08-25 Thread Massimo Di Pierro
We do not allow redirection outside the app, unless there is a bug. Did you check this? On Aug 25, 10:59 am, Eric Enns wrote: > Hey, > > I know this has been discussed before, but this issued is now in the OWASP > top ten web application > vulnerabilitieshttps://www.owasp.org/index.php/Top_10_2

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Massimo Di Pierro
Can you add {{=response.toolbar()}} somewhere in your layout.html and see what is the invalid query generated by appadmin? On Aug 25, 9:23 am, Tim Korb wrote: > I am using this this version... > >     changeset:   2295:7c7f7d5ac882 >     date:        Wed Aug 24 16:25:41 2011 -0500 > > I am able

[web2py] Changed field name in table def, database OK, but getting key error

2011-08-25 Thread Eric Scott
I'm using postgresql. I had to change a field name in my table def, which are in the web2py models. The database changed accordingly, but now I get a key error when I try to insert a new record using appadmin. I made sure appadmin.py is the latest and greatest. Still getting key error. I don't

Re: [web2py] IMPORTANT on cron jobs, scheduled jobs and delayed jobs

2011-08-25 Thread Martín Mulone
I have a doubt, suppose I have a task I have to run every day, the task take one hour to complete and suppose I scheduled to start at 5am every day. The first time it's run at 5am, the next day it's run at 5am or at 6am? because I put period=86400sec and the prior task take 1 hour to complete. 201

Re: [web2py] Re: fluxflex

2011-08-25 Thread Yota Ichino
Thank you for helping. I'll read. 2011/8/26 Ray (a.k.a. Iceberg) : > Hi Yota, > > Thanks for your time. Hopefully these can help. > [1] > http://stackoverflow.com/questions/872565/how-do-i-remove-sensitive-files-from-gits-history > [2] http://help.github.com/remove-sensitive-data/ > > Regards, >

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
Hi Yota, Thanks for your time. Hopefully these can help. [1] http://stackoverflow.com/questions/872565/how-do-i-remove-sensitive-files-from-gits-history [2] http://help.github.com/remove-sensitive-data/ Regards, Ray On Aug 26, 12:05 am, Yota Ichino wrote: > You're right, Iceberg. > > Uh..., t

[web2py] Passing web2py command line parameters when using apache/mod_wsgi

2011-08-25 Thread Eric Scott
How to I pass command line parameters to web2py when I'm not starting web2py from the command line. I'm using apache and mod_wsgi. I've looked closely at the documentation, and there's a section on how to pass parameters when it's running as a windows service, but the documentation is clear that

Re: [web2py] Re: fluxflex

2011-08-25 Thread Yota Ichino
You're right, Iceberg. Uh..., there is a issue. I don't know how to delete history in git. Could you tell me it? 2011/8/25 Ray (a.k.a. Iceberg) : > That's a good merge. > > By the way, is it possible to completely remove the old master branch > stuff? (This is actually a question for git.) Curren

[web2py] OWASP Top 10 web app vuln # 10

2011-08-25 Thread Eric Enns
Hey, I know this has been discussed before, but this issued is now in the OWASP top ten web application vulnerabilities https://www.owasp.org/index.php/Top_10_2010-A10 . The vulnerability is the feature ?_next=. One way this good be exploited according to the vulnerability is a attacker gives

Re: [web2py] Re: Lazy virtual fields - strange result!

2011-08-25 Thread Martin Weissenboeck
Thank you. Which version of web2py? 1.98.2 does not know Field.lazy 2011/8/25 Massimo Di Pierro > We are moving away from this because of many problems. Try this > instead. It is still experimental but may go into stable soon. > > def vfields(): > db.define_table('item', > Field('unit_pri

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
Ok, found what was causing the problem. On my page that I'm loading in my modal window I was specifying a different view. This view had: ...in the section. This caused all submits/re-displays to go to the parent to display. If I take it out it works as expected. However, now (as Bruno

[web2py] Re: Understanding Rocket Threads

2011-08-25 Thread Ray (a.k.a. Iceberg)
Hi G, I saw similar behaviors in some of my lightweight app, which also uses sqlite and rocket. I need not solve that problem at that time (it was really a little app for a small group). But I can provide some information to you this time. When you try to isolate the sqlite, "using no auth and ra

Re : Re: [web2py] Re: fluxflex

2011-08-25 Thread JmiXIII
As far as I understand : get_new_stable is a git branch of the git web2py-for-fluxflex which allow to import the last stable vesrion of web2py. Yet if you do so you will lost your previously installed app. I think you should prefer the builtin upgrade button of the admin web2py, but I haven't tr

Re: [web2py] Re: fluxflex

2011-08-25 Thread Tito Garrido
What is get_new_stable? Could you explain how to upgrade web2py-for-fluxflex? On Thu, Aug 25, 2011 at 11:22 AM, Ray (a.k.a. Iceberg) wrote: > That's a good merge. > > By the way, is it possible to completely remove the old master branch > stuff? (This is actually a question for git.) Current repo

[web2py] Re: Upload & Install packed application on FluxFlex - Error500

2011-08-25 Thread Ray (a.k.a. Iceberg)
Hi Tito, there is an ongoing discussion here. http://groups.google.com/group/web2py/msg/aa293a99cda711e9 Regards, Ray On Aug 25, 10:21 pm, Tito Garrido wrote: > Is there a way to update web2py on fluxflex? > > > On Thu, Aug 25, 2011 at 10:52 AM, Yota Ichino wrote: > > The Error is caused POST s

[web2py] Re: Re : Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
On Aug 24, 10:25 pm, "Ray (a.k.a. Iceberg)" wrote: > > Another big issue. How to upgrade to the latest web2py (when > > available)? Every time I do a git import in fluxflex panel, with or > > WITHOUT checking "Run initialize scripts for setting up the project", > > ends up with my whole web2py pro

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Tim Korb
I am using this this version... changeset: 2295:7c7f7d5ac882 date:Wed Aug 24 16:25:41 2011 -0500 I am able to reproduce the problem by creating a simple, default app and replacing the DAL line with... from gluon.custom_import import track_changes track_changes() fr

[web2py] Re: fluxflex

2011-08-25 Thread Ray (a.k.a. Iceberg)
That's a good merge. By the way, is it possible to completely remove the old master branch stuff? (This is actually a question for git.) Current repo still contains many web2py files in its history. This makes it a little bit unnecessary slow when cloning the repo. Regards, Ray On Aug 25, 2:36 a

Re: [web2py] Re: Upload & Install packed application on FluxFlex - Error500

2011-08-25 Thread Tito Garrido
Is there a way to update web2py on fluxflex? On Thu, Aug 25, 2011 at 10:52 AM, Yota Ichino wrote: > The Error is caused POST size restriction, maybe. I tried to upload a > file which is about > 128KB but could not upload. > > 2011/8/25 Massimo Di Pierro : > > I emailed the author of the installa

Re: [web2py] Re: Upload & Install packed application on FluxFlex - Error500

2011-08-25 Thread Yota Ichino
The Error is caused POST size restriction, maybe. I tried to upload a file which is about 128KB but could not upload. 2011/8/25 Massimo Di Pierro : > I emailed the author of the installation script. It just got updated. > Perhaps there is a bug? > > massimo > > On Aug 24, 4:26 pm, Valter Foresto

[web2py] Re: Upload & Install packed application on FluxFlex - Error500

2011-08-25 Thread Alan Etkin
I have the same problem trying to upload from admin app. I just followed the vimeo video by Massimo and everything worked fine until i tried to upload. It would help if there were some server output to check what is going when uploading but i don't see how this could be done with flux administrativ

[web2py] Re: Problem creating forms inside a form.accepts

2011-08-25 Thread Francisco
Thanks for the help. Here is the complete function defined in the controller: -- code for controller starts -- @auth.requires_login() def new_sale(): response.title="New sale" if not session.cart: session.cart={} if not session.cart_qty: session.cart_qty={} if not session.

[web2py] new feature in trunk: auth.settings.login_after_registration

2011-08-25 Thread Massimo Di Pierro
Some times I need the following: I want people to register and be able to play with some parts of the app but not everything until they verify their email. yet I do not want them to have to wait for the email in oder to se the system. Now (in trunk) you can do: auth.settings.registration

[web2py] Re: Allowing provisional login with email only

2011-08-25 Thread Anthony
I agree, but I think the solution is use of session and/or cookies if you want to persist some user state -- that should achieve what you want without exposing private information. If you want an easy login experience, you might also consider something like Janrain or your own OpenID login. An

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
Anthony and Bruno Thank you for your replies. I tried nyroModal but get the same results as with FancyBox (which I've been using). I am going to work up a simple app that shows my problem. Either that will show me where my problem lies or provide something simple for you to see the behavior

[web2py] Re: Lazy virtual fields - strange result!

2011-08-25 Thread Massimo Di Pierro
We are moving away from this because of many problems. Try this instead. It is still experimental but may go into stable soon. def vfields(): db.define_table('item', Field('unit_price','double'), Field('quantity','integer')) db(db.item.id>0).delete() db.item.lazy_total_price=Fi

[web2py] Lazy virtual fields - strange result!

2011-08-25 Thread Martin Weissenboeck
I wanted to learn more about lazy virtual fields and therefore I have repeated the example from the book: def vfields(): db.define_table('item', Field('unit_price','double'), Field('quantity','integer')) db(db.item.id>0).delete() class MyVirtualFields: def lazy_total_pric

[web2py] Re: New 'represent' syntax

2011-08-25 Thread Massimo Di Pierro
You just change this: def rp(author): an = db(db.akb_reprint.uuid==author).select(db.akb_reprint.rp_author) if len(an): a_name = an.first()['rp_author'] else: a_name = 'No rp_author' return a_name into this: def rp(author,record): an = db(db.akb_reprint.uuid==

[web2py] Re: COL and COLGROUP

2011-08-25 Thread Massimo Di Pierro
In trunk On Aug 25, 3:52 am, Martin Weissenboeck wrote: > Hi, > > It is not possible to write something like TABLE(COL(...)).  I think 'COL' > and 'COLGROUP' are missing in variable __all__ at the beginning of > gluon/html.py > > Regards, Martin

[web2py] Re: Get rid of a label in web2py SQLFORM

2011-08-25 Thread Massimo Di Pierro
Check trunk On Aug 25, 12:48 am, Jason Brower wrote: > I have a label I want to get ride of but this doesn't work... > Field('email', 'string', label=None), > no this... > Field('email', 'string', label=""), > Any other ideas? > -- > BR, > Jason Brower

Re: [web2py] Re: How to use SQLFORM.grid

2011-08-25 Thread Johann Spies
On 24 August 2011 18:33, Massimo Di Pierro wrote: > I think you want: > > def journal_grid(): >query = db.akb_journal.publisher == db.akb_publisher.uuid >fields = [db.akb_journal.title,db.akb_journal.standard_name, > db.akb_journal.issn, db.akb_journal.abbrev_iso, >

[web2py] New 'represent' syntax

2011-08-25 Thread Johann Spies
Please help me to understand how to use the new syntax. How do I have to change the following code to work? def rp(author): an = db(db.akb_reprint.uuid==author).select(db.akb_reprint.rp_author) if len(an): a_name = an.first()['rp_author'] else: a_name = 'No rp_author

[web2py] Re: Memory problems on Webfaction

2011-08-25 Thread robsan
This is great Vasile! Will try it and report back. On Aug 24, 4:55 pm, Vasile Ermicioi wrote: > [web2py] > wgethttp://www.web2py.com/examples/static/web2py_src.zip > unzip web2py_src.zip > python2.7 web2py.py #seems needed before using it > > [uwsgi] > wgethttp://projects.unbit.it/downloads/uwsgi

[web2py] web2py.fedora.sh

2011-08-25 Thread ryo1kato
Hi, I found web2py.fedora.sh script have couple of problems in start() and stop(). So here's explanation and my solutions. If these fixes looks good, I can write a clean fix, test and send you a patch, could be tested only on RHEL6. (A) when calling daemon() shell-function, it is called

[web2py] Re: Allowing provisional login with email only

2011-08-25 Thread peter
Anthony, this is exactly the culture I am questionning. Why force everyone to register because a small number of people are concerned about someone else pretending to be them to see their choice in a cart (slightly paranoid I would say). They are welcome to have their concern, they can register. I

Re: [web2py] iconset

2011-08-25 Thread Martín Mulone
famfam and tango are the best open source icon set. I found this also: http://openiconlibrary.sourceforge.net/gallery2/?./Icons/actions 2011/8/24 Tito Garrido > http://www.famfamfam.com/lab/icons/silk/ > > famfamfam :-) free and nice! > > On Wed, Aug 24, 2011 at 10:24 PM, pbreit wrote: > >> I

[web2py] COL and COLGROUP

2011-08-25 Thread Martin Weissenboeck
Hi, It is not possible to write something like TABLE(COL(...)). I think 'COL' and 'COLGROUP' are missing in variable __all__ at the beginning of gluon/html.py Regards, Martin

[web2py] Re: uuid - Postgresql-type

2011-08-25 Thread Niphlod
You can start using a string with length 36. If you don't use functions on that column you can change the type in postgres to uuid and leave the model a string length=36 and still continue to use the DAL without problems.