[web2py:27489] Re: removing default from URL

2009-07-27 Thread mdipierro
Yes. This comes up often. We need better documentation in this issue. http://groups.google.com/group/web2py/browse_thread/thread/70781a88187fa45/c14de5b69d40b9c4 Massimo On Jul 28, 12:47 am, Mahbub wrote: > Can anyone tell me how do I easily remove the default method for any > controller ? I w

[web2py:27488] removing default from URL

2009-07-27 Thread Mahbub
Can anyone tell me how do I easily remove the default method for any controller ? I would like an url like example.com/users/view/john-doe not example.com/default/users/view/john-doe. Anyone done this in web2py? --~--~-~--~~~---~--~~ You received this message becau

[web2py:27487] Re: Table reference question

2009-07-27 Thread mdipierro
You can but you would lose refence integrity: db.definetable('student', db.Field('student_id', 'integer'), db.Field('first_name', 'string'), db.Field('last_name', 'string)) db.definetable('tasks', db.Field('student_id', 'integer'), db.Field('task', 'string')) db.student.stud

[web2py:27486] Re: should I be decorating xmlrpc functions?

2009-07-27 Thread mdipierro
http://www.web2py.com/examples/default/tools#services On Jul 27, 8:43 pm, rb wrote: > Well I will be first in line to purchase your next version. Keep up > the *great* work. I'm a newbie, I know, but there's still much that > isn't answered by the docs, so please be patient with my questions: >

[web2py:27485] Re: Web2py development at a standstill

2009-07-27 Thread mdipierro
Why setting these parameters? -n 1 -o 5000 one thread only? Why not just leave the default parameters? Massimo On Jul 27, 8:39 pm, rb wrote: > Thx. I am *really* relieved that web2py doesn't need to be run as > root. I think my problem was that __init__.pyc got *somehow* owned by > root and

[web2py:27484] Re: Table reference question

2009-07-27 Thread rb
I believe that if you want to use the DAL's reference then you must reference the foreign table's row via its id field (this hidden field). If you want use a different field then you must construct a join. Something like: q = db(db.tasks.student_id==db.student.student_id) #this 'row selection' c

[web2py:27483] Re: web2py development and deployment

2009-07-27 Thread rb
Hi there. I'm developing a wxPython thick client app coupled to web2py via xmlrpc. I've put the web2py svr on my hp Ubuntu 9.04 laptop and it also runs virtualbox with a winXP guest OS, within which I run my thick client. I put the virtualbox into bridge mode so that client and svr are on the same

[web2py:27482] Re: web2py development and deployment

2009-07-27 Thread Anand Vaidya
I don't claim to be an advanced user of web2py however On Jul 28, 11:59 am, Randell wrote: > Hi guys, > \>    - What OSes do you use? (which flavor of Linux, which Windows version, >    does anybody here use a Mac?) And why? Just Linux. Kubuntu 9.04. CentOS5, Oracle EL5 => need to compile

[web2py:27481] web2py development and deployment

2009-07-27 Thread Randell
Hi guys, How do you setup your web2py development environment? Of course, we all know that we don't need complicated setup to develop web2py since it has its own coding area. But I'm sure some of us use our favorite IDEs and plugins to make development easier and faster. - What OSes do you us

[web2py:27480] Table reference question

2009-07-27 Thread Alastair Medford
I've been looking into creating a table reference (or foreign key) in web2py and have only found db.Field('name', db.otherTable). Now as I understand it, this creates an integer field in the table that contains the "hidden" web2py integer id of the entry in the other table. Is this the case? If s

[web2py:27479] Re: should I be decorating xmlrpc functions?

2009-07-27 Thread rb
Well I will be first in line to purchase your next version. Keep up the *great* work. I'm a newbie, I know, but there's still much that isn't answered by the docs, so please be patient with my questions: 1. Ok one of my xmlrpc functions is "xrGetColDefs" - how would I decorate this? @services.xm

[web2py:27478] Re: Web2py development at a standstill

2009-07-27 Thread rb
Thx. I am *really* relieved that web2py doesn't need to be run as root. I think my problem was that __init__.pyc got *somehow* owned by root and then web2py wouldn't run unless it was root. I've now successfully gotten it up and running (***finally***) as a non-root user (yeah, I de-installed ever

[web2py:27477] Re: Help importing module (google chart wrapper)

2009-07-27 Thread mdipierro
No, No. If you need to use third party packages you must run from source. Assuming you do it... There are three places to put modules: 1) web2py/applications/XXX/modules 2) web2py/ 3) The Python site-packages folder (that is where they go when installed with easy_install) 1) should only be used

[web2py:27476] Re: components in views

2009-07-27 Thread mdipierro
Yes, #in controller def myaction(): return dict(piechartcomponentdata = [2,3,4,7,8,9]) #in view {{if 'piechartcomponentdata' in globals():}} {{=piechartcomponentdata}} {{pass}} Massimo On Jul 27, 3:21 pm, Dan wrote: > sounds like you could use the response.vars dictionary to pass th

[web2py:27475] Re: Web2py development at a standstill

2009-07-27 Thread mdipierro
NO. Running web2py as root is a very bad idea. Your problem does not look like a web2py problem but, assuming it is, it is possible that you run it as root (not good) and not you are running as a user (good) but you do not have permissions to read the files web2py created (for example the apps).

[web2py:27474] Re: should I be decorating xmlrpc functions?

2009-07-27 Thread mdipierro
You should not decorate call but you should decorate functions you want to expose via the "call" handler. This is not the the book but it will be in the new book, very soon Massimo On Jul 27, 2:05 pm, rb wrote: > The example code in a controller contains the call() function as shown > below. >

[web2py:27473] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
yes, that's what I thought. So I thought it would be easier to leave the library's code unchanged and put it in the path. thanks On Jul 27, 3:12 pm, Yarko Tymciurak wrote: > Oh - I see ... this module assumes it's installed;  you will need to change > not just __init__.py but also the import lin

[web2py:27472] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Yarko Tymciurak
Oh - I see ... this module assumes it's installed; you will need to change not just __init__.py but also the import line in GChart.py On Mon, Jul 27, 2009 at 5:07 PM, Yarko Tymciurak wrote: > you updated the __init__.py of GChartWrapper also? > > You have two choices - either modify this to wor

[web2py:27471] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Yarko Tymciurak
you updated the __init__.py of GChartWrapper also? You have two choices - either modify this to work as a web2py module, and be sure it deals with it's path, or - install it in the python path as a normal python module. Even if you are on a hosting service, you should be able to do local installs

[web2py:27470] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
Thanks Yarko, but that gives me the same error as before. On Jul 27, 2:14 pm, Yarko Tymciurak wrote: > On Mon, Jul 27, 2009 at 3:40 PM, Dan wrote: > > > Is the appropriate solution to put the library code in web2py/ and use > > this import statement? > > from GChartWrapper import * > > > that s

[web2py:27469] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Yarko Tymciurak
On Mon, Jul 27, 2009 at 3:40 PM, Dan wrote: > > Is the appropriate solution to put the library code in web2py/ and use > this import statement? > from GChartWrapper import * > > that seems to work, but I'd prefer to have the library in web2py/ > applications/myapp/modules/ then you will need to

[web2py:27468] Re: components in views

2009-07-27 Thread Yarko Tymciurak
whenever you return a dict() from a controller, you are able to send items to the associated view. For example, with something like: def hello(): name = db(db.person.id == ...).select(first_name) return dict( personname=name ) you pass 'name' to the view variable 'personname' in the view h

[web2py:27467] Re: Help importing module (google chart wrapper)

2009-07-27 Thread Dan
Is the appropriate solution to put the library code in web2py/ and use this import statement? from GChartWrapper import * that seems to work, but I'd prefer to have the library in web2py/ applications/myapp/modules/ On Jul 27, 12:24 pm, Dan wrote: > Hello- > I'd like to use some google charts (

[web2py:27466] Re: components in views

2009-07-27 Thread Dan
sounds like you could use the response.vars dictionary to pass the information you need. For instance, your controller could have this line: response.vars.piechartcomponentdata = [2,3,4,7,8,9] and then your view could have this: {{if piechartcomponentdata in response.vars:}} {{... draw your co

[web2py:27465] components in views

2009-07-27 Thread jcorbett
Is it possible to pass parameters to a view, as if it were a function? Basically I want to create components in my views, reusable parts, but may depend on on a variable for the data it renders. Any ideas on how to do this? --~--~-~--~~~---~--~~ You received this

[web2py:27464] Help importing module (google chart wrapper)

2009-07-27 Thread Dan
Hello- I'd like to use some google charts (http://code.google.com/apis/ chart/) in my web2py app. Instead of creating the URLs manually, I would prefer to use a wrapper library, and this one looks like a good candidate: http://code.google.com/p/google-chartwrapper/ So I tried to put the code from

[web2py:27463] Re: Web2py development at a standstill

2009-07-27 Thread Dan
Hi - I don't have the answer to your problem, but I can tell you that I'm running web2py's server with a non-root user (just my own regular user login) on ubuntu 9.04. I also run winpdb as the same user, and can attach and step through the web2py code with that. So it should be possible for you, t

[web2py:27462] should I be decorating xmlrpc functions?

2009-07-27 Thread rb
The example code in a controller contains the call() function as shown below. def call(): """ exposes services. for example: http:///[app]/default/call/jsonrpc decorate with @services.jsonrpc the functions to expose supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv

[web2py:27461] Web2py development at a standstill

2009-07-27 Thread rb
Arghhh I have been using eclipse (successfully up til now) to run the web2py svr (ubuntu 9.04 desktop) on a lan address of 192.168.0.155, connecting to a winXP client, also on the LAN. This allowed me to single step through my controller code and it was working... beautifully... I thi

[web2py:27460] Re: default colour

2009-07-27 Thread mdipierro
On Jul 27, 11:13 am, thegreygeek wrote: > I would try kate.  kate is the KDE editor and is very nice, comes with > color coded python syntax.   I am running > Ubuntu 9.4 and get errors every time I try to create a new app. > Therefore I am going back to Google App engine. I do not understand.

[web2py:27459] Re: default colour

2009-07-27 Thread thegreygeek
I would try kate. kate is the KDE editor and is very nice, comes with color coded python syntax. I am running Ubuntu 9.4 and get errors every time I try to create a new app. Therefore I am going back to Google App engine. Every thing just works, and there is now magic going on that I don't unde

[web2py:27458] Re: Internationalisation of Dropdown options

2009-07-27 Thread mdipierro
It was not a typo, they both work but the former example lets you fix the order. Massimo On Jul 27, 6:37 am, Fran wrote: > On Jul 24, 1:17 am, mdipierro wrote: > > > You can translate dropdowns using IS_IN_SET since its values are > > constant: > > IN_IN_SET(('key1','key2'),(T('value1'),T('val

[web2py:27457] Re: feature request: auth email to approver

2009-07-27 Thread Hans
Grazie Massimo! The following works well for my need: auth.settings.registration_requires_verification = True auth.settings.registration_requires_approval = True auth.messages.verify_email = \ 'Click on the link https://mydomain/fips/default/user/verify_email/%(key)s to verify your FIPS registr

[web2py:27456] Re: feature request: auth email to approver

2009-07-27 Thread Fran
On Jul 27, 1:25 am, mdipierro wrote: > auth.settings.registration_requires_approval = False > auth.settings.register_onaccept = lambda form: > auth.settings.mailer.send() A nice little recipe :) I have been thinking that currently we are limited in that only a single onaccept / onvalidation

[web2py:27455] Re: Internationalisation of Dropdown options

2009-07-27 Thread Fran
On Jul 24, 1:17 am, mdipierro wrote: > You can translate dropdowns using IS_IN_SET since its values are > constant: > IN_IN_SET(('key1','key2'),(T('value1'),T('value2'))) I guess this is a typo, which you meant as: IN_IN_SET({'key1':T('value1'), 'key2':T('value2')}) This seems to work well, tha

[web2py:27454] Re: interesting :)

2009-07-27 Thread Anand Vaidya
On Jul 27, 7:49 am, Oleg wrote: > 1) moonlight will do the same job on other platforms (as soon as it > will be completed :)) No, it does not. I have FF plus moonlight plugin - and the app fails with an error that SL>2 is needed, I have ML1.0 > 2) what do you mean? Best ignored until an ente

[web2py:27453] Re: Correction to Docs "from PHP to web2py" - return dict() ?

2009-07-27 Thread Yarko Tymciurak
On Mon, Jul 27, 2009 at 12:40 AM, mdipierro wrote: > > I fixed the example. Thanks for reporting the typo. > > @Yarko, the workflow image you refer to is here: > > http://www.web2py.com/examples/static/diagram1.png > > Massimo Thanks! > > > On Jul 26, 11:00 pm, Rob McC wrote: > > I am gettin

[web2py:27452] Re: OpenID for Web2Py

2009-07-27 Thread hcvst
Hi, when I first came across this post, I was working on a provider so I just posted my code. I think the only difference is that my version uses the Web2pyStore - the rest uses the Janrain Python openID library, just as Massimo's original implementation does. As I had a working example, I did n