[web2py] Re: storing hierarchical data in web2py database

2010-07-16 Thread Iceberg
Just a quick thought. 1. Each plugin's owner can store the source code in code.google.com 2. Too bad that code.google.com can not provide a live show about the plugin's look-and-feel, so we can setup a plugins' sandbox on web2py.com, nightly checkout plugins' source code, then user can visit a

[web2py] web2py 1.81.1 is OUT

2010-07-16 Thread mdipierro
This is an important release. There are many small but very important changes: - Usual bug-fixes. - New welcome app with better look, superfish menu and jQuery 1.4.2 - Increased security. It means you can place {{=}} inside tag attributes without worry about injections. Thanks Craig Youkins

[web2py] Re: Best way for a config file

2010-07-16 Thread Iceberg
On Jul13, 3:06pm, Narendran gunanar...@gmail.com wrote: Hi, I have been trying to work without a config file, but it is a little difficult to work across multiple (dev, test and prod) envs. I'd like to know the solution if this has been already discussed: 1. The db configuration in db.py

Re: [web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mat --
After commenting out the new code at the bottom of db.py in order to enable OpenID and adding an API key and domain, I can as a result see the OpenID logo in the welcome page when clicking the login link. However, when I enter my OpenID username, it goes through the login process, but eventually

[web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mdipierro
Do you use embed=True or False? On 16 Lug, 02:15, mat -- mat...@gmail.com wrote: After commenting out the new code at the bottom of db.py in order to enable OpenID and adding an API key and domain, I can as a result see the OpenID logo in the welcome page when clicking the login link.

[web2py] Re: Menu Refresh

2010-07-16 Thread Iceberg
One more comment. If your app is simple enough (most are), to use just one controller, it does not have much difference between define your menu in models/menu.py or at the beginning of controllers/default.py, and the latter gives you most flexibility to control what your menu shows up. On Jul12,

Re: [web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mat --
I can't find the `embed=True` or `embed=False' setting in any of my files. Is it in 1.81.1? On Fri, Jul 16, 2010 at 10:36 AM, mdipierro mdipie...@cs.depaul.edu wrote: Do you use embed=True or False? On 16 Lug, 02:15, mat -- mat...@gmail.com wrote: After commenting out the new code at the

[web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mdipierro
It is an argument of RPXAccount. Defaults to true. I have no idea why it does not work for you. Perhaps MrFreeze can help... I am about to catch a plane. I will read more tonight. On 16 Lug, 03:10, mat -- mat...@gmail.com wrote: I can't find the `embed=True` or `embed=False' setting in any of my

[web2py] Re: generic.load

2010-07-16 Thread Jonas Rundberg
Thank you, I've been trying to find more information about LOAD, web2py_component, web2py_ajax_page and web2py_trap_form, but I still don't get the big picture. What are the web2py_components? When should I use LOAD?... I'm using ajax, but when should I use the above instead of a 'standard'

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread David Marko
I updated web2py but it breaks my app. This is what I got for standard login dialog. (no rpx_account login used, app remained unchanged) Traceback (most recent call last): File c:\java\google_appengine\web2py\gluon\restricted.py, line 178, in restricted exec ccode in environment File

Re: [web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mat --
I found the argument in rpx_account.py and changed it. But issue is the same for True and False. FYI i am getting this in console when running trunk version: please visit: http://127.0.0.1:8000 use kill -SIGTERM 6952 to shutdown the web2py server

[web2py] Re: csv: a showstopper for me. Is there another way?

2010-07-16 Thread Iceberg
On Jul13, 6:51am, mdipierro mdipie...@cs.depaul.edu wrote: errata db.define_table('animal',Field('name')) def index(): form=SQLFORM.factory(Field('name',default=request.vars.name,requires=IS_NOT _EMPTY()))     if form.accepts(request.vars):        

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread David Marko
The same problem is on all apps I have. David On 16 čnc, 10:21, David Marko dma...@tiscali.cz wrote: I updated web2py but it breaks my app. This is what I got for standard login dialog. (no rpx_account login used, app remained unchanged) Traceback (most recent call last):   File

[web2py] Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread Narendran
Hi, I am not sure where the problem is. I am using rpxauth in the plugin_comments plugin. I have placed comments plugin in some page (not index.html). But after login using rpxauth, I am getting redirected to default/index. Can you please let me know if this is the expected beviour in one of these

[web2py] w3p_fc bug?

2010-07-16 Thread Jonas Rundberg
Hi In sqlhtml.py, SQLFORM: the comment field's class is w3p_fc. Should't this be w2p_fc to be consistent with w2p_fl and w2p_fw? cheers / jonas

[web2py] Re: generic.load

2010-07-16 Thread selecta
maybe this will help a bit understanding the different components http://www.web2pyslices.com/main/slices/take_slice/74 On Jul 16, 10:19 am, Jonas Rundberg jo...@rundberg.com wrote: Thank you, I've been trying to find more information about LOAD, web2py_component, web2py_ajax_page and

[web2py] forcing request.vars.something to be a list

2010-07-16 Thread ae
I've been doing this: if not isinstance(request.vars.things, list): request.vars.things = [request.vars.things] for thing in things: ... Is there a way to force a var to be a list? I would rather always do request.vars.thing[0] for a single value than have to use isinstance().

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Narendran
On my case, after upgrade, and trying to use rpx, I get this error: Traceback (most recent call last): File /usr/lib/web2py/gluon/restricted.py, line 178, in restricted exec ccode in environment File /usr/lib/web2py/applications/deals/controllers/default.py, line 156, in module File

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Narendran
I guess in rpx_account.py, the __init__ parameter url has to be changed to login_url to conform with auth in tools.py. On Jul 16, 6:16 pm, Narendran gunanar...@gmail.com wrote: On my case, after upgrade, and trying to use rpx, I get this error: Traceback (most recent call last):   File

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Narendran
Hi, Yes, that was in fact the issue. On fixing that it works. Now, onto David's problem :). On Jul 16, 6:28 pm, Narendran gunanar...@gmail.com wrote: I guess in rpx_account.py, the __init__ parameter url has to be changed to login_url to conform with auth in tools.py. On Jul 16, 6:16 pm,

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread mr.freeze
Line 1401 of tools.py needs to be changed (back) from... if self.settings.login_form: to... else: It didn't affect my test app because it already used CAS. On Jul 16, 3:44 am, David Marko dma...@tiscali.cz wrote: The same problem is on all apps I have. David On 16 čnc, 10:21, David

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread mr.freeze
Have you tried setting this?: auth.settings.login_next = URL(...) On Jul 16, 7:18 am, Narendran gunanar...@gmail.com wrote: Hi, I am not sure where the problem is. I am using rpxauth in the plugin_comments plugin. I have placed comments plugin in some page (not index.html). But after login

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread Narendran
Hi, I have upgraded to 1.81.1, and even there, I face the same problem. On Jul 16, 5:18 pm, Narendran gunanar...@gmail.com wrote: Hi, I am not sure where the problem is. I am using rpxauth in the plugin_comments plugin. I have placed comments plugin in some page (not index.html). But after

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Narendran
Looks like there is no get_user method in default Auth. I find a get_or_create_user. May be the name was modified in the recent checkins. On Jul 16, 6:34 pm, mr.freeze nat...@freezable.com wrote: Line 1401 of tools.py needs to be changed (back) from...     if self.settings.login_form: to...  

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread mr.freeze
Auth redirects to 'index' after login by default unless you change this: auth.settings.login_next = URL(...) On Jul 16, 8:45 am, Narendran gunanar...@gmail.com wrote: Hi, I have upgraded to 1.81.1, and even there, I face the same problem. On Jul 16, 5:18 pm, Narendran gunanar...@gmail.com

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread mr.freeze
You can just change line 1401 of tools.py to 'else:' and it should work. On Jul 16, 8:48 am, Narendran gunanar...@gmail.com wrote: Looks like there is no get_user method in default Auth. I find a get_or_create_user. May be the name was modified in the recent checkins. On Jul 16, 6:34 pm,

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread Narendran
Did that now. Still doesn't work. On Jul 16, 6:37 pm, mr.freeze nat...@freezable.com wrote: Have you tried setting this?: auth.settings.login_next = URL(...) On Jul 16, 7:18 am, Narendran gunanar...@gmail.com wrote: Hi, I am not sure where the problem is. I am using rpxauth in the

[web2py] several erros in http://web2py.com/plugins/

2010-07-16 Thread selecta
here are some screenshots of erros that I got when trying out the plugins http://jaguar.biologie.hu-berlin.de/~fkrause/plugin_error_screenshots.zip

Re: [web2py] forcing request.vars.something to be a list

2010-07-16 Thread Vasile Ermicioi
request.vars is not a list, it is an object which have properties it is like a dict not like a list and list(request.vars) is a list of properties, not of values like dict().keys()

[web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mr.freeze
OpenID works for me. Did you create your own profile mapping for OpenID or just use the default? Can you verify that your OpenID persona has the basic information set? On Jul 16, 3:31 am, mat -- mat...@gmail.com wrote: I found the argument in rpx_account.py and changed it. But issue is the same

[web2py] Re: OpenID, facebook, twitter, linkedin, etc etc

2010-07-16 Thread mr.freeze
Also, does this only happen with OpenID? On Jul 16, 9:22 am, mr.freeze nat...@freezable.com wrote: OpenID works for me.  Did you create your own profile mapping for OpenID or just use the default? Can you verify that your OpenID persona has the basic information set? On Jul 16, 3:31 am, mat

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread Narendran
I had to set the token_url in user function actually. But am facing some issue with request.vars on getting the redirect from rpxnow. This is the initial request to the page that contains the login link: / APP/default/getOfferDetails?offerId=192 Now in the user function, I am setting the

[web2py] a question

2010-07-16 Thread VP
I'm a newbie. From the documentation, url mapping is done like this URL: default/f/a/b Controller: def f(): x = request.argument(0) ## a y = request.argument(1) ## b Why can we simplify it with this: def f ( x, y ): ... such that a and b are automatically assigned to x and y?

[web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread VP
well, i should have read this thread before upgrading. Hope to see 1.81.2 soon. On Jul 16, 8:53 am, mr.freeze nat...@freezable.com wrote: You can just change line 1401 of tools.py to 'else:' and it should work. On Jul 16, 8:48 am, Narendran gunanar...@gmail.com wrote: Looks like there is

[web2py] Re: Not getting redirected to referrer page after rpxauth login in plugin_comments

2010-07-16 Thread mr.freeze
If you're using the rpx auth from here: http://www.web2pyslices.com/main/slices/take_slice/28 ...your token url should look something like this: rpxauth.token_url = http://localhost:8000/[your app]/default/user/ login On Jul 16, 10:02 am, Narendran gunanar...@gmail.com wrote: I had to set the

[web2py] Re: forcing request.vars.something to be a list

2010-07-16 Thread ae
I never said request.vars is a list. If I have a multiple select box on a page and one entry is selected then I get a string. If multiple entries are selected, I get a list of strings. That's not good. select multiple name=things option value=oneOne/option option value=twoTwo/option

Re: [web2py] Re: forcing request.vars.something to be a list

2010-07-16 Thread Jonathan Lundell
On Jul 16, 2010, at 8:53 AM, ae wrote: I never said request.vars is a list. If I have a multiple select box on a page and one entry is selected then I get a string. If multiple entries are selected, I get a list of strings. That's not good. select multiple name=things option

Re: [web2py] a question

2010-07-16 Thread Vasile Ermicioi
in some cases that would be nice, but web2py comes with 2 terms : arguments and variables, and how can framework know you want x, y = request.vars.x, request.vars.y or x,y = request.args[:2]

[web2py] Re: generic.load

2010-07-16 Thread Rob
Hi, My noobness is not seeing the difference between when calling controller functions using {{=LOAD(request.controller,'someaction.load')}} vs {{=LOAD(request.controller,'someaction')}} as discussed here:

[web2py] Re: the new '_last_reference' property begs a 'nativeRef' type

2010-07-16 Thread dlypka
OK, will do. On Jul 12, 11:19 am, mdipierro mdipie...@cs.depaul.edu wrote: Please propose a patch. On 10 Lug, 13:13, dlypka dly...@gmail.com wrote: # I believe the new '_last_reference' property still needs a 'nativeRef' type # added to web2py in order to take full advantage of it:

[web2py] Installing/packing from source

2010-07-16 Thread Yarin
I'm trying to install an existing application from source code I pulled off of bitbucket: http://bitbucket.org/hc/w2popenid/get/3fc7570ecc85.zip Guess I'm not clear on the process. Is it enough to unzip the source into a directory under ../web2py/applications/ ? I did that, and the application

[web2py] Bug in 1.81.1

2010-07-16 Thread Jose
When I use auth.define_tables(username=True) fails Traceback (most recent call last): File /usr/home/jose/web2py/gluon/restricted.py, line 178, in restricted exec ccode in environment File /usr/home/jose/web2py/applications/csr/models/db.py, line 30, in module

[web2py] Re: Installing/packing from source

2010-07-16 Thread mr.freeze
Unzipping to web2py/applications is sufficient. It looks like the application name is hard-coded as 'cas'. Did you name it something else? On Jul 16, 1:05 pm, Yarin ykess...@gmail.com wrote: I'm trying to install an existing application from source code I pulled off of

[web2py] Re: a question

2010-07-16 Thread VP
I would think the arguments become parameters as mentioned above; and the variables would become local variables. automatically. But therre might be some security problems? On Jul 16, 11:35 am, Vasile Ermicioi elff...@gmail.com wrote: in some cases that would be nice, but web2py comes with

[web2py] Re: Installing/packing from source

2010-07-16 Thread Yarin
Where do you see the application name, and what difference does it make? On Jul 16, 2:37 pm, mr.freeze nat...@freezable.com wrote: Unzipping to web2py/applications is sufficient.  It looks like the application name is hard-coded as 'cas'. Did you name it something else? On Jul 16, 1:05 pm,

[web2py] Re: Installing/packing from source

2010-07-16 Thread Yarin
I see- yeah there were some mid-hardcoded import statements- fixed them and now I can access edit screens. Can you show me an example of using the local_import function? On Jul 16, 3:11 pm, mr.freeze nat...@freezable.com wrote: If you look in db.py of the application you will see: from

[web2py] Re: Installing/packing from source

2010-07-16 Thread mr.freeze
Sure. To make this app work with any app name you would modify db.py: openid = local_import('w2popenid') oid_login = openid.OpenIDLogin(URL(r=request, c='default', f='openID'), globals()) On Jul 16, 2:44 pm, Yarin ykess...@gmail.com wrote: I see- yeah there were some mid-hardcoded import

Re: [web2py] Bug in 1.81.1

2010-07-16 Thread Phyo Arkar
Huston we have problem!! All my auth broke And Form submittion freezes???!! Traceback (most recent call last): File /home/v3ss/workspace-bbb/web2py-clone/gluon/restricted.py, line 178, in restricted exec ccode in environment File

Re: [web2py] Bug in 1.81.1

2010-07-16 Thread Phyo Arkar
And why CAS ? I dont use CAS at all.. On Fri, Jul 16, 2010 at 8:34 PM, Phyo Arkar phyo.arkarl...@gmail.comwrote: Huston we have problem!! All my auth broke And Form submittion freezes???!! Traceback (most recent call last ): File

Re: [web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Phyo Arkar
same to mee too.. i updated on my production site and screwed :(.. On Fri, Jul 16, 2010 at 3:43 PM, VP vtp2...@gmail.com wrote: well, i should have read this thread before upgrading. Hope to see 1.81.2 soon. On Jul 16, 8:53 am, mr.freeze nat...@freezable.com wrote: You can just change

[web2py] Re: Bug in 1.81.1

2010-07-16 Thread mr.freeze
Please try changing line 1401 of tools.py from: if self.settings.login_form: to... else: Not sure why this line was changed but it seems to be the problem. On Jul 16, 3:34 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote: And why CAS ? I dont use CAS at all.. On Fri, Jul 16, 2010 at 8:34

[web2py] Re: Installing/packing from source

2010-07-16 Thread Yarin
Works! -thanks alot for your help On Jul 16, 3:58 pm, mr.freeze nat...@freezable.com wrote: Sure. To make this app work with any app name you would modify db.py: openid = local_import('w2popenid') oid_login = openid.OpenIDLogin(URL(r=request, c='default', f='openID'), globals()) On Jul 16,

[web2py] Re: general design question

2010-07-16 Thread MikeEllis
All in default.py is quick and easy during the early stages of development but I find it gets messy later on. It's not too bad moving controllers from default.py into their own modules. You just have to remember to move your view files and change your redirect() calls as needed to accommodate

[web2py] Custom validator apparently not being called

2010-07-16 Thread MikeEllis
I've got a controller that presents the user with a ckeditor field that lets them use a limited set of html markup. The editor returns an empty paragraph if they press Submit without typing anything, ie, 'p/p' , and my app needs to reject that. So I wrote a custom validator as follows:

[web2py] Re: Custom validator apparently not being called

2010-07-16 Thread mr.freeze
Do you get the same behavior when removing the ckeditor widget from the field? Your validator worked for me and the __call__ method was hit. On Jul 16, 5:07 pm, MikeEllis michael.f.el...@gmail.com wrote: I've got a controller that presents the user with a ckeditor field that lets them use a

[web2py] Re: general design question

2010-07-16 Thread Rob
Thanks Mike, that's kind of what I figured. On Jul 16, 2:35 pm, MikeEllis michael.f.el...@gmail.com wrote: All in default.py is quick and easy during the early stages of development but I find it gets messy later on.  It's not too bad moving controllers from default.py into their own modules.  

[web2py] Re: Custom validator apparently not being called

2010-07-16 Thread MikeEllis
Solved the problem, though I'm still not quite sure what was wrong to begin with. I did away with using a custom widget to install the ckeditor and handled it in the view instead: li{{=form.custom.widget.edited}}/li script type=text/javascript CKEDITOR.replace(no_table_edited, {

Re: [web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Bruno Rocha
I ike the new visual style, just think it should be centralized or fluid. strings of the README are not all being very well translated into Portuguese, I can send you the language file for that. why the administration interface does not have the same new visual style of welcome app? 2010/7/16

Re: [web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Thadeus Burgess
One thing Ive learned. NEVER update your production code to the latest version. ALWAYS find a stable release, and stick to it until you can test another stable release 100%. Honestly I would stay away from upgrading at all unless you are needing a new feature. Typically new features in web2py