[web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Mike Veltman
> On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > And that was it... > > > > Thank you very much. Mmmm, this should go in the book.. > > There's also this method of pre-populating a form field: > http://web2py.com/book/default/chapter/07#Pre-populating-the-form Yes I

Re: [web2py] Re: How to start web2py server permanently

2011-06-06 Thread Manuele Pesenti
On 07/06/2011 08:00, pradeesh narayan wrote: Thank you Rahul... Its worked fine. Thanks once again for your help. you got another chance here http://www.web2py.com/book/default/chapter/11#Start-as-Linux-Daemon Manuele

Re: [web2py] Re: How to start web2py server permanently

2011-06-06 Thread pradeesh narayan
Thank you Rahul... Its worked fine. Thanks once again for your help. On Tue, Jun 7, 2011 at 7:12 AM, Rahul wrote: > Alternately, you can use the nohup command if you have shell access. > Like > > nohup python web2py.py - a'' -i -p > & > > This will last till your server machine is re-booted.

[web2py] request.is_local

2011-06-06 Thread LightOfMooN
What is logic of request.is_local? I tried use it to prevent direct access to some included blocks: def index(): return dict() def some_block(): if request.is_local: do_smth() return dict(smth=smth) else: return None index.html: {{=LOAD('mycontroller', 'som

[web2py] Re: How to start web2py server permanently

2011-06-06 Thread Rahul
Alternately, you can use the nohup command if you have shell access. Like nohup python web2py.py - a'' -i -p & This will last till your server machine is re-booted. If it has, it will terminate. Cheers, Rahul On Jun 6, 11:58 pm, danto wrote: > 2011/6/6 Pradeesh > > > I have installed web

[web2py] Checkboxes to select records.

2011-06-06 Thread David J.
How do I add a checkbox to each row in the table to let the user select and then press delete to delete the selected row? Is there a SLICE for this? Thanks.

Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread David J.
Now that I am in front of my app; I see what you are saying; If you try to login with both user and password and the login fails the email is not re-populated. If you enter the form with the email and no password the email is populated still; Not sure if it is a bug or what; Sorry if I mi

[web2py] Re: OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Massimo Di Pierro
I am not familiar with facebook email. If this (username + @facebook) is avlid email, perhaps web should set that even if username=True On Jun 6, 7:15 pm, "Sebastian E. Ovide" wrote: > I do not see major pros and cons... it is a matter of precerences... > > 1) setting username=True in auth.defin

Re: [web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Anthony
On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > > And that was it... > > Thank you very much. Mmmm, this should go in the book.. > There's also this method of pre-populating a form field: http://web2py.com/book/default/chapter/07#Pre-populating-the-form

[web2py] Optimising web2py for GAE

2011-06-06 Thread Matt
Hi there, Can anyone provide me with some suggestions on how to optimise web2py for GAE? At present the code I've got deployed (based on Version 1.96.3 (2011-06-06 16:16:02) seems incredibly slow. I keep getting DeadlineExceededExceptions and timeouts for simple request / responses like this: 1

[web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-06 Thread Mike Veltman
And that was it... Thank you very much. Mmmm, this should go in the book.. > db.lvstorage.lunid = 4 > > should be (I guess) > > db.lvstorage.lunid.default = 4 > > On Jun 6, 4:12 am, Mike Veltman wrote: > > I try to pre populate a form and I think I do something wrong but I stare > > at it f

Re: [web2py] Re: components and timers

2011-06-06 Thread Bruno Rocha
I am using comet for an application, and it is working fine, notice that i am running 2 servers on linode, one is only for host the queue. For compatibility I am using this https://github.com/gimite/web-socket-js (it is flash based, but works fine and even facebook and grooveshark uses this) --

Re: [web2py] Re: components and timers

2011-06-06 Thread Anthony
Getting back to the original question, if the refreshes need to happen at fixed (and not too frequent) intervals (rather than at indeterminate times, whenever the data happen to be ready), it may be simpler to just use short-polling -- see https://groups.google.com/d/topic/web2py/xJjTeowYk0U/di

Re: [web2py] Re: SQL help

2011-06-06 Thread Stifan Kristi
a, i c, i mean in database definition that have field type list:string, have the valid value that is describe in belongs, is it possible or not? thank you. On Tue, Jun 7, 2011 at 7:58 AM, pbreit wrote: > I'm not sure I understand the question. Validators apply to forms. > "belongs" is used to q

Re: [web2py] Re: SQL help

2011-06-06 Thread pbreit
I'm not sure I understand the question. Validators apply to forms. "belongs" is used to query the database.

Re: [web2py] Re: components and timers

2011-06-06 Thread Anthony
On Monday, June 6, 2011 7:47:48 PM UTC-4, David J wrote: > > Seeing that comet is not widely supportted I was wondering if there was an > ajax poll example? > I think there's some terminology confusion. "comet" *is* widely supported, as it involves long-held HTTP requests via streaming or Ajax l

Re: [web2py] Re: SQL help

2011-06-06 Thread Stifan Kristi
is it possible to use belongs to replace IS_IN_SET validation in database definition? thank you On Tue, Jun 7, 2011 at 7:29 AM, pbreit wrote: > "belongs": > http://web2py.com/book/default/chapter/06#belongs >

[web2py] Re: SQL help

2011-06-06 Thread DJ
Perfect! Thanks!

Re: [web2py] SQL help

2011-06-06 Thread DJ
Thank you! This works!

Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread pbreit
How do I set that for an Auth form?

[web2py] Re: SQL help

2011-06-06 Thread pbreit
"belongs": http://web2py.com/book/default/chapter/06#belongs

Re: [web2py] SQL help

2011-06-06 Thread Marin Pranjic
Yes, it is. It should be something like db(db.shirts.color.belongs(['red', 'white', 'blue']).select() On Tue, Jun 7, 2011 at 2:18 AM, DJ wrote: > Is this query possible in web2py? > > SELECT * FROM `shirts` WHERE `color` IN ('red','white','blue') > > -Sebastian >

[web2py] SQL help

2011-06-06 Thread DJ
Is this query possible in web2py? SELECT * FROM `shirts` WHERE `color` IN ('red','white','blue') -Sebastian

Re: [web2py] Re: OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Sebastian E. Ovide
I do not see major pros and cons... it is a matter of precerences... 1) setting username=True in auth.define_tables(), define_tables will add a field on the table (username) and if that field is present, authentication will be done using username. Personally I prefer to use emails rather than user

Re: [web2py] Pre-fill email address on failed login?

2011-06-06 Thread David J
Keepvalues in form On Jun 6, 2011 7:51 PM, "pbreit" wrote: > I'm trying to pre-fill the email address field on a failed login but can't > seem to figure out if the default/user() function can access any of the > submitted inputs. That probably should be default functionality anyway.

[web2py] Pre-fill email address on failed login?

2011-06-06 Thread pbreit
I'm trying to pre-fill the email address field on a failed login but can't seem to figure out if the default/user() function can access any of the submitted inputs. That probably should be default functionality anyway.

Re: [web2py] Re: components and timers

2011-06-06 Thread David J
Seeing that comet is not widely supportted I was wondering if there was an ajax poll example? On Jun 6, 2011 6:15 PM, "Massimo Di Pierro" wrote: > look into gluon/contrib/comet_messaging.py > > On Jun 6, 5:08 pm, blackthorne wrote: >> hi >> >> Let's say I have a component that gets the last 10 tw

Re: [web2py] Re: components and timers

2011-06-06 Thread Stifan Kristi
hi, massimo did you have the documentation for do this? thank you so much On Tue, Jun 7, 2011 at 5:15 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > look into gluon/contrib/comet_messaging.py > > On Jun 6, 5:08 pm, blackthorne wrote: > > hi > > > > Let's say I have a component th

[web2py] Re: components and timers

2011-06-06 Thread blackthorne
thank you On Jun 6, 11:15 pm, Massimo Di Pierro wrote: > look into gluon/contrib/comet_messaging.py > > On Jun 6, 5:08 pm, blackthorne wrote: > > > > > hi > > > Let's say I have a component that gets the last 10 tweets from some > > list or that shows current CPU and memory metrics and requires

[web2py] Re: web2py corrupted files @ vps.net

2011-06-06 Thread Carlos
Yes, I'm talking about my vps.net environment. Any ideas about why / how this type of corruption occurs?. Has anyone else experienced this problem before?. I'll check that utility, thanks Massimo. Carlos

[web2py] Re: OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Massimo Di Pierro
if there is agreement on one, please send me a patch. On Jun 6, 4:31 pm, "Sebastian E. Ovide" wrote: > Hi Mic, > > thanks for that. > > actually I've debugged web2py and figure it out for myself. There are two > easy ways to fix it (I've tried to add them to the book, but my account > doesn't all

[web2py] Re: components and timers

2011-06-06 Thread Massimo Di Pierro
look into gluon/contrib/comet_messaging.py On Jun 6, 5:08 pm, blackthorne wrote: > hi > > Let's say I have a component that gets the last 10 tweets from some > list or that shows current CPU and memory metrics and requires to be > cyclically reloaded once every 5 mins for example. How can I do th

[web2py] Re: web2py corrupted files @ vps.net

2011-06-06 Thread Massimo Di Pierro
I assume you are talking about your vps.net account. Not about the web2py.com account. This is a filesystem issue. I cannot help. Perhaps this help? http://linux.die.net/man/8/fsck On Jun 6, 4:22 pm, Carlos wrote: > Hi, > > I was testing my server environment (successfully) and all of the sudden

[web2py] components and timers

2011-06-06 Thread blackthorne
hi Let's say I have a component that gets the last 10 tweets from some list or that shows current CPU and memory metrics and requires to be cyclically reloaded once every 5 mins for example. How can I do this? Thank you Best regards

[web2py] Now everyone is Exec'ing :)

2011-06-06 Thread mikech
... As the blog entry goes on to point out, namedtuple is implemented by generating and exec'ing code for the classes it creates. I have a natural developer's distrust of exec, but as Raymond pointed out in a recent talk: execing code is not a security risk, execing untrusted code *is*. ... ht

Re: [web2py] OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Sebastian E. Ovide
Hi Mic, thanks for that. actually I've debugged web2py and figure it out for myself. There are two easy ways to fix it (I've tried to add them to the book, but my account doesn't allow me to edit it) 1) set username=False in auth.define_tables() 2) add email = user['username']+"@facebook.com" i

[web2py] web2py corrupted files @ vps.net

2011-06-06 Thread Carlos
Hi, I was testing my server environment (successfully) and all of the sudden I started to get errors. After some analysis I can see that several of web2py files somehow got *corrupted* ! These corrupted files retained the same size and date, but when you open them it's all NULL values ! For

Re: [web2py] Re: issue with field name id

2011-06-06 Thread Richard Vézina
GONE! Thanks Massimo! I appreciate. Richard On Mon, Jun 6, 2011 at 5:16 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Try again please. If this is fix, please close the thread. If not, > let'a take this private and report when fixed. > > On Jun 6, 4:10 pm, Richard Vézina wrote:

[web2py] Re: issue with field name id

2011-06-06 Thread Massimo Di Pierro
Try again please. If this is fix, please close the thread. If not, let'a take this private and report when fixed. On Jun 6, 4:10 pm, Richard Vézina wrote: > We progress... > > Traceback (most recent call last): >   File "/trunk/web2py/gluon/restricted.py", line 184, in restricted >     exec ccode

Re: [web2py] OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Michele Comitini
Hi Sebastian, copy from this example: http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg%2Fapplications%2FhelloFacebook and let me know mic 2011/6/6 Sebastian E. Ovi

[web2py] Re: issue with field name id

2011-06-06 Thread Massimo Di Pierro
can you please try once more... P.S. I keep answering posts by my messages do not show up. :-( On Jun 6, 3:43 pm, Richard Vézina wrote: > Traceback (most recent call last): >   File "/trunk/web2py/gluon/restricted.py", line 184, in restricted >     exec ccode in environment >   File "/trunk/web2

Re: [web2py] Re: issue with field name id

2011-06-06 Thread Richard Vézina
Traceback (most recent call last): File "/trunk/web2py/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/trunk/web2py/applications/sgddms/controllers/test.py", line 1334, in File "/trunk/web2py/gluon/globals.py", line 137, in self._caller = lambda f: f()

[web2py] Re: issue with field name id

2011-06-06 Thread Massimo Di Pierro
please re-send me the traceback sine that line in sqlhtml is not there. On Jun 6, 3:04 pm, Richard Vézina wrote: > Still there : Version 1.96.3 (2011-06-06 14:35:14) > > Richard > > On Mon, Jun 6, 2011 at 3:49 PM, Richard Vézina > wrote: > > > > > > > > > It does the problem on update... My creat

Re: [web2py] layout with submenu

2011-06-06 Thread Richard Vézina
Do you have a example (screenshot) of the glitch... I don't see any problem in the welcome app? Richard On Mon, Jun 6, 2011 at 4:15 PM, Manuele Pesenti wrote: > thank you Richard but the problem is the css code that in most or quite all > layouts does not defines proper classes to manage sub men

Re: [web2py] layout with submenu

2011-06-06 Thread Manuele Pesenti
thank you Richard but the problem is the css code that in most or quite all layouts does not defines proper classes to manage sub menu so if you use it you will obtain ugly effects... I'm not so skilled with css and I was looking for some layout that contains classes for submenu Sorry if my qu

Re: [web2py] Re: issue with field name id

2011-06-06 Thread Richard Vézina
Still there : Version 1.96.3 (2011-06-06 14:35:14) Richard On Mon, Jun 6, 2011 at 3:49 PM, Richard Vézina wrote: > It does the problem on update... My create form work well, deletion also > works. > > Richard > > > On Mon, Jun 6, 2011 at 3:29 PM, Richard Vézina < > ml.richard.vez...@gmail.com> w

[web2py] How to implement flags?

2011-06-06 Thread pbreit
Does anyone have any advice for the best way to implement flags? For example, auth_user.do_not_email=True Some options: 1) db.flags.do_not_email = True 2) db.auth_user.do_not_email = True 3) db.auth_user.flags={'do_not_email': True} 4) others? Does the "list" data type help out? I know in the "

Re: [web2py] Re: issue with field name id

2011-06-06 Thread Richard Vézina
It does the problem on update... My create form work well, deletion also works. Richard On Mon, Jun 6, 2011 at 3:29 PM, Richard Vézina wrote: > Nop! Still there... > > Maybe I have wrong build : > Version 1.96.3 (2011-06-06 13:58:28) > > Richard > > > On Mon, Jun 6, 2011 at 3:04 PM, Massimo Di P

[web2py] Re: issue with field name id

2011-06-06 Thread Massimo Di Pierro
Can you try again? On Jun 6, 2:29 pm, Richard Vézina wrote: > Nop! Still there... > > Maybe I have wrong build : > Version 1.96.3 (2011-06-06 13:58:28) > > Richard > > On Mon, Jun 6, 2011 at 3:04 PM, Massimo Di Pierro < > > > > > > > > massimo.dipie...@gmail.com> wrote: > > I think I fixed this i

[web2py] Re: using the DAL standalone

2011-06-06 Thread apple
I am on latest release 1.96.3 On Jun 6, 8:35 pm, Massimo Di Pierro wrote: > was released with 1.96.1 but perhaps broken soon after. SHould now be > fixed again. > > On Jun 6, 2:27 pm, Martín Mulone wrote: > > > > > > > > > No the model folders. I didn't know this exists. > > > 2011/6/6 apple >

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Alessandro Iob
Yes On 6/6/11 21:35 , Pierre Thibault wrote: 2011/6/6 Alessandro Iob mailto:alessandro@gmail.com>> No, it does not work. And the problem is not related to the *_DateTrackerImporter as I'm not using the track_changes options.* **I've made some tests and I've found that in _W

[web2py] Re: using the DAL standalone

2011-06-06 Thread Massimo Di Pierro
was released with 1.96.1 but perhaps broken soon after. SHould now be fixed again. On Jun 6, 2:27 pm, Martín Mulone wrote: > No the model folders. I didn't know this exists. > > 2011/6/6 apple > > > > > > > > > > > I ran that (assuming you meant refer to the databases folder). However > > it giv

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Pierre Thibault
2011/6/6 Alessandro Iob > No, it does not work. And the problem is not related to the > *_DateTrackerImporter > as I'm not using the track_changes options.* > > **I've made some tests and I've found that in _Web2pyImporter.__call__ the > code reaches the "import like 'from x import a, b, ...'" s

[web2py] Re: using the DAL standalone

2011-06-06 Thread Massimo Di Pierro
I think I fixed this in trunk. Please check. On Jun 6, 2:25 pm, apple wrote: > I ran that (assuming you meant refer to the databases folder). However > it gives an error: > > Traceback (most recent call last): >   File "C:\web2py\applications\crm\controllers\querytest.py", line 4, > in >     db

Re: [web2py] Re: issue with field name id

2011-06-06 Thread Richard Vézina
Nop! Still there... Maybe I have wrong build : Version 1.96.3 (2011-06-06 13:58:28) Richard On Mon, Jun 6, 2011 at 3:04 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I think I fixed this in trunk. Can you please check it? > > On Jun 6, 1:03 pm, Richard Vézina wrote: > > Hello, >

Re: [web2py] Re: using the DAL standalone

2011-06-06 Thread Martín Mulone
No the model folders. I didn't know this exists. 2011/6/6 apple > I ran that (assuming you meant refer to the databases folder). However > it gives an error: > > Traceback (most recent call last): > File "C:\web2py\applications\crm\controllers\querytest.py", line 4, > in >db = DAL('sqlite:

[web2py] Re: using the DAL standalone

2011-06-06 Thread apple
I ran that (assuming you meant refer to the databases folder). However it gives an error: Traceback (most recent call last): File "C:\web2py\applications\crm\controllers\querytest.py", line 4, in db = DAL('sqlite://storage.sqlite', folder='c:/web2py/applications/ crm/databases', auto_import

[web2py] Re: using the DAL standalone

2011-06-06 Thread Massimo Di Pierro
import sys sys.path.append("c:/web2py") from gluon import * db = DAL('sqlite://...', folder="c:/web2py/applications/crm/ models",auto_import=True) result = db(db["customer"]).select() print(result) On Jun 6, 2:05 pm, apple wrote: > I would like to be able to use the DAL to run standalone script

Re: [web2py] using the DAL standalone

2011-06-06 Thread Martín Mulone
I don't think you can do this now or soon I think because auth depends too much from session, response, and request and all of this are core of web2py. But you can access to the auth_user table using dal. 2011/6/6 apple > I would like to be able to use the DAL to run standalone scripts to > quer

[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Massimo Di Pierro
somebody email me the patch. :-) On Jun 6, 1:26 pm, Thadeus Burgess wrote: > What you have looked good. The exception looks like its pandocs fault not > the template system. > > -- > Thadeus > > > > > > > > On Mon, Jun 6, 2011 at 1:03 PM, Ryan Seto wrote: > > I see. > > > Would you like me to tr

[web2py] using the DAL standalone

2011-06-06 Thread apple
I would like to be able to use the DAL to run standalone scripts to query a database. I have managed to get this working by adding a "from gluon import *" to mymodel and running the code below: import sys sys.path.append("c:/web2py") sys.path.append("c:/web2py/applications/crm/models") from gluon

[web2py] Re: issue with field name id

2011-06-06 Thread Massimo Di Pierro
I think I fixed this in trunk. Can you please check it? On Jun 6, 1:03 pm, Richard Vézina wrote: > Hello, > > I just try my app with the 1.96.3 and I got a strange error : > > Traceback (most recent call last): >   File "/version_196-3/web2py/gluon/restricted.py", line 184, in restricted >     ex

Re: [web2py] How to start web2py server permanently

2011-06-06 Thread danto
2011/6/6 Pradeesh > I have installed web2py on a remote opensuse server 10.3 and I am > using a Putty to start the web2py server. But when i am closing the > Putty session in my machine, the web2py server is also closing. How do > I start web2py server permanantly. you should set up a server as

[web2py] How to start web2py server permanently

2011-06-06 Thread Pradeesh
I have installed web2py on a remote opensuse server 10.3 and I am using a Putty to start the web2py server. But when i am closing the Putty session in my machine, the web2py server is also closing. How do I start web2py server permanantly.

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Ryan Seto
If you could, let me try and get my solution to work. When I'm done, should I post a patch here in the group or should I email it directly to you? On Mon, Jun 6, 2011 at 2:26 PM, Thadeus Burgess wrote: > What you have looked good. The exception looks like its pandocs fault not > the template sys

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Thadeus Burgess
What you have looked good. The exception looks like its pandocs fault not the template system. -- Thadeus On Mon, Jun 6, 2011 at 1:03 PM, Ryan Seto wrote: > I see. > > Would you like me to try and come up with a patch for this? > > On Mon, Jun 6, 2011 at 1:53 PM, Thadeus Burgess > wrote: >

Re: [web2py] Working with Select Boxes.

2011-06-06 Thread Richard Vézina
It could help if you show us your view and controller code... Richard On Mon, Jun 6, 2011 at 2:17 PM, David J. wrote: > How do I persist the values in my Select Box? > > In my view I did > > {{=SELECT(range(10)) }} > > When I submit the form it returns to the first value. > > Thanks. > > >

[web2py] Working with Select Boxes.

2011-06-06 Thread David J.
How do I persist the values in my Select Box? In my view I did {{=SELECT(range(10)) }} When I submit the form it returns to the first value. Thanks.

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Ryan Seto
I see. Would you like me to try and come up with a patch for this? On Mon, Jun 6, 2011 at 1:53 PM, Thadeus Burgess wrote: > Yes.. > > You need some sort of response class that has a .write method... this can be > a hacked up cStringIO or other. > > Alternatively you can perform the same thing ma

[web2py] issue with field name id

2011-06-06 Thread Richard Vézina
Hello, I just try my app with the 1.96.3 and I got a strange error : Traceback (most recent call last): File "/version_196-3/web2py/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/version_196-3/web2py/applications/sgddms/controllers/test.py", line 1334, in

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Thadeus Burgess
Yes.. You need some sort of response class that has a .write method... this can be a hacked up cStringIO or other. Alternatively you can perform the same thing manually by passing in writer, which instead of the template engine writing ``response.write("%s")`` it could write whatever you want as

[web2py] Re: About auth.requires_membership()

2011-06-06 Thread Cesar Bustios
Wait, but it worked this way: @auth.requires(auth.has_membership('A') or auth.has_membership('B')) Thank you, Cesar B. On Jun 6, 12:40 pm, Cesar Bustios wrote: > It's not working :( > > On Jun 6, 12:35 pm, Joaquin Orbe wrote: > > > > > > > > > On Mon, Jun 6, 2011 at 2:03 PM, Cesar Bustios >

[web2py] Re: About auth.requires_membership()

2011-06-06 Thread Cesar Bustios
You were right Anthony. Thanks both of you On Jun 6, 12:42 pm, Cesar Bustios wrote: > Wait, but it worked this way: > > @auth.requires(auth.has_membership('A') or auth.has_membership('B')) > > Thank you, > > Cesar B. > > On Jun 6, 12:40 pm, Cesar Bustios wrote: > > > > > > > > > It's not working

Re: [web2py] About auth.requires_membership()

2011-06-06 Thread Anthony
On Monday, June 6, 2011 1:35:23 PM UTC-4, Joaquin Orbe wrote: > > Hi, > try this: > > @auth.requires(auth.requires_membership('A') or > auth.requires_membership('B')) > def X(): ... > I think it would need to be auth.has_membership, not auth.requires_membership (the latter is intended to be use

[web2py] Re: About auth.requires_membership()

2011-06-06 Thread Cesar Bustios
It's not working :( On Jun 6, 12:35 pm, Joaquin Orbe wrote: > On Mon, Jun 6, 2011 at 2:03 PM, Cesar Bustios wrote: > > Hi, is there a way to use this decorator with more than one group? For > > example if i need function X to be use with groups A and B: > > > @auth.requires_membership('A', 'B')

[web2py] Re: About auth.requires_membership()

2011-06-06 Thread Anthony
You may need to do: @auth.requires(auth.has_membership('A') or auth.has_membership('B')) See http://web2py.com/book/default/chapter/08#Combining-Requirements. Anthony On Monday, June 6, 2011 1:03:54 PM UTC-4, César Bustíos Benites wrote: > Hi, is there a way to use this decorator with more

Re: [web2py] About auth.requires_membership()

2011-06-06 Thread Joaquin Orbe
On Mon, Jun 6, 2011 at 2:03 PM, Cesar Bustios wrote: > Hi, is there a way to use this decorator with more than one group? For > example if i need function X to be use with groups A and B: > > @auth.requires_membership('A', 'B') > def X(): ... > > That doesn't work. How can I do that? > > Thanks >

Re: [web2py] Re: How to not show the "delete file" checkbox

2011-06-06 Thread Richard Vézina
I understand your need!! I just don't know neither how to do it... It was the only piece of the book I come up with after few reading and searching... I thought the option could make the file/delete box to desapered... Work around could to use jQuery to make the whole block to desapeare... Just

Re: [web2py] Re: How to not show the "delete file" checkbox

2011-06-06 Thread Anthony
It looks like the upload widget only displays the 'delete' checkbox if requires==[] or requires is IS_EMPTY_OR. So, if you set requires to any other validator, such as IS_IMAGE or IS_UPLOAD_FILENAME (or maybe a custom dummy validator if you don't really want/need any validation), the delete che

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Ryan Seto
Hm, that doesn't seem to be it either. I don't get a requirement for the globals module, but what I get back is this: ~ >>> print parse_template('view.html', path='templates', >>> context=dict(content='test')) response.write(content) response.write('\r\n', escape=False) ~ Am I supposed

Re: [web2py] Re: How to not show the "delete file" checkbox

2011-06-06 Thread Luis Goncalves
Hi Richard! I'm displaying the form to the user for them to update it. There are several fields in the form, and one of them is an image ('upload' field). I just don't want to display the "delete file" checkbox for the image, so that the user can't delete the image. They can upload a new

Re: [web2py] Janrain with existing accounts...

2011-06-06 Thread Bruno Rocha
On Mon, Jun 6, 2011 at 1:59 PM, Jason Brower wrote: > I have created an auth system with over 100+ users. They are happy to sign > in with what they have, but I would like to use janrain as well. Is it > possible to have both normal login or use a janrain signon? > BR, > Jason Brower Yes, it

[web2py] About auth.requires_membership()

2011-06-06 Thread Cesar Bustios
Hi, is there a way to use this decorator with more than one group? For example if i need function X to be use with groups A and B: @auth.requires_membership('A', 'B') def X(): ... That doesn't work. How can I do that? Thanks

[web2py] Janrain with existing accounts...

2011-06-06 Thread Jason Brower
I have created an auth system with over 100+ users. They are happy to sign in with what they have, but I would like to use janrain as well. Is it possible to have both normal login or use a janrain signon? BR, Jason Brower

[web2py] Re: RFC: validator IS_NOT_IN_SET

2011-06-06 Thread pbreit
Do validators have an opposite such as "not IS_IN_SET()"?

[web2py] Re: RFC: validator IS_NOT_IN_SET

2011-06-06 Thread Rip Ryness
I was looking for IS_NOT_IN_SET today and found this. Thanks.

Re: [web2py] Re: How to not show the "delete file" checkbox

2011-06-06 Thread Richard Vézina
Maybe you could try autodelete : http://web2py.com/book/default/chapter/07?search=upload+#autodelete Really not sure it will work, but you could try... But if your record is deleted you file will be deleted too no matter if it is

[web2py] Re: custom form with validation

2011-06-06 Thread Anthony
Maybe you could use an onvalidation function (see http://web2py.com/book/default/chapter/07#onvalidation). You might also consider adding the extra fields directly to the form object (see http://web2py.com/book/default/chapter/07#Adding-extra-form-elements-to-SQLFORM) instead of in the view, w

[web2py] Re: How to not show the "delete file" checkbox

2011-06-06 Thread Luis Goncalves
Thanks for the reply! I tried that, but it didn't do what I want. I wasn't very clear in explaining what I'm trying to do (sorry about that!). I have a file upload field in my SQLFORM, and it has a "choose file" button, and right next to it a [file| (chk-box) delete] element.. I want to ge

Re: [web2py] Re: still with problems at 1.96.3: is_active column not found

2011-06-06 Thread danto
2011/6/5 danto > 2011/6/5 Massimo Di Pierro > >> You have migrations set to False. web2py needs to create a field >> called is_active. Before it was called active and that created >> problems. >> >> > but my app is not that old... :3 I developed the application little time > ago (1.94~95) and th

[web2py] Re: Merging multiple accounts

2011-06-06 Thread sebastian
I guess that you need to implement it for your self...

[web2py] custom form with validation

2011-06-06 Thread David J.
I am trying to figure out how I can do validation on a custom form I have an order form; I need to set credit card expiration date as MM I have 2 fields 'expire_month' and 'expire_year' In my layout I manually added 2 select boxes; Jan ... 2011 ... I need some idea how to validate

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Alessandro Iob
No, because the web2py code (under Windows only) keeps trying to import it in lowercase. I can just rename the application (and it works that way), but I think this is just a workaround and not a solution to a problem that should not exist. On 6/6/11 17:44 , Pierre Thibault wrote: 2011/6/6 Al

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-06 Thread Thadeus Burgess
What you really want is template.parse_template. Still requires restricted but only for the exception raising. Very simple. from template import parse_template print parse_template('main.html', path='/path/to/custom/views/', context=dict()) -- Thadeus On Mon, Jun 6, 2011 at 12:55 AM, Massim

[web2py] Re: See a new GAE site that we developed with some web2py...

2011-06-06 Thread sebastian
I'd like to try it but granting access to me wall. m...

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Pierre Thibault
2011/6/6 Alessandro Iob > Found something: the application folder is named 'Castalia' with the first > char in uppercase, while the importer tries to import it as > 'applications.castalia', in lowercase. > > I've tried from the python shell to import using applications.Castalia. > and it

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Alessandro Iob
Found something: the application folder is named 'Castalia' with the first char in uppercase, while the importer tries to import it as 'applications.castalia', in lowercase. I've tried from the python shell to import using applications.Castalia. and it worked. On 6/6/11 17:06 , Pierr

Re: [web2py] Re: component refresh with jQuery UI tab plugin

2011-06-06 Thread Richard Vézina
Hello Massimo, Was it available in 1.94.6?? I try all sort of things and can't makes it work... No refresh. Richard On Fri, Jun 3, 2011 at 10:02 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Give a name to your components > > {{=LOAD(...,target='one')}} > {{=LOAD(...,target='two

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-06 Thread Alessandro Iob
I've tested it with a python 2.6 interpreter. It returns the same error as in web2py. I've also created a simple module under applications/castalia/modules but I can not import it too. On 6/6/11 17:06 , Pierre Thibault wrote: import sys sys.path.append("C:\w2p\web2py") import applications.

[web2py] OAuth2.0 and Facebook (as from the book)

2011-06-06 Thread Sebastian E. Ovide
Hi All, just wondering if the section "OAuth2.0 and Facebook" of the book is up to date? I following it's instructions but I'm getting an "Internal error" to reproduce 1) get last web2py 1.196.3 2) follow the instructions from the book 2.a) get facebook and place it in modules 2.b) copy the cod

  1   2   >