[web2py:26723] Re: Authentication

2009-07-16 Thread FERNANDO VILLARROEL


Now it's works.

Thank you Massimo.

--- On Fri, 7/17/09, mdipierro  wrote:

> From: mdipierro 
> Subject: [web2py:26722] Re: Authentication
> To: "web2py Web Framework" 
> Date: Friday, July 17, 2009, 1:21 AM
> 
> OK. I think there is no problem then. Somebow the database
> was
> corrupted. Now everything should work. Let me know if not.
> 
> Massimo
> 
> On Jul 16, 11:13 pm, FERNANDO VILLARROEL 
> wrote:
> > > I suspect we have a major problem here:
> >
> > > "role" is a keyword in postgresql and I did not
> know about
> > > it. To
> > > check if this is the problem:
> >
> > > 1) remove the database
> > > 2) remove everything in databases/*
> > > 3) create the database again
> > > 4) go to appadmin and tell me which tables you
> see
> >
> > Done
> >
> > i see the following tables:
> >
> > db.tarifa
> > db.clientes
> > db.accountcode
> > db.pagos
> > db.proveedor
> > db.rutaproveedor
> > db.webuser
> > db.auth_user
> > db.auth_group
> > db.auth_membership
> > db.auth_permission
> > db.auth_event
> >
> > > Once we have identified the problem, we'll find
> a
> > > solution.
> >
> > > Massimo
> >
> > > On Jul 16, 9:49 pm, FERNANDO VILLARROEL 
> > > wrote:
> > > > Hello,
> >
> > > > I am using a database Postgres.
> >
> > > > > Can you show the entire traceback?
> >
> > > > Traceback (most recent call last):
> > > >   File
> > > "/home/fvillarroel/web2py/gluon/restricted.py",
> line 107, in
> > > restricted
> > > >     exec ccode in environment
> > > >   File
> > >
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> > > line 53, in 
> > > >   File
> "/home/fvillarroel/web2py/gluon/globals.py",
> > > line 80, in 
> > > >     self._caller = lambda f: f()
> > > >   File
> > >
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> > > line 32, in user
> > > >     return dict(form=auth())
> > > >   File
> "/home/fvillarroel/web2py/gluon/tools.py",
> > > line 436, in __call__
> > > >     return self.register()
> > > >   File
> "/home/fvillarroel/web2py/gluon/tools.py",
> > > line 745, in register
> > > >     group_id = self.add_group("user_%s" %
> > > form.vars.id, description)
> > > >   File
> "/home/fvillarroel/web2py/gluon/tools.py",
> > > line 1211, in add_group
> > > >     description=description)
> > > >   File
> "/home/fvillarroel/web2py/gluon/sql.py", line
> > > 1377, in insert
> > > >     self._db._execute(query)
> > > >   File
> "/home/fvillarroel/web2py/gluon/sql.py", line
> > > 726, in 
> > > >     self._execute = lambda *a, **b:
> > > self._cursor.execute(*a, **b)
> > > > ProgrammingError: no existe la relación
> > > «auth_group»
> >
> > > > > Do you get error even if
> > > > > auth.settings.create_user_groups=True?
> >
> > > > yes
> >
> > > > > If you use appadmin, do you see the
> auth_group?
> >
> > > > No
> > > > appadmin is the  front end for
> administrator?
> >
> > > > > On Jul 16, 4:29 pm, FERNANDO
> VILLARROEL 
> > > > > wrote:
> > > > > > Dear all.
> >
> > > > > > I am trying to use
> authentication:
> >
> > > > > >http://www.web2py.com/examples/default/tools
> >
> > > > > > I have the following code on my
> db.py:
> >
> > > > > > from gluon.tools import *
> > > > > > auth=Auth(globals(),db)      
>      #
> > > > > authentication/authorization
> >
> > > > > > # define custom tables
> (table_user_name is
> > > > > 'auth_user')
> > > > > > auth.settings.table_user =
> > > > >
> db.define_table(auth.settings.table_user_name,
> > > > > >     db.Field('first_name',
> > > length=128,default=''),
> > > > > >     db.Field('last_name',
> > > length=128,default=''),
> > > > > >     db.Field('email',
> > > length=128,default='',
> > > > > requires = [IS_EMAIL(),
> >
> > >
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
> > > > > >     db.Field('password',
> 'password',
> > > readable=False,
> > > > > label='Password', requires=CRYPT()),
> > > > > >    
> db.Field('registration_key',
> > > length=128,
> > > > > writable=False,
> > > readable=False,default=''),migrate=False)
> >
> > > > > > auth.define_tables()        
>      
> > >  # creates
> > > > > all needed tables
> > > > > >
> auth.settings.create_user_groups=False
> >
> > > > > > But the application return the
> next
> > > exception:
> >
> > > > > >   self._db._execute(query)
> > > > > >   File
> > > "/home/fvillarroel/web2py/gluon/sql.py", line
> > > > > 726, in 
> > > > > >     self._execute = lambda *a,
> **b:
> > > > > self._cursor.execute(*a, **b)
> > > > > > ProgrammingError: no existe la
> relación
> > > > > «auth_group»
> >
> > > > > > What is the struct of the table
> auth_group?
> >
> > > > > > what i am doing wrong?
> >
> > > > > > Any idea or how i can solved the
> problem.
> >
> > > > > > Fernando
> > 
> 


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send em

[web2py:26722] Re: Authentication

2009-07-16 Thread mdipierro

OK. I think there is no problem then. Somebow the database was
corrupted. Now everything should work. Let me know if not.

Massimo

On Jul 16, 11:13 pm, FERNANDO VILLARROEL 
wrote:
> > I suspect we have a major problem here:
>
> > "role" is a keyword in postgresql and I did not know about
> > it. To
> > check if this is the problem:
>
> > 1) remove the database
> > 2) remove everything in databases/*
> > 3) create the database again
> > 4) go to appadmin and tell me which tables you see
>
> Done
>
> i see the following tables:
>
> db.tarifa
> db.clientes
> db.accountcode
> db.pagos
> db.proveedor
> db.rutaproveedor
> db.webuser
> db.auth_user
> db.auth_group
> db.auth_membership
> db.auth_permission
> db.auth_event
>
> > Once we have identified the problem, we'll find a
> > solution.
>
> > Massimo
>
> > On Jul 16, 9:49 pm, FERNANDO VILLARROEL 
> > wrote:
> > > Hello,
>
> > > I am using a database Postgres.
>
> > > > Can you show the entire traceback?
>
> > > Traceback (most recent call last):
> > >   File
> > "/home/fvillarroel/web2py/gluon/restricted.py", line 107, in
> > restricted
> > >     exec ccode in environment
> > >   File
> > "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> > line 53, in 
> > >   File "/home/fvillarroel/web2py/gluon/globals.py",
> > line 80, in 
> > >     self._caller = lambda f: f()
> > >   File
> > "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> > line 32, in user
> > >     return dict(form=auth())
> > >   File "/home/fvillarroel/web2py/gluon/tools.py",
> > line 436, in __call__
> > >     return self.register()
> > >   File "/home/fvillarroel/web2py/gluon/tools.py",
> > line 745, in register
> > >     group_id = self.add_group("user_%s" %
> > form.vars.id, description)
> > >   File "/home/fvillarroel/web2py/gluon/tools.py",
> > line 1211, in add_group
> > >     description=description)
> > >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> > 1377, in insert
> > >     self._db._execute(query)
> > >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> > 726, in 
> > >     self._execute = lambda *a, **b:
> > self._cursor.execute(*a, **b)
> > > ProgrammingError: no existe la relación
> > «auth_group»
>
> > > > Do you get error even if
> > > > auth.settings.create_user_groups=True?
>
> > > yes
>
> > > > If you use appadmin, do you see the auth_group?
>
> > > No
> > > appadmin is the  front end for administrator?
>
> > > > On Jul 16, 4:29 pm, FERNANDO VILLARROEL 
> > > > wrote:
> > > > > Dear all.
>
> > > > > I am trying to use authentication:
>
> > > > >http://www.web2py.com/examples/default/tools
>
> > > > > I have the following code on my db.py:
>
> > > > > from gluon.tools import *
> > > > > auth=Auth(globals(),db)            #
> > > > authentication/authorization
>
> > > > > # define custom tables (table_user_name is
> > > > 'auth_user')
> > > > > auth.settings.table_user =
> > > > db.define_table(auth.settings.table_user_name,
> > > > >     db.Field('first_name',
> > length=128,default=''),
> > > > >     db.Field('last_name',
> > length=128,default=''),
> > > > >     db.Field('email',
> > length=128,default='',
> > > > requires = [IS_EMAIL(),
>
> > IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
> > > > >     db.Field('password', 'password',
> > readable=False,
> > > > label='Password', requires=CRYPT()),
> > > > >     db.Field('registration_key',
> > length=128,
> > > > writable=False,
> > readable=False,default=''),migrate=False)
>
> > > > > auth.define_tables()              
> >  # creates
> > > > all needed tables
> > > > > auth.settings.create_user_groups=False
>
> > > > > But the application return the next
> > exception:
>
> > > > >   self._db._execute(query)
> > > > >   File
> > "/home/fvillarroel/web2py/gluon/sql.py", line
> > > > 726, in 
> > > > >     self._execute = lambda *a, **b:
> > > > self._cursor.execute(*a, **b)
> > > > > ProgrammingError: no existe la relación
> > > > «auth_group»
>
> > > > > What is the struct of the table auth_group?
>
> > > > > what i am doing wrong?
>
> > > > > Any idea or how i can solved the problem.
>
> > > > > Fernando
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26721] Re: Authentication

2009-07-16 Thread FERNANDO VILLARROEL


> I suspect we have a major problem here:
> 
> "role" is a keyword in postgresql and I did not know about
> it. To
> check if this is the problem:
> 
> 1) remove the database
> 2) remove everything in databases/*
> 3) create the database again
> 4) go to appadmin and tell me which tables you see

Done

i see the following tables:

db.tarifa
db.clientes
db.accountcode
db.pagos
db.proveedor
db.rutaproveedor
db.webuser
db.auth_user
db.auth_group
db.auth_membership
db.auth_permission
db.auth_event

 
> Once we have identified the problem, we'll find a
> solution.
> 
> Massimo
> 
> 
> On Jul 16, 9:49 pm, FERNANDO VILLARROEL 
> wrote:
> > Hello,
> >
> > I am using a database Postgres.
> >
> > > Can you show the entire traceback?
> >
> > Traceback (most recent call last):
> >   File
> "/home/fvillarroel/web2py/gluon/restricted.py", line 107, in
> restricted
> >     exec ccode in environment
> >   File
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> line 53, in 
> >   File "/home/fvillarroel/web2py/gluon/globals.py",
> line 80, in 
> >     self._caller = lambda f: f()
> >   File
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py",
> line 32, in user
> >     return dict(form=auth())
> >   File "/home/fvillarroel/web2py/gluon/tools.py",
> line 436, in __call__
> >     return self.register()
> >   File "/home/fvillarroel/web2py/gluon/tools.py",
> line 745, in register
> >     group_id = self.add_group("user_%s" %
> form.vars.id, description)
> >   File "/home/fvillarroel/web2py/gluon/tools.py",
> line 1211, in add_group
> >     description=description)
> >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> 1377, in insert
> >     self._db._execute(query)
> >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> 726, in 
> >     self._execute = lambda *a, **b:
> self._cursor.execute(*a, **b)
> > ProgrammingError: no existe la relación
> «auth_group»
> >
> > > Do you get error even if
> > > auth.settings.create_user_groups=True?
> >
> > yes
> >
> > > If you use appadmin, do you see the auth_group?
> >
> > No
> > appadmin is the  front end for administrator?
> >
> >
> >
> > > On Jul 16, 4:29 pm, FERNANDO VILLARROEL 
> > > wrote:
> > > > Dear all.
> >
> > > > I am trying to use authentication:
> >
> > > >http://www.web2py.com/examples/default/tools
> >
> > > > I have the following code on my db.py:
> >
> > > > from gluon.tools import *
> > > > auth=Auth(globals(),db)            #
> > > authentication/authorization
> >
> > > > # define custom tables (table_user_name is
> > > 'auth_user')
> > > > auth.settings.table_user =
> > > db.define_table(auth.settings.table_user_name,
> > > >     db.Field('first_name',
> length=128,default=''),
> > > >     db.Field('last_name',
> length=128,default=''),
> > > >     db.Field('email',
> length=128,default='',
> > > requires = [IS_EMAIL(),
> > >
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
> > > >     db.Field('password', 'password',
> readable=False,
> > > label='Password', requires=CRYPT()),
> > > >     db.Field('registration_key',
> length=128,
> > > writable=False,
> readable=False,default=''),migrate=False)
> >
> > > > auth.define_tables()              
>  # creates
> > > all needed tables
> > > > auth.settings.create_user_groups=False
> >
> > > > But the application return the next
> exception:
> >
> > > >   self._db._execute(query)
> > > >   File
> "/home/fvillarroel/web2py/gluon/sql.py", line
> > > 726, in 
> > > >     self._execute = lambda *a, **b:
> > > self._cursor.execute(*a, **b)
> > > > ProgrammingError: no existe la relación
> > > «auth_group»
> >
> > > > What is the struct of the table auth_group?
> >
> > > > what i am doing wrong?
> >
> > > > Any idea or how i can solved the problem.
> >
> > > > Fernando
> > 
> 


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26720] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan

With a bit more tweaking, this is now working for me. It removes the "/
init" from the URL:

routes_in=(('/(?P.*)','/init/$a'),)
routes_out=(('/init/(?P.*)','/$a'),)

and I made these changes to GAE's app.yaml file:

## Comment these out because they depend on web2py using the
application name in the URL
#- url: /(?P.+?)/static/(?P.+)
#  static_files: applications/\1/static/\2
#  upload: applications/(.+?)/static/(.+)
#  secure: optional

### This one should work with the web2py routes.py which removes the
application name (/init) from URLs
- url: /static/(?P.+)
  static_files: applications/init/static/\1
  upload: applications/init/static/(.+)
  secure: optional



On Jul 16, 8:46 pm, mdipierro  wrote:
> Sorry typo. Hope I got it right now
>
> routes_in=(('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
> routes_out=(('/myapplicationname/mycontrollername/(?P.*)',('/
> $a'),)
>
> On Jul 16, 10:35 pm, Dan  wrote:
>
> > When restarting web2py with those 2 lines in routes.py, I'm getting
> > this error:
>
> > File ".../web2py-v1.65.0/gluon/rewrite.py", line 43, in rewrite
> >     for (k, v) in symbols['routes_in']:
> > ValueError: too many values to unpack
>
> > On Jul 16, 8:23 pm, mdipierro  wrote:
>
> > > Create a file web2py/routes.py and write in it:
>
> > > routes_in=('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
> > > routes_out=('/myapplicationname/mycontrollername/(?P.*)',('/$a'),)
>
> > > On Jul 16, 10:16 pm, Dan  wrote:
>
> > > > Is there a way to make the URLs used by a web2py application a bit
> > > > simpler when running GAE?
>
> > > > for example, this is the URL when using web2py's standard settings:
> > > > 1)http://myapp.appspot.com/myapplicationname/mycontrollername/myfunctio...
>
> > > > but it would be better to use this throughout (not simply a one-time
> > > > redirect, but a persistent aliasing across all controllers and
> > > > functions so that the user never sees "myapplicationname") :
> > > > 2)http://myapp.appspot.com/mycontrollername/myfunctionname
>
> > > > or even simpler:
> > > > 3)http://myapp.appspot.com/myfunctionname (which is defined in the
> > > > "default.py" controller)
>
> > > > I've seen a few conversations about this, but am confused as to
> > > > whether I should be working with GAE's app.yaml, or with web2py's
> > > > routes.py. Are there any considerations I should keep in mind?
>
> > > > The reason for this is to shorten the URL to make it easier to
> > > > remember and to be friendlier to search engine classification methods.
>
> > > > thanks
> > > > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26719] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread mdipierro

Sorry typo. Hope I got it right now

routes_in=(('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
routes_out=(('/myapplicationname/mycontrollername/(?P.*)',('/
$a'),)

On Jul 16, 10:35 pm, Dan  wrote:
> When restarting web2py with those 2 lines in routes.py, I'm getting
> this error:
>
> File ".../web2py-v1.65.0/gluon/rewrite.py", line 43, in rewrite
>     for (k, v) in symbols['routes_in']:
> ValueError: too many values to unpack
>
> On Jul 16, 8:23 pm, mdipierro  wrote:
>
> > Create a file web2py/routes.py and write in it:
>
> > routes_in=('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
> > routes_out=('/myapplicationname/mycontrollername/(?P.*)',('/$a'),)
>
> > On Jul 16, 10:16 pm, Dan  wrote:
>
> > > Is there a way to make the URLs used by a web2py application a bit
> > > simpler when running GAE?
>
> > > for example, this is the URL when using web2py's standard settings:
> > > 1)http://myapp.appspot.com/myapplicationname/mycontrollername/myfunctio...
>
> > > but it would be better to use this throughout (not simply a one-time
> > > redirect, but a persistent aliasing across all controllers and
> > > functions so that the user never sees "myapplicationname") :
> > > 2)http://myapp.appspot.com/mycontrollername/myfunctionname
>
> > > or even simpler:
> > > 3)http://myapp.appspot.com/myfunctionname (which is defined in the
> > > "default.py" controller)
>
> > > I've seen a few conversations about this, but am confused as to
> > > whether I should be working with GAE's app.yaml, or with web2py's
> > > routes.py. Are there any considerations I should keep in mind?
>
> > > The reason for this is to shorten the URL to make it easier to
> > > remember and to be friendlier to search engine classification methods.
>
> > > thanks
> > > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26718] Re: The 80/20 rule

2009-07-16 Thread Vidul Petrov

I suggest a similar website (actually the latter is a total copy of
the former), the work will be a motivation for many people to start
learning WEB2PY.
Also short intros to WEB2PY - probably what / how / when can be done
(more or less a cookbook).
And last but not least - how can anyone find a work with WEB2PY -
there are no projects, no search and demand announced, at least not
officially?

On Jul 17, 6:24 am, mdipierro  wrote:
> I am not familiar with those web sites. What do you suggest?
>
> On Jul 16, 10:18 pm, Vidul Petrov  wrote:
>
>
>
> > Hi Massimo,
>
> > I fully agree, everything is very well said IMHO.
>
> > Only one small addition - most of the MVC users have never even heard
> > about most of the features (not to mention the rich set that WEB2PY
> > offers).
>
> > Do you think that a website for WEB2PY like jobs.perl.org and
> > jobs.rubynow.com would help (probably some sample works should be
> > shown there also)?
>
> > Regards,
> > Vidul
>
> > On Jul 17, 5:49 am, mdipierro  wrote:
>
> > > Pareto (http://en.wikipedia.org/wiki/Pareto_principle) once said that
> > > 80% of effects come from 20% of causes. For software we can re-phrase
> > > as 80% of users use only 20% of features.
>
> > > These are not at all a scientific statements but you understand what
> > > they mean.
>
> > > We can add more and more features to web2py with the effect that:
> > > - web2py grows in complexity to the point that it becomes harder to
> > > maintain
> > > - web2py gets slower
> > > - I spend all my time reviewing patches instead of improving
> > > documentation
> > > - You spend all your time thinking how to improve web2py instead of
> > > building applications with it
> > > - Many of these improvement will not buy us a significant number of
> > > users.
>
> > > I am not trying to discourage people from submitting patches and I
> > > very very much appreciate people who have done so. Most if not all the
> > > patches that I have received were good and needed. I am sure I will
> > > continue to receive excellent patches.
>
> > > Yet, when discussing the roadmap it has to be clear that the point
> > > should not be adding new features. The goal should be locking existing
> > > features: make sure they are well documented, make sure there are no
> > > problems, make sure everything has tests.
>
> > > We also need a plugin system but that is not a new web2py feature.
> > > That is a set of specifications and naming conventions for writing
> > > models/views/controllers. It is possible that we may have to modify
> > > admin as result of these specs (in order to apply/remove plugins).
>
> > > Finally, this community has to do a better job at outreach. You should
> > > talk to your friends and blog about web2py. You must talk about the
> > > applications you build with it. We do not lack developers. We lack
> > > salesmen. This is not because we want to have more user but because
> > > more users means web2py is tested more, there will be more web2py
> > > jobs, and you (as early adopters) will have a better chance to sell
> > > your web2py based solutions.
>
> > > Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26717] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan

When restarting web2py with those 2 lines in routes.py, I'm getting
this error:

File ".../web2py-v1.65.0/gluon/rewrite.py", line 43, in rewrite
for (k, v) in symbols['routes_in']:
ValueError: too many values to unpack


On Jul 16, 8:23 pm, mdipierro  wrote:
> Create a file web2py/routes.py and write in it:
>
> routes_in=('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
> routes_out=('/myapplicationname/mycontrollername/(?P.*)',('/$a'),)
>
> On Jul 16, 10:16 pm, Dan  wrote:
>
> > Is there a way to make the URLs used by a web2py application a bit
> > simpler when running GAE?
>
> > for example, this is the URL when using web2py's standard settings:
> > 1)http://myapp.appspot.com/myapplicationname/mycontrollername/myfunctio...
>
> > but it would be better to use this throughout (not simply a one-time
> > redirect, but a persistent aliasing across all controllers and
> > functions so that the user never sees "myapplicationname") :
> > 2)http://myapp.appspot.com/mycontrollername/myfunctionname
>
> > or even simpler:
> > 3)http://myapp.appspot.com/myfunctionname (which is defined in the
> > "default.py" controller)
>
> > I've seen a few conversations about this, but am confused as to
> > whether I should be working with GAE's app.yaml, or with web2py's
> > routes.py. Are there any considerations I should keep in mind?
>
> > The reason for this is to shorten the URL to make it easier to
> > remember and to be friendlier to search engine classification methods.
>
> > thanks
> > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26716] Re: sending HTML emails

2009-07-16 Thread mdipierro

Thanks Brian. I may include your example in the new book since this is
very useful.

Massimo

On Jul 16, 10:27 pm, Brian M  wrote:
> Yes, using web2py's Mail() as you described probably works too. To be
> honest I just didn't bother trying but I suppose your Mail helper is
> likely just using smtplib in the background.  The sending part is
> easy, it's building the multi-part MIME message that I suspect has
> been tricky for people.
>
> I'll try to get this added to AlterEgo over the weekend.
>
> On Jul 16, 9:59 pm, mdipierro  wrote:
>
> > This is useful.
> > In principle you could just use:
>
> > mail=Mail()
> > mail.send(to..., subject,..., message=message.as_string())
>
> > or am I missing something?
> > Would you post an entry in AlterEgo?
>
> > Massimo
>
> > On Jul 16, 9:53 pm, Brian M  wrote:
>
> > > I've found a solution for sending multi-part emails (text & html) and
> > > even embedded images.
>
> > > In your controller (or a custom module)
>
> > > from email.MIMEMultipart import MIMEMultipart
> > > from email.MIMEText import MIMEText
> > > from email.MIMEImage import MIMEImage
>
> > > #helper function to build a multi-part mime email
> > > def _multipart_email(sender, recipient, subject, message_text,
> > > message_html, attach_image):
> > >     #Taken fromhttp://code.activestate.com/recipes/473810/withvery
> > > minor changes
>
> > >     # Define these once; use them twice!
> > >     strFrom = sender
> > >     strTo = recipient
>
> > >     # Create the root message and fill in the from, to, and subject
> > > headers
> > >     msgRoot = MIMEMultipart('related')
> > >     msgRoot['Subject'] = subject
> > >     msgRoot['From'] = strFrom
> > >     msgRoot['To'] = strTo
> > >     msgRoot.preamble = 'This is a multi-part message in MIME format.'
>
> > >     # Encapsulate the plain and HTML versions of the message body in
> > > an
> > >     # 'alternative' part, so message agents can decide which they want
> > > to display.
> > >     msgAlternative = MIMEMultipart('alternative')
> > >     msgRoot.attach(msgAlternative)
>
> > >     msgText = MIMEText(message_text)
> > >     msgAlternative.attach(msgText)
>
> > >     # We reference the image in the IMG SRC attribute by the ID we
> > > give it below
> > >     msgText = MIMEText(message_html, 'html')
> > >     msgAlternative.attach(msgText)
>
> > >     if attach_image:
> > >         # This example assumes the image is in the current directory
> > > or you've passed the full path
> > >         fp = open(attach_image, 'rb')
> > >         msgImage = MIMEImage(fp.read())
> > >         fp.close()
>
> > >         #you can refer to this image as  in your
> > > html message.
> > >         # Define the image's ID as referenced above
> > >         msgImage.add_header('Content-ID', '')
> > >         msgRoot.attach(msgImage)
> > >     return msgRoot
>
> > > In your controller:
>
> > > #visit this page and you'll get an email
> > > def email():
> > >     host = 'smtp.gmail.com' #your mail server
> > >     port = 587 #port if non-standard
> > >     username = 'your_username'
> > >     password = 'your_password'
>
> > >     import smtplib
> > >     server = smtplib.SMTP(host, port)
> > >     server.ehlo()
> > >     server.starttls()
> > >     server.ehlo()
> > >     server.login(username, password)
>
> > >     context=dict(name='John Doe', ship_date='July 15,
> > > 2009',amount_owed=25.50,num_items=2)
>
> > >     #use web2py views to get an html and plain text version of the
> > > message
> > >     message_html=response.render('default/
> > > email_template.html',context) #template for the html version
> > >     message_text = response.render('default/
> > > email_template.txt',context) #template for the text only version
>
> > >     sender = 'y...@notspamming.com'
> > >     recipient = 'custo...@host.com'
>
> > >     subject = "We've shipped your order"
>
> > >     #build the multi-part MIME message
> > >     message = _multipart_email(sender, recipient, subject,
> > > message_text, message_html, 'image.jpg')
>
> > >     #and send it
> > >     server.sendmail(sender, recipient, message.as_string())
> > >     server.quit()
>
> > >     print message
> > >     return dict(status='email
> > > sent',to=recipient,subject=subject,message=message.as_string())
>
> > > Perhaps someone else here can use this and maybe even integrate it
> > > into web2py in a more standard way.
>
> > > ~Brian
>
> > > On Jul 11, 3:22 am, kralin  wrote:
>
> > > > yes, I've already tryed this way, after looking at tools.py
> > > > maybe I'm doing something wrong, I'm going to recheck...
>
> > > > thanks
>
> > > > On 11 Lug, 00:46, mdipierro  wrote:
>
> > > > > import smtplib
> > > > > server = smtplib.SMTP(host, port)
> > > > > server.ehlo()
> > > > > server.starttls()
> > > > > server.ehlo()
> > > > > server.login(username, password)
> > > > > server.sendmail(sender, to, msg)
> > > > > server.quit()
>
> > > > > look into the docs for datils. Mind that the docs say .ehlo and .helo
> > > > > are the s

[web2py:26715] Re: sending HTML emails

2009-07-16 Thread Brian M

Yes, using web2py's Mail() as you described probably works too. To be
honest I just didn't bother trying but I suppose your Mail helper is
likely just using smtplib in the background.  The sending part is
easy, it's building the multi-part MIME message that I suspect has
been tricky for people.

I'll try to get this added to AlterEgo over the weekend.

On Jul 16, 9:59 pm, mdipierro  wrote:
> This is useful.
> In principle you could just use:
>
> mail=Mail()
> mail.send(to..., subject,..., message=message.as_string())
>
> or am I missing something?
> Would you post an entry in AlterEgo?
>
> Massimo
>
> On Jul 16, 9:53 pm, Brian M  wrote:
>
> > I've found a solution for sending multi-part emails (text & html) and
> > even embedded images.
>
> > In your controller (or a custom module)
>
> > from email.MIMEMultipart import MIMEMultipart
> > from email.MIMEText import MIMEText
> > from email.MIMEImage import MIMEImage
>
> > #helper function to build a multi-part mime email
> > def _multipart_email(sender, recipient, subject, message_text,
> > message_html, attach_image):
> >     #Taken fromhttp://code.activestate.com/recipes/473810/withvery
> > minor changes
>
> >     # Define these once; use them twice!
> >     strFrom = sender
> >     strTo = recipient
>
> >     # Create the root message and fill in the from, to, and subject
> > headers
> >     msgRoot = MIMEMultipart('related')
> >     msgRoot['Subject'] = subject
> >     msgRoot['From'] = strFrom
> >     msgRoot['To'] = strTo
> >     msgRoot.preamble = 'This is a multi-part message in MIME format.'
>
> >     # Encapsulate the plain and HTML versions of the message body in
> > an
> >     # 'alternative' part, so message agents can decide which they want
> > to display.
> >     msgAlternative = MIMEMultipart('alternative')
> >     msgRoot.attach(msgAlternative)
>
> >     msgText = MIMEText(message_text)
> >     msgAlternative.attach(msgText)
>
> >     # We reference the image in the IMG SRC attribute by the ID we
> > give it below
> >     msgText = MIMEText(message_html, 'html')
> >     msgAlternative.attach(msgText)
>
> >     if attach_image:
> >         # This example assumes the image is in the current directory
> > or you've passed the full path
> >         fp = open(attach_image, 'rb')
> >         msgImage = MIMEImage(fp.read())
> >         fp.close()
>
> >         #you can refer to this image as  in your
> > html message.
> >         # Define the image's ID as referenced above
> >         msgImage.add_header('Content-ID', '')
> >         msgRoot.attach(msgImage)
> >     return msgRoot
>
> > In your controller:
>
> > #visit this page and you'll get an email
> > def email():
> >     host = 'smtp.gmail.com' #your mail server
> >     port = 587 #port if non-standard
> >     username = 'your_username'
> >     password = 'your_password'
>
> >     import smtplib
> >     server = smtplib.SMTP(host, port)
> >     server.ehlo()
> >     server.starttls()
> >     server.ehlo()
> >     server.login(username, password)
>
> >     context=dict(name='John Doe', ship_date='July 15,
> > 2009',amount_owed=25.50,num_items=2)
>
> >     #use web2py views to get an html and plain text version of the
> > message
> >     message_html=response.render('default/
> > email_template.html',context) #template for the html version
> >     message_text = response.render('default/
> > email_template.txt',context) #template for the text only version
>
> >     sender = 'y...@notspamming.com'
> >     recipient = 'custo...@host.com'
>
> >     subject = "We've shipped your order"
>
> >     #build the multi-part MIME message
> >     message = _multipart_email(sender, recipient, subject,
> > message_text, message_html, 'image.jpg')
>
> >     #and send it
> >     server.sendmail(sender, recipient, message.as_string())
> >     server.quit()
>
> >     print message
> >     return dict(status='email
> > sent',to=recipient,subject=subject,message=message.as_string())
>
> > Perhaps someone else here can use this and maybe even integrate it
> > into web2py in a more standard way.
>
> > ~Brian
>
> > On Jul 11, 3:22 am, kralin  wrote:
>
> > > yes, I've already tryed this way, after looking at tools.py
> > > maybe I'm doing something wrong, I'm going to recheck...
>
> > > thanks
>
> > > On 11 Lug, 00:46, mdipierro  wrote:
>
> > > > import smtplib
> > > > server = smtplib.SMTP(host, port)
> > > > server.ehlo()
> > > > server.starttls()
> > > > server.ehlo()
> > > > server.login(username, password)
> > > > server.sendmail(sender, to, msg)
> > > > server.quit()
>
> > > > look into the docs for datils. Mind that the docs say .ehlo and .helo
> > > > are the same. They are not. The latter does not work with starttls
>
> > > > On Jul 10, 4:46 pm, kralin  wrote:
>
> > > > > ok, so smtplib should work instead of Mail?
>
> > > > > On 10 Lug, 23:39, mdipierro  wrote:
>
> > > > > > Here is the problem. The current implementation of Mail is designed 
> > > > > > to
> > > > > > be cross platform, i.e. work on GAE. It 

[web2py:26714] Re: The 80/20 rule

2009-07-16 Thread mdipierro

I am not familiar with those web sites. What do you suggest?

On Jul 16, 10:18 pm, Vidul Petrov  wrote:
> Hi Massimo,
>
> I fully agree, everything is very well said IMHO.
>
> Only one small addition - most of the MVC users have never even heard
> about most of the features (not to mention the rich set that WEB2PY
> offers).
>
> Do you think that a website for WEB2PY like jobs.perl.org and
> jobs.rubynow.com would help (probably some sample works should be
> shown there also)?
>
> Regards,
> Vidul
>
> On Jul 17, 5:49 am, mdipierro  wrote:
>
> > Pareto (http://en.wikipedia.org/wiki/Pareto_principle) once said that
> > 80% of effects come from 20% of causes. For software we can re-phrase
> > as 80% of users use only 20% of features.
>
> > These are not at all a scientific statements but you understand what
> > they mean.
>
> > We can add more and more features to web2py with the effect that:
> > - web2py grows in complexity to the point that it becomes harder to
> > maintain
> > - web2py gets slower
> > - I spend all my time reviewing patches instead of improving
> > documentation
> > - You spend all your time thinking how to improve web2py instead of
> > building applications with it
> > - Many of these improvement will not buy us a significant number of
> > users.
>
> > I am not trying to discourage people from submitting patches and I
> > very very much appreciate people who have done so. Most if not all the
> > patches that I have received were good and needed. I am sure I will
> > continue to receive excellent patches.
>
> > Yet, when discussing the roadmap it has to be clear that the point
> > should not be adding new features. The goal should be locking existing
> > features: make sure they are well documented, make sure there are no
> > problems, make sure everything has tests.
>
> > We also need a plugin system but that is not a new web2py feature.
> > That is a set of specifications and naming conventions for writing
> > models/views/controllers. It is possible that we may have to modify
> > admin as result of these specs (in order to apply/remove plugins).
>
> > Finally, this community has to do a better job at outreach. You should
> > talk to your friends and blog about web2py. You must talk about the
> > applications you build with it. We do not lack developers. We lack
> > salesmen. This is not because we want to have more user but because
> > more users means web2py is tested more, there will be more web2py
> > jobs, and you (as early adopters) will have a better chance to sell
> > your web2py based solutions.
>
> > Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26713] Re: how to simplify web2py URLs in GAE?

2009-07-16 Thread mdipierro

Create a file web2py/routes.py and write in it:

routes_in=('/(?P.*)',('/myapplicationname/mycontrollername/$a'),)
routes_out=('/myapplicationname/mycontrollername/(?P.*)',('/$a'),)



On Jul 16, 10:16 pm, Dan  wrote:
> Is there a way to make the URLs used by a web2py application a bit
> simpler when running GAE?
>
> for example, this is the URL when using web2py's standard settings:
> 1)http://myapp.appspot.com/myapplicationname/mycontrollername/myfunctio...
>
> but it would be better to use this throughout (not simply a one-time
> redirect, but a persistent aliasing across all controllers and
> functions so that the user never sees "myapplicationname") :
> 2)http://myapp.appspot.com/mycontrollername/myfunctionname
>
> or even simpler:
> 3)http://myapp.appspot.com/myfunctionname (which is defined in the
> "default.py" controller)
>
> I've seen a few conversations about this, but am confused as to
> whether I should be working with GAE's app.yaml, or with web2py's
> routes.py. Are there any considerations I should keep in mind?
>
> The reason for this is to shorten the URL to make it easier to
> remember and to be friendlier to search engine classification methods.
>
> thanks
> Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26712] Re: The 80/20 rule

2009-07-16 Thread Vidul Petrov

Hi Massimo,

I fully agree, everything is very well said IMHO.

Only one small addition - most of the MVC users have never even heard
about most of the features (not to mention the rich set that WEB2PY
offers).

Do you think that a website for WEB2PY like jobs.perl.org and
jobs.rubynow.com would help (probably some sample works should be
shown there also)?

Regards,
Vidul



On Jul 17, 5:49 am, mdipierro  wrote:
> Pareto (http://en.wikipedia.org/wiki/Pareto_principle) once said that
> 80% of effects come from 20% of causes. For software we can re-phrase
> as 80% of users use only 20% of features.
>
> These are not at all a scientific statements but you understand what
> they mean.
>
> We can add more and more features to web2py with the effect that:
> - web2py grows in complexity to the point that it becomes harder to
> maintain
> - web2py gets slower
> - I spend all my time reviewing patches instead of improving
> documentation
> - You spend all your time thinking how to improve web2py instead of
> building applications with it
> - Many of these improvement will not buy us a significant number of
> users.
>
> I am not trying to discourage people from submitting patches and I
> very very much appreciate people who have done so. Most if not all the
> patches that I have received were good and needed. I am sure I will
> continue to receive excellent patches.
>
> Yet, when discussing the roadmap it has to be clear that the point
> should not be adding new features. The goal should be locking existing
> features: make sure they are well documented, make sure there are no
> problems, make sure everything has tests.
>
> We also need a plugin system but that is not a new web2py feature.
> That is a set of specifications and naming conventions for writing
> models/views/controllers. It is possible that we may have to modify
> admin as result of these specs (in order to apply/remove plugins).
>
> Finally, this community has to do a better job at outreach. You should
> talk to your friends and blog about web2py. You must talk about the
> applications you build with it. We do not lack developers. We lack
> salesmen. This is not because we want to have more user but because
> more users means web2py is tested more, there will be more web2py
> jobs, and you (as early adopters) will have a better chance to sell
> your web2py based solutions.
>
> Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26711] how to simplify web2py URLs in GAE?

2009-07-16 Thread Dan

Is there a way to make the URLs used by a web2py application a bit
simpler when running GAE?

for example, this is the URL when using web2py's standard settings:
1) http://myapp.appspot.com/myapplicationname/mycontrollername/myfunctionname

but it would be better to use this throughout (not simply a one-time
redirect, but a persistent aliasing across all controllers and
functions so that the user never sees "myapplicationname") :
2) http://myapp.appspot.com/mycontrollername/myfunctionname

or even simpler:
3) http://myapp.appspot.com/myfunctionname  (which is defined in the
"default.py" controller)

I've seen a few conversations about this, but am confused as to
whether I should be working with GAE's app.yaml, or with web2py's
routes.py. Are there any considerations I should keep in mind?

The reason for this is to shorten the URL to make it easier to
remember and to be friendlier to search engine classification methods.

thanks
Dan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26710] Re: sending HTML emails

2009-07-16 Thread mdipierro

This is useful.
In principle you could just use:

mail=Mail()
mail.send(to..., subject,..., message=message.as_string())

or am I missing something?
Would you post an entry in AlterEgo?

Massimo

On Jul 16, 9:53 pm, Brian M  wrote:
> I've found a solution for sending multi-part emails (text & html) and
> even embedded images.
>
> In your controller (or a custom module)
>
> from email.MIMEMultipart import MIMEMultipart
> from email.MIMEText import MIMEText
> from email.MIMEImage import MIMEImage
>
> #helper function to build a multi-part mime email
> def _multipart_email(sender, recipient, subject, message_text,
> message_html, attach_image):
>     #Taken fromhttp://code.activestate.com/recipes/473810/with very
> minor changes
>
>     # Define these once; use them twice!
>     strFrom = sender
>     strTo = recipient
>
>     # Create the root message and fill in the from, to, and subject
> headers
>     msgRoot = MIMEMultipart('related')
>     msgRoot['Subject'] = subject
>     msgRoot['From'] = strFrom
>     msgRoot['To'] = strTo
>     msgRoot.preamble = 'This is a multi-part message in MIME format.'
>
>     # Encapsulate the plain and HTML versions of the message body in
> an
>     # 'alternative' part, so message agents can decide which they want
> to display.
>     msgAlternative = MIMEMultipart('alternative')
>     msgRoot.attach(msgAlternative)
>
>     msgText = MIMEText(message_text)
>     msgAlternative.attach(msgText)
>
>     # We reference the image in the IMG SRC attribute by the ID we
> give it below
>     msgText = MIMEText(message_html, 'html')
>     msgAlternative.attach(msgText)
>
>     if attach_image:
>         # This example assumes the image is in the current directory
> or you've passed the full path
>         fp = open(attach_image, 'rb')
>         msgImage = MIMEImage(fp.read())
>         fp.close()
>
>         #you can refer to this image as  in your
> html message.
>         # Define the image's ID as referenced above
>         msgImage.add_header('Content-ID', '')
>         msgRoot.attach(msgImage)
>     return msgRoot
>
> In your controller:
>
> #visit this page and you'll get an email
> def email():
>     host = 'smtp.gmail.com' #your mail server
>     port = 587 #port if non-standard
>     username = 'your_username'
>     password = 'your_password'
>
>     import smtplib
>     server = smtplib.SMTP(host, port)
>     server.ehlo()
>     server.starttls()
>     server.ehlo()
>     server.login(username, password)
>
>     context=dict(name='John Doe', ship_date='July 15,
> 2009',amount_owed=25.50,num_items=2)
>
>     #use web2py views to get an html and plain text version of the
> message
>     message_html=response.render('default/
> email_template.html',context) #template for the html version
>     message_text = response.render('default/
> email_template.txt',context) #template for the text only version
>
>     sender = 'y...@notspamming.com'
>     recipient = 'custo...@host.com'
>
>     subject = "We've shipped your order"
>
>     #build the multi-part MIME message
>     message = _multipart_email(sender, recipient, subject,
> message_text, message_html, 'image.jpg')
>
>     #and send it
>     server.sendmail(sender, recipient, message.as_string())
>     server.quit()
>
>     print message
>     return dict(status='email
> sent',to=recipient,subject=subject,message=message.as_string())
>
> Perhaps someone else here can use this and maybe even integrate it
> into web2py in a more standard way.
>
> ~Brian
>
> On Jul 11, 3:22 am, kralin  wrote:
>
> > yes, I've already tryed this way, after looking at tools.py
> > maybe I'm doing something wrong, I'm going to recheck...
>
> > thanks
>
> > On 11 Lug, 00:46, mdipierro  wrote:
>
> > > import smtplib
> > > server = smtplib.SMTP(host, port)
> > > server.ehlo()
> > > server.starttls()
> > > server.ehlo()
> > > server.login(username, password)
> > > server.sendmail(sender, to, msg)
> > > server.quit()
>
> > > look into the docs for datils. Mind that the docs say .ehlo and .helo
> > > are the same. They are not. The latter does not work with starttls
>
> > > On Jul 10, 4:46 pm, kralin  wrote:
>
> > > > ok, so smtplib should work instead of Mail?
>
> > > > On 10 Lug, 23:39, mdipierro  wrote:
>
> > > > > Here is the problem. The current implementation of Mail is designed to
> > > > > be cross platform, i.e. work on GAE. It has the same API as GAE.
> > > > > Unless we figure out how to send MIMEemailmessages on GAE, if you
> > > > > want to send MIME you should not use Mail native SMTP.
>
> > > > > On Jul 10, 4:31 pm, kralin  wrote:
>
> > > > > > I've also tried to use MIME to encode both thehtml, and an
> > > > > > alternative text/htmlmessage, however all the encoding goes after
> > > > > > the double newline
> > > > > > and is not interpreted as an header.
>
> > > > > > so  Yarko are you saying that by doing  send(message='hello 
> > > > > > message')
> > > > > > instead of send(to=['@me.com'], message='hello message')
> > > > > > it 

[web2py:26709] Re: Authentication

2009-07-16 Thread mdipierro

I suspect we have a major problem here:

"role" is a keyword in postgresql and I did not know about it. To
check if this is the problem:

1) remove the database
2) remove everything in databases/*
3) create the database again
4) go to appadmin and tell me which tables you see

Once we have identified the problem, we'll find a solution.

Massimo


On Jul 16, 9:49 pm, FERNANDO VILLARROEL  wrote:
> Hello,
>
> I am using a database Postgres.
>
> > Can you show the entire traceback?
>
> Traceback (most recent call last):
>   File "/home/fvillarroel/web2py/gluon/restricted.py", line 107, in restricted
>     exec ccode in environment
>   File 
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", line 
> 53, in 
>   File "/home/fvillarroel/web2py/gluon/globals.py", line 80, in 
>     self._caller = lambda f: f()
>   File 
> "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", line 
> 32, in user
>     return dict(form=auth())
>   File "/home/fvillarroel/web2py/gluon/tools.py", line 436, in __call__
>     return self.register()
>   File "/home/fvillarroel/web2py/gluon/tools.py", line 745, in register
>     group_id = self.add_group("user_%s" % form.vars.id, description)
>   File "/home/fvillarroel/web2py/gluon/tools.py", line 1211, in add_group
>     description=description)
>   File "/home/fvillarroel/web2py/gluon/sql.py", line 1377, in insert
>     self._db._execute(query)
>   File "/home/fvillarroel/web2py/gluon/sql.py", line 726, in 
>     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> ProgrammingError: no existe la relación «auth_group»
>
> > Do you get error even if
> > auth.settings.create_user_groups=True?
>
> yes
>
> > If you use appadmin, do you see the auth_group?
>
> No
> appadmin is the  front end for administrator?
>
>
>
> > On Jul 16, 4:29 pm, FERNANDO VILLARROEL 
> > wrote:
> > > Dear all.
>
> > > I am trying to use authentication:
>
> > >http://www.web2py.com/examples/default/tools
>
> > > I have the following code on my db.py:
>
> > > from gluon.tools import *
> > > auth=Auth(globals(),db)            #
> > authentication/authorization
>
> > > # define custom tables (table_user_name is
> > 'auth_user')
> > > auth.settings.table_user =
> > db.define_table(auth.settings.table_user_name,
> > >     db.Field('first_name', length=128,default=''),
> > >     db.Field('last_name', length=128,default=''),
> > >     db.Field('email', length=128,default='',
> > requires = [IS_EMAIL(),
> > IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
> > >     db.Field('password', 'password', readable=False,
> > label='Password', requires=CRYPT()),
> > >     db.Field('registration_key', length=128,
> > writable=False, readable=False,default=''),migrate=False)
>
> > > auth.define_tables()                # creates
> > all needed tables
> > > auth.settings.create_user_groups=False
>
> > > But the application return the next exception:
>
> > >   self._db._execute(query)
> > >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> > 726, in 
> > >     self._execute = lambda *a, **b:
> > self._cursor.execute(*a, **b)
> > > ProgrammingError: no existe la relación
> > «auth_group»
>
> > > What is the struct of the table auth_group?
>
> > > what i am doing wrong?
>
> > > Any idea or how i can solved the problem.
>
> > > Fernando
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26708] Re: sending HTML emails

2009-07-16 Thread Brian M

I've found a solution for sending multi-part emails (text & html) and
even embedded images.

In your controller (or a custom module)

from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEImage import MIMEImage

#helper function to build a multi-part mime email
def _multipart_email(sender, recipient, subject, message_text,
message_html, attach_image):
#Taken from http://code.activestate.com/recipes/473810/ with very
minor changes

# Define these once; use them twice!
strFrom = sender
strTo = recipient

# Create the root message and fill in the from, to, and subject
headers
msgRoot = MIMEMultipart('related')
msgRoot['Subject'] = subject
msgRoot['From'] = strFrom
msgRoot['To'] = strTo
msgRoot.preamble = 'This is a multi-part message in MIME format.'

# Encapsulate the plain and HTML versions of the message body in
an
# 'alternative' part, so message agents can decide which they want
to display.
msgAlternative = MIMEMultipart('alternative')
msgRoot.attach(msgAlternative)

msgText = MIMEText(message_text)
msgAlternative.attach(msgText)

# We reference the image in the IMG SRC attribute by the ID we
give it below
msgText = MIMEText(message_html, 'html')
msgAlternative.attach(msgText)

if attach_image:
# This example assumes the image is in the current directory
or you've passed the full path
fp = open(attach_image, 'rb')
msgImage = MIMEImage(fp.read())
fp.close()

#you can refer to this image as  in your
html message.
# Define the image's ID as referenced above
msgImage.add_header('Content-ID', '')
msgRoot.attach(msgImage)
return msgRoot


In your controller:

#visit this page and you'll get an email
def email():
host = 'smtp.gmail.com' #your mail server
port = 587 #port if non-standard
username = 'your_username'
password = 'your_password'

import smtplib
server = smtplib.SMTP(host, port)
server.ehlo()
server.starttls()
server.ehlo()
server.login(username, password)

context=dict(name='John Doe', ship_date='July 15,
2009',amount_owed=25.50,num_items=2)

#use web2py views to get an html and plain text version of the
message
message_html=response.render('default/
email_template.html',context) #template for the html version
message_text = response.render('default/
email_template.txt',context) #template for the text only version

sender = 'y...@notspamming.com'
recipient = 'custo...@host.com'

subject = "We've shipped your order"

#build the multi-part MIME message
message = _multipart_email(sender, recipient, subject,
message_text, message_html, 'image.jpg')

#and send it
server.sendmail(sender, recipient, message.as_string())
server.quit()

print message
return dict(status='email
sent',to=recipient,subject=subject,message=message.as_string())


Perhaps someone else here can use this and maybe even integrate it
into web2py in a more standard way.

~Brian

On Jul 11, 3:22 am, kralin  wrote:
> yes, I've already tryed this way, after looking at tools.py
> maybe I'm doing something wrong, I'm going to recheck...
>
> thanks
>
> On 11 Lug, 00:46, mdipierro  wrote:
>
> > import smtplib
> > server = smtplib.SMTP(host, port)
> > server.ehlo()
> > server.starttls()
> > server.ehlo()
> > server.login(username, password)
> > server.sendmail(sender, to, msg)
> > server.quit()
>
> > look into the docs for datils. Mind that the docs say .ehlo and .helo
> > are the same. They are not. The latter does not work with starttls
>
> > On Jul 10, 4:46 pm, kralin  wrote:
>
> > > ok, so smtplib should work instead of Mail?
>
> > > On 10 Lug, 23:39, mdipierro  wrote:
>
> > > > Here is the problem. The current implementation of Mail is designed to
> > > > be cross platform, i.e. work on GAE. It has the same API as GAE.
> > > > Unless we figure out how to send MIMEemailmessages on GAE, if you
> > > > want to send MIME you should not use Mail native SMTP.
>
> > > > On Jul 10, 4:31 pm, kralin  wrote:
>
> > > > > I've also tried to use MIME to encode both thehtml, and an
> > > > > alternative text/htmlmessage, however all the encoding goes after
> > > > > the double newline
> > > > > and is not interpreted as an header.
>
> > > > > so  Yarko are you saying that by doing  send(message='hello message')
> > > > > instead of send(to=['@me.com'], message='hello message')
> > > > > it should worrk by including the correct headers in the message?
>
> > > > > On 10 Lug, 22:15, mdipierro  wrote:
>
> > > > > > While this can be and something like this can be added it is my
> > > > > > understanding that you do not need to change the header to sendhtml
> > > > > > emails. You need to use the MIME encoding and that should be
> > > > > > transparent to what mail.send does now. If I am wrong please provide
> > > > > > an example of how to change the headers to send a MIME

[web2py:26706] The 80/20 rule

2009-07-16 Thread mdipierro

Pareto (http://en.wikipedia.org/wiki/Pareto_principle) once said that
80% of effects come from 20% of causes. For software we can re-phrase
as 80% of users use only 20% of features.

These are not at all a scientific statements but you understand what
they mean.

We can add more and more features to web2py with the effect that:
- web2py grows in complexity to the point that it becomes harder to
maintain
- web2py gets slower
- I spend all my time reviewing patches instead of improving
documentation
- You spend all your time thinking how to improve web2py instead of
building applications with it
- Many of these improvement will not buy us a significant number of
users.

I am not trying to discourage people from submitting patches and I
very very much appreciate people who have done so. Most if not all the
patches that I have received were good and needed. I am sure I will
continue to receive excellent patches.

Yet, when discussing the roadmap it has to be clear that the point
should not be adding new features. The goal should be locking existing
features: make sure they are well documented, make sure there are no
problems, make sure everything has tests.

We also need a plugin system but that is not a new web2py feature.
That is a set of specifications and naming conventions for writing
models/views/controllers. It is possible that we may have to modify
admin as result of these specs (in order to apply/remove plugins).

Finally, this community has to do a better job at outreach. You should
talk to your friends and blog about web2py. You must talk about the
applications you build with it. We do not lack developers. We lack
salesmen. This is not because we want to have more user but because
more users means web2py is tested more, there will be more web2py
jobs, and you (as early adopters) will have a better chance to sell
your web2py based solutions.

Massimo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26707] Re: Authentication

2009-07-16 Thread FERNANDO VILLARROEL


Hello,

I am using a database Postgres.


> Can you show the entire traceback?

Traceback (most recent call last):
  File "/home/fvillarroel/web2py/gluon/restricted.py", line 107, in restricted
exec ccode in environment
  File "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", 
line 53, in 
  File "/home/fvillarroel/web2py/gluon/globals.py", line 80, in 
self._caller = lambda f: f()
  File "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", 
line 32, in user
return dict(form=auth())
  File "/home/fvillarroel/web2py/gluon/tools.py", line 436, in __call__
return self.register()
  File "/home/fvillarroel/web2py/gluon/tools.py", line 745, in register
group_id = self.add_group("user_%s" % form.vars.id, description)
  File "/home/fvillarroel/web2py/gluon/tools.py", line 1211, in add_group
description=description)
  File "/home/fvillarroel/web2py/gluon/sql.py", line 1377, in insert
self._db._execute(query)
  File "/home/fvillarroel/web2py/gluon/sql.py", line 726, in 
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: no existe la relación «auth_group»


> Do you get error even if
> auth.settings.create_user_groups=True?

yes


> If you use appadmin, do you see the auth_group?

No
appadmin is the  front end for administrator?

> 
> 
> 
> On Jul 16, 4:29 pm, FERNANDO VILLARROEL 
> wrote:
> > Dear all.
> >
> > I am trying to use authentication:
> >
> > http://www.web2py.com/examples/default/tools
> >
> > I have the following code on my db.py:
> >
> > from gluon.tools import *
> > auth=Auth(globals(),db)            #
> authentication/authorization
> >
> > # define custom tables (table_user_name is
> 'auth_user')
> > auth.settings.table_user =
> db.define_table(auth.settings.table_user_name,
> >     db.Field('first_name', length=128,default=''),
> >     db.Field('last_name', length=128,default=''),
> >     db.Field('email', length=128,default='',
> requires = [IS_EMAIL(),
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
> >     db.Field('password', 'password', readable=False,
> label='Password', requires=CRYPT()),
> >     db.Field('registration_key', length=128,
> writable=False, readable=False,default=''),migrate=False)
> >
> > auth.define_tables()                # creates
> all needed tables
> > auth.settings.create_user_groups=False
> >
> > But the application return the next exception:
> >
> >   self._db._execute(query)
> >   File "/home/fvillarroel/web2py/gluon/sql.py", line
> 726, in 
> >     self._execute = lambda *a, **b:
> self._cursor.execute(*a, **b)
> > ProgrammingError: no existe la relación
> «auth_group»
> >
> > What is the struct of the table auth_group?
> >
> > what i am doing wrong?
> >
> > Any idea or how i can solved the problem.
> >
> > Fernando
> > 
> 


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26705] Re: clear select() cache on GAE?

2009-07-16 Thread Dan

Ah, ok. I didn't realize that it was ignored. I'll use the lambda
approach. thanks

On Jul 16, 6:58 pm, mdipierro  wrote:
> On GAE, in this statement
>
> results = db(auth.settings.table_user.name=="Joe").select(cache=
> (self.cache.ram,3600))
>
> the cache is not used. The cache statement is ignored so no need to
> clear the cache.
>
> Probably this will be fixed in the new DAL.
>
> You can cache the records yourself
>
> results=cache.memcache('myrecords': lambda: db
> (auth.settings.table_user.name=="Joe").select(cache=(self.cache.ram,
> 3600)).as_list(),5000)
>
> and clear it with
>
> cache.memcache.delete('myrecords') ### memcache only syntax
>
> Anyway, I am skeptical you get any speed up out of all this.
>
> Massimo
>
> On Jul 16, 6:28 pm, Dan  wrote:
>
> > so would I need to run a new query? is that the only way to remove the
> > old/invalid results when running on GAE?
>
> > On Jul 16, 4:03 pm, mdipierro  wrote:
>
> > > correction. This is DOES NOT supported on GAE.
>
> > > On Jul 16, 3:54 pm, mdipierro  wrote:
>
> > > > yes
>
> > > > cache.ram.clear(regex="")
>
> > > > On 16 Lug, 13:16, Dan  wrote:
>
> > > > > Hello- I saw this thread which discusses ways to clear a cached select
> > > > > () result on non-GAE platforms. Is there a way to use the cache.clear
> > > > > (regex=??) command to remove the results of a known datastore query
> > > > > that works on GAE too?
> > > > > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26704] Re: Strange behavior with firefox

2009-07-16 Thread Jose



On 17 jul, 02:27, mdipierro  wrote:
> Now replace
>
>    form.vars = session.vars
>
> with:
>
>    form.vars.update(session.vars )
>
> this will fix the latter problem
>
> Now I understand what is going not but not why the browser makes a
> difference. You are trying to store a gluon.storage.Storage object in
> the session. Session can serialize it but fails to de-serialize it
> when the session is retrieved. So you have so take the form.vars and
> convert to a dictionary when storing it session.
>
> It is a rule in web2py that you cannot store objects in session (only
> primitive types, lists, dicts and combinations).
>
> Massimo
>

Now yes it works well. I do not also deal because the different
behaviors of the browsers.

Thank you very much for your help.

Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26703] Re: Call Help in branding 2Py and get larger mind-share for Web2Py

2009-07-16 Thread Jason Brower

I like it, but let's hope this is only for things that are closely
related.  We don't want ever website under that sun that is made with
web2py to be called 2py.  That would just get annoying.  Look at KDE
with, Kwin, Konquerer, Kalculator, talk about weird.
Regards,
J


On Tue, 2009-07-14 at 04:46 -0700, gluegl wrote:
> I have been thinking on what would enhance the mindshare of Web2Py and
> help create "deep burned-in branding"
> My thinking is to when any create HELPERs, APPLIANCES, ADD-ONs
> Instead of crypted names such as T2, T3, KPAX ... opt in for something
> that would automagically associated with Web2Py such as
> 
> Jque2Py
> Doj2Py
> PyJam2Py
> iPhon2Py
> GAE2Py
> Jang2Py
> SQL2Py
> Amaz2Py
> Skyp2Py
> Encryp2Py
> Search2Py
> UI2Py
> Ngix2Py
> Apach2Py
> Couchdb2Py
> Hadoop2Py
> REST2Py
> RDFa2Py
> ATOM2Py
> RSS2Py
> Blog2Py
> Tweet2Py
> FaceBuk2Py
> Wave2Py
> Flic2Py
> gMap2Py
> Help2Py
> Donate2Py
> Pay2Py
> 
> If T2, T3 or KPAX must exist, than start rebranding it as T2PY,
> T3_2Py, KpaX2Py
> 
> Thoughts, ideas, comments?
> 
> Comment2Py:-)
> 
> Best,
> G
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26702] Re: Proposed patch to sql.py - sqlite3.ROW + alternate executesql

2009-07-16 Thread mdipierro

please email this to me and I will take a closer look. Thank you
Brian.

Massimo

On Jul 16, 9:21 pm, Brian M  wrote:
> I've recently started using web2py with some legacy databases (no id
> field so no DAL) and would like to offer a patch to gluon/sql.py
>
> 1) Adjusts the SQLite connection to use sqlite3.ROW so that the
> results of queries run with db.executesql (or my executesql2 below)
> can be referred to by field name instead of just index.  This lets you
> say something like this in your views:
>
> {{for row in results:}}
> {{=row['first_name']}} {{=row['last_name']}}
> {{pass}}
>
> instead of having to use the less readable
>
> {{for row in results:}}
> {{=row[0]}} {{=row[1]}}
> {{pass}}
>
> 2) Create an alternate executesql2 function that allows custom sql to
> be used in conjunction with placeholders. This way you don't have to
> worry as much about escaping variables you're using in your query
> (avoids sql injections).
>
> With the new function, a third "args" parameter has been added. This
> can be either a dictionary or list.
>
> In your controller:
>
> #passing a dictionary (works with SQLite but not MS SQL Server)
> results = db.executesql2("""SELECT firstname, lastname, birthdate FROM
> person WHERE birthdate < :date AND first_name == :name""",dict(name =
> "Fred", date = "2009-01-01"))
>
> #passing a list (works with SQLite and MS SQL Server, possibly others)
> results = db.executesql2("""SELECT firstname, lastname, birthdate FROM
> person WHERE birthdate < ? AND first_name == ?""", ("Fred",
> "2009-01-01"))
>
> In the view:
>
> Results returned from SQLite
> {{for row in results:}}
> {{=row['first_name']}} {{=row['last_name']}}
> {{pass}}
>
> Results returned from MS SQL
> {{for row in results:}}
> {{=row.first_name}} {{=row.last_name}}
> {{pass}}
>
> Here's the patch against the devel bzr branch.
>
> === modified file 'gluon/sql.py'
> --- gluon/sql.py        2009-07-14 13:49:44 +
> +++ gluon/sql.py        2009-07-17 01:47:13 +
> @@ -699,6 +699,8 @@
>                                             check_same_thread=False))
>              self._connection.create_function('web2py_extract', 2,
>                                               sqlite3_web2py_extract)
> +            #make it so we can get results as a dictionary when using
> executesql
> +            self._connection.row_factory = sqlite3.Row
>              self._cursor = self._connection.cursor()
>              self._execute = lambda *a, **b: self._cursor.execute(*a,
> **b)
>          elif self._uri[:8] == 'mysql://':
> @@ -1027,6 +1029,14 @@
>              return self._cursor.fetchall()
>          except:
>              return None
> +
> +    def executesql2(self, query, args):
> +        self['_lastsql'] = query+"  with "+str(args)
> +        self._execute(query, args)
> +        try:
> +            return self._cursor.fetchall()
> +        except:
> +            return None
>
>      def _update_referenced_by(self, other):
>          for tablename in self.tables:
>
> These changes make working with non-DAL compliant legacy databases in
> web2py a bit easier and do not appear to hinder the normal use of DAL.
> I've tested with SQLite and MS SQL Server, but it may also work with
> other databases (PostgreSQL, Oracle?)
>
> ~Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26701] Proposed patch to sql.py - sqlite3.ROW + alternate executesql

2009-07-16 Thread Brian M

I've recently started using web2py with some legacy databases (no id
field so no DAL) and would like to offer a patch to gluon/sql.py

1) Adjusts the SQLite connection to use sqlite3.ROW so that the
results of queries run with db.executesql (or my executesql2 below)
can be referred to by field name instead of just index.  This lets you
say something like this in your views:

{{for row in results:}}
{{=row['first_name']}} {{=row['last_name']}}
{{pass}}

instead of having to use the less readable

{{for row in results:}}
{{=row[0]}} {{=row[1]}}
{{pass}}

2) Create an alternate executesql2 function that allows custom sql to
be used in conjunction with placeholders. This way you don't have to
worry as much about escaping variables you're using in your query
(avoids sql injections).

With the new function, a third "args" parameter has been added. This
can be either a dictionary or list.

In your controller:

#passing a dictionary (works with SQLite but not MS SQL Server)
results = db.executesql2("""SELECT firstname, lastname, birthdate FROM
person WHERE birthdate < :date AND first_name == :name""",dict(name =
"Fred", date = "2009-01-01"))

#passing a list (works with SQLite and MS SQL Server, possibly others)
results = db.executesql2("""SELECT firstname, lastname, birthdate FROM
person WHERE birthdate < ? AND first_name == ?""", ("Fred",
"2009-01-01"))

In the view:

Results returned from SQLite
{{for row in results:}}
{{=row['first_name']}} {{=row['last_name']}}
{{pass}}

Results returned from MS SQL
{{for row in results:}}
{{=row.first_name}} {{=row.last_name}}
{{pass}}


Here's the patch against the devel bzr branch.

=== modified file 'gluon/sql.py'
--- gluon/sql.py2009-07-14 13:49:44 +
+++ gluon/sql.py2009-07-17 01:47:13 +
@@ -699,6 +699,8 @@
check_same_thread=False))
 self._connection.create_function('web2py_extract', 2,
  sqlite3_web2py_extract)
+#make it so we can get results as a dictionary when using
executesql
+self._connection.row_factory = sqlite3.Row
 self._cursor = self._connection.cursor()
 self._execute = lambda *a, **b: self._cursor.execute(*a,
**b)
 elif self._uri[:8] == 'mysql://':
@@ -1027,6 +1029,14 @@
 return self._cursor.fetchall()
 except:
 return None
+
+def executesql2(self, query, args):
+self['_lastsql'] = query+"  with "+str(args)
+self._execute(query, args)
+try:
+return self._cursor.fetchall()
+except:
+return None

 def _update_referenced_by(self, other):
 for tablename in self.tables:


These changes make working with non-DAL compliant legacy databases in
web2py a bit easier and do not appear to hinder the normal use of DAL.
I've tested with SQLite and MS SQL Server, but it may also work with
other databases (PostgreSQL, Oracle?)

~Brian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26700] Re: Strange behavior with firefox

2009-07-16 Thread mdipierro

Now replace

   form.vars = session.vars

with:

   form.vars.update(session.vars )

this will fix the latter problem

Now I understand what is going not but not why the browser makes a
difference. You are trying to store a gluon.storage.Storage object in
the session. Session can serialize it but fails to de-serialize it
when the session is retrieved. So you have so take the form.vars and
convert to a dictionary when storing it session.

It is a rule in web2py that you cannot store objects in session (only
primitive types, lists, dicts and combinations).

Massimo




On Jul 16, 9:18 pm, Jose  wrote:
> On 17 jul, 01:47, mdipierro  wrote:
>
> > I mean replace
>
> >   session.vars=form.vars
>
> > with
>
> >   session.vars=dict(form.vars)
>
> > Does it change anything? Are these custom forms? How do the views look
> > like?
>
> Now from domicilio1 to domicilio2: Ok.
> A mistake takes is produced from domicilio2 to domicilio3
>
> Error traceback
> Traceback (most recent call last):
>   File "/usr/home/jose/web2py2/gluon/restricted.py", line 176, in
> restricted
>     exec ccode in environment
>   File "/usr/home/jose/web2py2/applications/autogestion/controllers/
> solicitud.py", line 140, in 
>   File "/usr/home/jose/web2py2/gluon/globals.py", line 100, in
> 
>     self._caller = lambda f: f()
>   File "/usr/home/jose/web2py2/applications/autogestion/controllers/
> solicitud.py", line 60, in domicilio
>     if form.accepts(request.vars, session):
>   File "/usr/home/jose/web2py2/gluon/sqlhtml.py", line 839, in accepts
>     self.vars.id = self.table.insert(**fields)
> AttributeError: 'dict' object has no attribute 'id'
>
> Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26699] Re: Where's the roadmap?

2009-07-16 Thread mdipierro

Yes documentation is a priority and I will consider making the second
version of the book freely available (at least partially).

I said this already. I am not in favor of creating our own foundation.
I would rather go with the Conservatory (if they take us) or create a
corporation instead. The need for a legal status is not that of
creating a body for setting a roadmap but protecting the IP.

We also need a roadmap. This will be done by allowing everybody to
propose features and voting on priorities (I am working on setting
this up). I will use this indication to create a roadmap (dynamically)
based on what is feasible and, more importantly, on keeping web2py
consistent with its minimalist goals.

Anyway... as far as I am concerned, the less we change web2py the
better.
I want to see people build apps with web2py.
I want to build a mechanism/organization in which people build their
reputation by showing what they have built with web2py.

Massimo



On Jul 16, 6:18 pm, waTR  wrote:
> Massimo, thank you for this wonderful framework! BUT YOU WORK TOO
> HARD!!!  I remember the first thing I learned about management of
> projects was: "Work ON the projects, not IN the projects!   i.e. stop
> coding, start organizing and making systems to organize others to code
> and slowly start pulling yourself higher and higher away from the
> actual work, until you can JUST do spokesperson work. That seems like
> a good roadmap template for you to fill-in the blanks as to how to get
> from A-to-B-to-C.
>
> RE: documentation
> Documentation is definitely a stumbling block. Personally, I bought
> the book for $12, and am happy I did. However, for an open-source
> project to really succeed, it needs to have open-source documentation.
>
> I would like to note, however, that this project is still very young,
> and is doing very well for its age. I would also like to point out
> that Django did not get the django book immediately either. It took a
> few years for the Django book to show up. Django was released as
> public code in 2005 (src: wikipedia) -- developed probably 1-2 yrs
> prior. The djangobook site appeared in Nov 2007, nearly 2 years later
> (src: archive.org).
>
> I would also like to mention that at this point, there is enough
> documentation out there about web2py to not need the book at all,
> however, it is nice to have. Otherwise, the community here I have
> found to be incredibly responsive.
>
> RE: roadmap
> The first thing that needs to happen is that this project needs to set-
> up a foundation. Once that is done, directors can be elected. Once
> that is done, the project can start to organize committees of
> volunteers. I don't see any formalized volunteer management process
> yet... How can a volunteer driven effort succeed without volunteers?
>
> For inspiration about the best organized volunteer contribution
> system, check the KDE project. They have coding requests made public
> so everyone can contribute, and they have varying difficulties, so if
> you are new to coding you can still help.
>
> NOTE! Massimo cannot do any of the above alone. Volunteers are needed.
> I say the first step that needs to happen is that 2 more google groups
> need to be created. This current group renamed to USERS, another group
> added named DEVELOPERS, and another group called FOUNDATION.
> USERS group = help seeking people while learning/making apps with
> web2py
> DEVELOPERS group = help seeking people while adding code to web2py
> code-base
> FOUNDATION group = help / question answers / organization for people
> wanting to contribute.
>
> Main point is not to have these HUGE projects for people to work on,
> but break them down to VERY small parts that someone can do in 10min.
> Therefore, what is ALSO needed, is a task management system.
>
> I.e. for the book: Task 1 = Write an intro, Task 2 = Write some
> simple, well commented, "hello world" code. Anyone in the community
> wanting to help can take-on a task.
>
> MOST IMPORTANT: Stop "roll-your-own" mentality. Not everything needs
> to be web2py. Wiki can be mediaWiki. No one is going to not choose
> web2py because not EVERY single part of the project works on web2py.
> YES, eventually everything will, but not at the beginning. There are
> not enough people involved, and those that are involved don't have
> enough time.
>
> A good place to start would be to add a centralized TASK tracker. 
> I.e.http://www.mantisbt.org
> A task can be proposed and is added by the volunteer coordinators
> after checking to ensure the task description has enough information
> to complete the task. This is something completely separate from the
> DEVELOPER task list.
>
> On Jul 16, 12:49 am, Bottiger  wrote:
>
> >http://www.djangobook.com/license/
>
> > Copyright 2006 by Adrian Holovaty and Jacob Kaplan-Moss
>
> > Permission is granted to copy, distribute and/or modify this document
> > under the terms of the GNU Free Documentation License, Version 1.2 or
> > any later version publishe

[web2py:26698] Re: Strange behavior with firefox

2009-07-16 Thread Jose



On 17 jul, 01:47, mdipierro  wrote:
> I mean replace
>
>   session.vars=form.vars
>
> with
>
>   session.vars=dict(form.vars)
>
> Does it change anything? Are these custom forms? How do the views look
> like?
>

Now from domicilio1 to domicilio2: Ok.
A mistake takes is produced from domicilio2 to domicilio3

Error traceback
Traceback (most recent call last):
  File "/usr/home/jose/web2py2/gluon/restricted.py", line 176, in
restricted
exec ccode in environment
  File "/usr/home/jose/web2py2/applications/autogestion/controllers/
solicitud.py", line 140, in 
  File "/usr/home/jose/web2py2/gluon/globals.py", line 100, in

self._caller = lambda f: f()
  File "/usr/home/jose/web2py2/applications/autogestion/controllers/
solicitud.py", line 60, in domicilio
if form.accepts(request.vars, session):
  File "/usr/home/jose/web2py2/gluon/sqlhtml.py", line 839, in accepts
self.vars.id = self.table.insert(**fields)
AttributeError: 'dict' object has no attribute 'id'

Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26697] Re: Unladen Swallow

2009-07-16 Thread mdipierro

Yes it is far form usable as far as we are concerned.

Massimo

On Jul 16, 7:33 pm, Jonathan Lundell  wrote:
> On Jul 16, 2009, at 3:51 PM, Bottiger wrote:
>
>
>
> > Web2Py isn't going to get free publicity like that until it has some
> > killer feature that Django doesn't have, instead of simply being
> > slightly better at everything.
>
> > On a side note, Unladen Swallow is far from usable. Memory usage is
> > 10x normal.
>
> And performance is ~1x normal, I gather.
>
>
>
> > On Jul 16, 1:48 pm, Jonathan Lundell  wrote:
> >>http://arstechnica.com/open-source/news/2009/07/new-milestone-
> >> release...
>
> >> I didn't see a mention of this in the list archive. It's early days
> >> yet, of course, but I see that Django's getting some free publicity.
> >> Of course there's the Google connection to thank for that.
>
> >> The Unladen Swallow project, which seeks to bring a 5-fold  
> >> performance
> >> boost to the Python programming language, has delivered its first
> >> milestone release. Although the project hasn't delivered real-world
> >> performance improvements yet, the new version is a big step forward
> >> and helps to demonstrate the technical viability of the effort.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26696] Re: models question

2009-07-16 Thread mdipierro

No without editing gluon/sql.py and changing the value of
self._db._folder.
Or specify the full path to the db file

db=DAL('sqlite:///full_path/db.db') #note /// not //

Massimo

On Jul 16, 6:45 pm, JohnMc  wrote:
> I am following through on a suggestion Massimo offered to be able to
> select particular db's. Essentially the code works quite well in a
> test app --
>
> # coding: utf8
> # try something like
> import os
>
> def create():
>
>     files=os.listdir(os.path.join(request.folder,'databases'))
>     # choose a file, for example
>     file=files[1]
>     db=SQLDB('sqlite://%s'+file)
>     db.define_table('table1', db.Field('field1','string'))
>     db.define_table('table2', db.Field('field2','string'))
>     db.define_table('table3', db.Field('field3','string'))
>     return
>
> However looking at the process from how the application will operate
> the potential is that there could be 100's of separate db's and Nx
> that many tables. So I have been exploring the idea of possibly using
> subdirectories of 'databases' parent to keep the layout logical.
> Something like --
>
> ../databases
>       /smythe2675476
>       /harris04204
>       /arnold47345
>          db.db
>          152345123512435145_table1.table
>          356783456256745736_table2.table
>          789574356737224356_table3.table
>       ...
>       ...
>
> Employing that idea with some test code I can get the db.db to be
> created in the appropriate subdirectory. The associated tables however
> end up back in the parent dir -- /databases. Is there a workaround?
>
> Thanks.
>
> JohnMc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26695] Re: clear select() cache on GAE?

2009-07-16 Thread mdipierro

On GAE, in this statement

results = db(auth.settings.table_user.name=="Joe").select(cache=
(self.cache.ram,3600))

the cache is not used. The cache statement is ignored so no need to
clear the cache.

Probably this will be fixed in the new DAL.

You can cache the records yourself

results=cache.memcache('myrecords': lambda: db
(auth.settings.table_user.name=="Joe").select(cache=(self.cache.ram,
3600)).as_list(),5000)

and clear it with

cache.memcache.delete('myrecords') ### memcache only syntax

Anyway, I am skeptical you get any speed up out of all this.

Massimo

On Jul 16, 6:28 pm, Dan  wrote:
> so would I need to run a new query? is that the only way to remove the
> old/invalid results when running on GAE?
>
> On Jul 16, 4:03 pm, mdipierro  wrote:
>
> > correction. This is DOES NOT supported on GAE.
>
> > On Jul 16, 3:54 pm, mdipierro  wrote:
>
> > > yes
>
> > > cache.ram.clear(regex="")
>
> > > On 16 Lug, 13:16, Dan  wrote:
>
> > > > Hello- I saw this thread which discusses ways to clear a cached select
> > > > () result on non-GAE platforms. Is there a way to use the cache.clear
> > > > (regex=??) command to remove the results of a known datastore query
> > > > that works on GAE too?
> > > > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26694] Re: Web2Py Foundation?

2009-07-16 Thread mdipierro

I have created a company before and I know how this works.

The point of the Conservatory is to avoid creating a foundation or a
corporation, avoid the costs involved, the management work and
increase the reputation of web2py.

Massimo

On Jul 16, 10:56 am, JohnMc  wrote:
> There are resources for setting up foundations 
> --http://foundationcenter.org/getstarted/.
> IRS has details as well 
> --http://www.irs.gov/charities/foundations/article/0,,id=127912,00.html.
> Depending where you intend to operate you may also have state
> reporting requirements. US viewpoint --
>
> * Typically organized like a 'C' Corporation. That means you have to
> have a board of directors and bylaws to be in compliance with
> applicable state law.
> * Have to have proper accounting of grants, other funds and
> disbursements.
> * Have quarterly filing requirements.
>
> But Massimo, you are in a better position than most of us being at
> DePaul. I think if you looked in your internal phone directory you
> will probably find a office that handles nothing but grants and giving
> (not the Pell stuff to students) to the University. You will probably
> find that DePaul has assisted large donors in setting up foundations
> to maximize the gifts. Find that person and they can probably tell you
> all you need to know. If you are lucky and they feel generous they
> might even have the legal docs in a Word file to give you.
>
> But I do agree with AchipA you need a parttime staffer that knows how
> to do the reporting.
>
> On Jul 16, 9:29 am, mdipierro  wrote:
>
> > But the is the point of the conservatory. We would not have to run our
> > own foundation. They do it.
>
> > Massimo
>
> > On Jul 16, 9:21 am, AchipA  wrote:
>
> > > Running stuff (even if it's a non-profit organization like a
> > > foundation) costs money. IANAL, not even an accountant and most
> > > definitely do not live in the US, so I suggest getting more detailed
> > > info about it from other people already running free software
> > > foundations (FSF, OSGeo, Apache, etc).
>
> > > On Jul 16, 3:21 pm, mdipierro  wrote:
>
> > > > Can you elaborate? specifically on the last point.
>
> > > > On Jul 16, 5:30 am, AchipA  wrote:
>
> > > > > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > > > > Upside:
> > > > > - clear authority with regard to announcements, project stance,
> > > > > roadmap, etc
> > > > > - clear ownership of copyright, licenses, and source of help for
> > > > > developers/companies interested in that matter
> > > > > - well defined source of additional resources, contacts, etc
> > > > > - allows some organizational burden taken off of the core developer's
> > > > > back
>
> > > > > Downside:
> > > > > - more paperwork
> > > > > - needs dedicated people (generally not developers, but people with
> > > > > organisational skills) who can run things for *long* periods of time
> > > > > (volunteering for particular projects is another issue)
> > > > > - decisions can get bogged down if things get 'too' democratic/
> > > > > commitee driven
> > > > > - material cost even if it's non-profit (registration, tax stuff,
> > > > > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26693] Re: Strange behavior with firefox

2009-07-16 Thread mdipierro

I mean replace

  session.vars=form.vars

with

  session.vars=dict(form.vars)

Does it change anything? Are these custom forms? How do the views look
like?


On Jul 16, 5:34 pm, Jose  wrote:
> On 15 jul, 19:48, mdipierro  wrote:
>
> > I do not see the problem. Can you try (just out of curiosity) replace
>
> > session.vars = ...
>
> > with
>
> > session.vars = dict(...)
>
> Do you say to create the dictionary with the names of the fields? I do
> not know do like the code.
>
> Before I wrote that this happens when I fill the forms 2, 3 and 4, was
> wrong, only it happens in the second form (domicilio1 to domicilio2).
>
> Also I tried with Konqueror and it works well.
>
> Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26692] Re: reddish2

2009-07-16 Thread mdipierro

yes

On Jul 16, 4:32 pm, lpg  wrote:
> Massimo, Yarko,
> Is it your idea to use Reddish2 to discuss and vote on the roadmap?
> Thanks,
> Lucas
>
> On Jul 15, 8:01 pm, Yarko Tymciurak  wrote:
>
> > On Wed, Jul 15, 2009 at 5:47 PM, mdipierro  wrote:
>
> > > OK I will fix this. meanwhile use
>
> > >http://localhost:8000/rdsh/default/user/login
>
> > Yep - this works (sorry - I didn't have time to dig more; just try)
>
> > > instead of
>
> > >http://localhost:8000/rdsh/plugin_reddish/user/login
>
> > > and check what else does not work.
>
> > > On Jul 15, 5:30 pm, Yarko Tymciurak  wrote:
> > > > Hmm... now that I'm paying attention again -
>
> > > > Going to
>
> > > >http://localhost:8000/rdsh (what I named my redish-2 ...)
>
> > > > redirects to:
>
> > > >http://localhost:8000/rdsh/plugin_reddish/index
>
> > > > Selecting the "login" link requests:
>
> > > >http://localhost:8000/rdsh/plugin_reddish/user/login
>
> > > > which returns an "
> > > > invalid function
> > > > page.
>
> > > > On Wed, Jul 15, 2009 at 5:00 PM, mdipierro 
> > > wrote:
>
> > > > > What triggers it?
>
> > > > > On Jul 15, 4:04 pm, Yarko Tymciurak  wrote:
> > > > > > ... it's trying to go to reddish/redish_plugin/user/login (no such
> > > fcn
> > > > > > indeed)
>
> > > > > > On Wed, Jul 15, 2009 at 4:02 PM, Yarko Tymciurak 
> > > > > wrote:
> > > > > > > strange - login - invalid function!  (registration works, logs
> > > in... so
> > > > > I'm
> > > > > > > still testing...)
>
> > > > > > > On Wed, Jul 15, 2009 at 2:40 PM, Massimo Di Pierro <
> > > > > > > mdipie...@cs.depaul.edu> wrote:
>
> > > > > > >> You are right. The version of reddish that is posted is much 
> > > > > > >> worse
> > > > > > >> than I thought. So I rewrote it.
>
> > > > > > >> Please test it and let me know.
>
> > > > > > >> Should work on GAE too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26691] Re: Authentication

2009-07-16 Thread mdipierro

Can you show the entire traceback?
Do you get error even if
auth.settings.create_user_groups=True?
If you use appadmin, do you see the auth_group?



On Jul 16, 4:29 pm, FERNANDO VILLARROEL  wrote:
> Dear all.
>
> I am trying to use authentication:
>
> http://www.web2py.com/examples/default/tools
>
> I have the following code on my db.py:
>
> from gluon.tools import *
> auth=Auth(globals(),db)            # authentication/authorization
>
> # define custom tables (table_user_name is 'auth_user')
> auth.settings.table_user = db.define_table(auth.settings.table_user_name,
>     db.Field('first_name', length=128,default=''),
>     db.Field('last_name', length=128,default=''),
>     db.Field('email', length=128,default='', requires = [IS_EMAIL(), 
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
>     db.Field('password', 'password', readable=False, label='Password', 
> requires=CRYPT()),
>     db.Field('registration_key', length=128, writable=False, 
> readable=False,default=''),migrate=False)
>
> auth.define_tables()                # creates all needed tables
> auth.settings.create_user_groups=False
>
> But the application return the next exception:
>
>   self._db._execute(query)
>   File "/home/fvillarroel/web2py/gluon/sql.py", line 726, in 
>     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> ProgrammingError: no existe la relación «auth_group»
>
> What is the struct of the table auth_group?
>
> what i am doing wrong?
>
> Any idea or how i can solved the problem.
>
> Fernando
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26690] Re: custom form problem

2009-07-16 Thread mdipierro

You have two forms but you did not name them

form.accept(...,formname="...")

Try do it. It may solve the problem.



On Jul 16, 4:16 pm, murray3  wrote:
> Any help with this would be great as I am stuck and cannot get it to
> work :(
> I had FCKeditor working as  wiki editor I was able to open and save
> fields
> to the db without any problems.
> I moved the app code to the jpolite framework and now when I edit a
> field it does not
> update the database.
> The form_main_tab , which uses FORM(), is where the problem seems to
> be.
> I am using sqlform in another part of my app also within jpolite and
> it uPdates the db without problem.
> If anyone could just look at to see if there is anything obvious in
> the FORM definition of form_main_tab.
> thanks
> Chrism
>
> > In controller:
> > def m203():
> >      try: thisprodj_id=db(db.prodj.id==request.args[0]).select()[0]
> >      except: redirect(URL(r=request,f='index'))
> >      form_maintab=FORM(DIV(TEXTAREA(_style="width: 98%;",
> > _name="form_main_tab", _id="form_main_tab",value=XML
> > (thisprodj_id.main_tab))),INPUT
> > (_type="submit",_value="Save"),_class='ajaxform1')  # ,sanitize=True
> > does not show images in form?
> >      if form_maintab.accepts(request.vars,session,keepvalues=True):
> >          thisprodj_id.update_record   # updates record - not woking in 
> > jpolite?
> > (main_tab=form_maintab.vars.form_main_tab)
> >          response.flash="form accepted!"
> >      elif form_maintab.errors:
> >          response.flash="form is invalid!"
> >      form_wikitab0=FORM(DIV(TEXTAREA(_style="width: 98%;",
> > _name="form_wiki_tab0", _id="form_wiki_tab0",value=XML
> > (thisprodj_id.wiki_tab0))),INPUT
> > (_type="submit",_value="Save"),_class='ajaxform1')  # ,sanitize=True
> > does not show inages in form?
> >      if form_wikitab0.accepts(request.vars,session,keepvalues=True):
> >          thisprodj_id.update_record
> > (wiki_tab0=form_wikitab0.vars.form_wiki_tab0)
> >          response.flash="form accepted!"
> >      elif form_wikitab0.errors:
> >          response.flash="form is invalid!"
> >      return dict
> > (form_maintab=form_maintab,form_wikitab0=form_wikitab0,prodj=thisprodj_id)
>
> > in view:
> > 
> > {{=prodj.name}}
> > 
> > 
> >    Prodj Home
> >    Wiki
> >    Parts List
> >    Files
> >    {{=LI(A("Show Prodj",_href=URL(r=request,f='m202',args=
> > [prodj.id]),_class='local'))}}
> > 
> > 
> > {{=form_maintab}}
> > 
> > {{=form_wikitab0}}
> > 
> > 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26689] Re: breadcrumb design

2009-07-16 Thread Alex Fanjul

I agree with you Richard,
In deed, in statusbar there is already a "kind of breadcrumb" but 
wihtout links...

A vote for this inbuild functionallity...
Otherwise, I bet that someone has a quick and simple idea to do this 
with one function and getting the information from url app, controller, 
function.

Alex F

El 17/07/2009 2:45, Richard escribió:
> hello,
>
> Does anyone have a neat breadcrumb link system for web2py?
> http://en.wikipedia.org/wiki/Breadcrumb_(navigation)
>
> Currently each of my controller functions define a menu variable like
> this:
> breadcrumbs = [A('Browse', _href=URL(...)), A('Book', _href=URL(...)),
> 'View']
> And then the base view uses this to generate the links.
> However this creates a lot of redundancy for deep links.
>
> I remember in Django they use inheritance chains to build up the
> breadcrumbs to avoid this redundancy. Is there a way to do something
> like that in web2py?
>
> Richard
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26688] breadcrumb design

2009-07-16 Thread Richard

hello,

Does anyone have a neat breadcrumb link system for web2py?
http://en.wikipedia.org/wiki/Breadcrumb_(navigation)

Currently each of my controller functions define a menu variable like
this:
breadcrumbs = [A('Browse', _href=URL(...)), A('Book', _href=URL(...)),
'View']
And then the base view uses this to generate the links.
However this creates a lot of redundancy for deep links.

I remember in Django they use inheritance chains to build up the
breadcrumbs to avoid this redundancy. Is there a way to do something
like that in web2py?

Richard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26687] Re: Where's the roadmap?

2009-07-16 Thread waTR

Agreed!



On Jul 16, 4:56 pm, Alex Fanjul  wrote:
> Not mantis pleasee!!!
> With Trac  and its huge plugins repository,
> you gain bug tracking, task management, wiki, calendars, Roadmap, and so
> on... And it is programmed in Python...
>
> Alex F
>
> El 17/07/2009 1:18, waTR escribió:
>
>
>
> > Massimo, thank you for this wonderful framework! BUT YOU WORK TOO
> > HARD!!!  I remember the first thing I learned about management of
> > projects was: "Work ON the projects, not IN the projects!   i.e. stop
> > coding, start organizing and making systems to organize others to code
> > and slowly start pulling yourself higher and higher away from the
> > actual work, until you can JUST do spokesperson work. That seems like
> > a good roadmap template for you to fill-in the blanks as to how to get
> > from A-to-B-to-C.
>
> > RE: documentation
> > Documentation is definitely a stumbling block. Personally, I bought
> > the book for $12, and am happy I did. However, for an open-source
> > project to really succeed, it needs to have open-source documentation.
>
> > I would like to note, however, that this project is still very young,
> > and is doing very well for its age. I would also like to point out
> > that Django did not get the django book immediately either. It took a
> > few years for the Django book to show up. Django was released as
> > public code in 2005 (src: wikipedia) -- developed probably 1-2 yrs
> > prior. The djangobook site appeared in Nov 2007, nearly 2 years later
> > (src: archive.org).
>
> > I would also like to mention that at this point, there is enough
> > documentation out there about web2py to not need the book at all,
> > however, it is nice to have. Otherwise, the community here I have
> > found to be incredibly responsive.
>
> > RE: roadmap
> > The first thing that needs to happen is that this project needs to set-
> > up a foundation. Once that is done, directors can be elected. Once
> > that is done, the project can start to organize committees of
> > volunteers. I don't see any formalized volunteer management process
> > yet... How can a volunteer driven effort succeed without volunteers?
>
> > For inspiration about the best organized volunteer contribution
> > system, check the KDE project. They have coding requests made public
> > so everyone can contribute, and they have varying difficulties, so if
> > you are new to coding you can still help.
>
> > NOTE! Massimo cannot do any of the above alone. Volunteers are needed.
> > I say the first step that needs to happen is that 2 more google groups
> > need to be created. This current group renamed to USERS, another group
> > added named DEVELOPERS, and another group called FOUNDATION.
> > USERS group = help seeking people while learning/making apps with
> > web2py
> > DEVELOPERS group = help seeking people while adding code to web2py
> > code-base
> > FOUNDATION group = help / question answers / organization for people
> > wanting to contribute.
>
> > Main point is not to have these HUGE projects for people to work on,
> > but break them down to VERY small parts that someone can do in 10min.
> > Therefore, what is ALSO needed, is a task management system.
>
> > I.e. for the book: Task 1 = Write an intro, Task 2 = Write some
> > simple, well commented, "hello world" code. Anyone in the community
> > wanting to help can take-on a task.
>
> > MOST IMPORTANT: Stop "roll-your-own" mentality. Not everything needs
> > to be web2py. Wiki can be mediaWiki. No one is going to not choose
> > web2py because not EVERY single part of the project works on web2py.
> > YES, eventually everything will, but not at the beginning. There are
> > not enough people involved, and those that are involved don't have
> > enough time.
>
> > A good place to start would be to add a centralized TASK tracker. I.e.
> >http://www.mantisbt.org
> > A task can be proposed and is added by the volunteer coordinators
> > after checking to ensure the task description has enough information
> > to complete the task. This is something completely separate from the
> > DEVELOPER task list.
>
> > On Jul 16, 12:49 am, Bottiger  wrote:
>
> >>http://www.djangobook.com/license/
>
> >> Copyright 2006 by Adrian Holovaty and Jacob Kaplan-Moss
>
> >> Permission is granted to copy, distribute and/or modify this document
> >> under the terms of the GNU Free Documentation License, Version 1.2 or
> >> any later version published by the Free Software Foundation; with no
> >> Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
> >> copy of the license is included in the section entitled "GNU Free
> >> Documentation License".
>
> >> On Jul 15, 3:20 pm, mdipierro  wrote:
>
> >>> What is the license of the DjangoBook? Who owns the copyright?
>
> >>> Massimo
>
> >>> On Jul 15, 5:13 pm, Bottiger  wrote:
>
>  One idea is to do the same thing as DjangoBook.com. Have a freely
>  commentable edition online so people can help improve it and you don't
>

[web2py:26686] Re: Unladen Swallow

2009-07-16 Thread Jonathan Lundell

On Jul 16, 2009, at 3:51 PM, Bottiger wrote:

>
> Web2Py isn't going to get free publicity like that until it has some
> killer feature that Django doesn't have, instead of simply being
> slightly better at everything.
>
> On a side note, Unladen Swallow is far from usable. Memory usage is
> 10x normal.

And performance is ~1x normal, I gather.

>
> On Jul 16, 1:48 pm, Jonathan Lundell  wrote:
>> http://arstechnica.com/open-source/news/2009/07/new-milestone- 
>> release...
>>
>> I didn't see a mention of this in the list archive. It's early days
>> yet, of course, but I see that Django's getting some free publicity.
>> Of course there's the Google connection to thank for that.
>>
>> The Unladen Swallow project, which seeks to bring a 5-fold  
>> performance
>> boost to the Python programming language, has delivered its first
>> milestone release. Although the project hasn't delivered real-world
>> performance improvements yet, the new version is a big step forward
>> and helps to demonstrate the technical viability of the effort.
> >



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26685] Re: Where's the roadmap?

2009-07-16 Thread Bottiger

> Work ON the projects, not IN the projects

Yes, we there are too many large examples and not enough
documentation. Documentation being spread out on AlterEgo is extremely
disorganized.

> Documentation is definitely a stumbling block.

I'm going to be brutally honest here. When I first saw Web2Py and that
it was GPL and the main documentation was only available after pay, I
almost dismissed it right away there.

These two things are community killers. Out of Pylons, Django, and
Ruby on Rails, only Web2Py is GPLed. GPL is comes with many strings
attached compared to BSD and is a legal nightmare for many
corporations to use. If you are afraid of people ripping off Web2Py
and reselling it as a package, I don't think that has happened to
Pylons, Django, or Rails.

For documentation, only Web2py has a pay for documentation setup. I
realize that the online documentation is there, but it is extremely
disorganized, and a bit of a hassle to look through 10 different
videos and slides that repeat each other 70% of the time. Official
documentation is needed as an organized reference guide.

Of course, the only person who can decide on this is Massimo. As the
sole copyright holder he must decide whether he wants Web2Py as a
revenue vehicle or encourage growth.


On Jul 16, 4:18 pm, waTR  wrote:
> Massimo, thank you for this wonderful framework! BUT YOU WORK TOO
> HARD!!!  I remember the first thing I learned about management of
> projects was: "Work ON the projects, not IN the projects!   i.e. stop
> coding, start organizing and making systems to organize others to code
> and slowly start pulling yourself higher and higher away from the
> actual work, until you can JUST do spokesperson work. That seems like
> a good roadmap template for you to fill-in the blanks as to how to get
> from A-to-B-to-C.
>
> RE: documentation
> Documentation is definitely a stumbling block. Personally, I bought
> the book for $12, and am happy I did. However, for an open-source
> project to really succeed, it needs to have open-source documentation.
>
> I would like to note, however, that this project is still very young,
> and is doing very well for its age. I would also like to point out
> that Django did not get the django book immediately either. It took a
> few years for the Django book to show up. Django was released as
> public code in 2005 (src: wikipedia) -- developed probably 1-2 yrs
> prior. The djangobook site appeared in Nov 2007, nearly 2 years later
> (src: archive.org).
>
> I would also like to mention that at this point, there is enough
> documentation out there about web2py to not need the book at all,
> however, it is nice to have. Otherwise, the community here I have
> found to be incredibly responsive.
>
> RE: roadmap
> The first thing that needs to happen is that this project needs to set-
> up a foundation. Once that is done, directors can be elected. Once
> that is done, the project can start to organize committees of
> volunteers. I don't see any formalized volunteer management process
> yet... How can a volunteer driven effort succeed without volunteers?
>
> For inspiration about the best organized volunteer contribution
> system, check the KDE project. They have coding requests made public
> so everyone can contribute, and they have varying difficulties, so if
> you are new to coding you can still help.
>
> NOTE! Massimo cannot do any of the above alone. Volunteers are needed.
> I say the first step that needs to happen is that 2 more google groups
> need to be created. This current group renamed to USERS, another group
> added named DEVELOPERS, and another group called FOUNDATION.
> USERS group = help seeking people while learning/making apps with
> web2py
> DEVELOPERS group = help seeking people while adding code to web2py
> code-base
> FOUNDATION group = help / question answers / organization for people
> wanting to contribute.
>
> Main point is not to have these HUGE projects for people to work on,
> but break them down to VERY small parts that someone can do in 10min.
> Therefore, what is ALSO needed, is a task management system.
>
> I.e. for the book: Task 1 = Write an intro, Task 2 = Write some
> simple, well commented, "hello world" code. Anyone in the community
> wanting to help can take-on a task.
>
> MOST IMPORTANT: Stop "roll-your-own" mentality. Not everything needs
> to be web2py. Wiki can be mediaWiki. No one is going to not choose
> web2py because not EVERY single part of the project works on web2py.
> YES, eventually everything will, but not at the beginning. There are
> not enough people involved, and those that are involved don't have
> enough time.
>
> A good place to start would be to add a centralized TASK tracker. 
> I.e.http://www.mantisbt.org
> A task can be proposed and is added by the volunteer coordinators
> after checking to ensure the task description has enough information
> to complete the task. This is something completely separate from the
> DEVELOPER task list.
>
> On Jul 16, 

[web2py:26684] Re: Where's the roadmap?

2009-07-16 Thread Alex Fanjul
Not mantis pleasee!!!
With Trac  and its huge plugins repository, 
you gain bug tracking, task management, wiki, calendars, Roadmap, and so 
on... And it is programmed in Python...

Alex F

El 17/07/2009 1:18, waTR escribió:
> Massimo, thank you for this wonderful framework! BUT YOU WORK TOO
> HARD!!!  I remember the first thing I learned about management of
> projects was: "Work ON the projects, not IN the projects!   i.e. stop
> coding, start organizing and making systems to organize others to code
> and slowly start pulling yourself higher and higher away from the
> actual work, until you can JUST do spokesperson work. That seems like
> a good roadmap template for you to fill-in the blanks as to how to get
> from A-to-B-to-C.
>
> RE: documentation
> Documentation is definitely a stumbling block. Personally, I bought
> the book for $12, and am happy I did. However, for an open-source
> project to really succeed, it needs to have open-source documentation.
>
> I would like to note, however, that this project is still very young,
> and is doing very well for its age. I would also like to point out
> that Django did not get the django book immediately either. It took a
> few years for the Django book to show up. Django was released as
> public code in 2005 (src: wikipedia) -- developed probably 1-2 yrs
> prior. The djangobook site appeared in Nov 2007, nearly 2 years later
> (src: archive.org).
>
> I would also like to mention that at this point, there is enough
> documentation out there about web2py to not need the book at all,
> however, it is nice to have. Otherwise, the community here I have
> found to be incredibly responsive.
>
>
> RE: roadmap
> The first thing that needs to happen is that this project needs to set-
> up a foundation. Once that is done, directors can be elected. Once
> that is done, the project can start to organize committees of
> volunteers. I don't see any formalized volunteer management process
> yet... How can a volunteer driven effort succeed without volunteers?
>
> For inspiration about the best organized volunteer contribution
> system, check the KDE project. They have coding requests made public
> so everyone can contribute, and they have varying difficulties, so if
> you are new to coding you can still help.
>
> NOTE! Massimo cannot do any of the above alone. Volunteers are needed.
> I say the first step that needs to happen is that 2 more google groups
> need to be created. This current group renamed to USERS, another group
> added named DEVELOPERS, and another group called FOUNDATION.
> USERS group = help seeking people while learning/making apps with
> web2py
> DEVELOPERS group = help seeking people while adding code to web2py
> code-base
> FOUNDATION group = help / question answers / organization for people
> wanting to contribute.
>
> Main point is not to have these HUGE projects for people to work on,
> but break them down to VERY small parts that someone can do in 10min.
> Therefore, what is ALSO needed, is a task management system.
>
> I.e. for the book: Task 1 = Write an intro, Task 2 = Write some
> simple, well commented, "hello world" code. Anyone in the community
> wanting to help can take-on a task.
>
>
> MOST IMPORTANT: Stop "roll-your-own" mentality. Not everything needs
> to be web2py. Wiki can be mediaWiki. No one is going to not choose
> web2py because not EVERY single part of the project works on web2py.
> YES, eventually everything will, but not at the beginning. There are
> not enough people involved, and those that are involved don't have
> enough time.
>
> A good place to start would be to add a centralized TASK tracker. I.e.
> http://www.mantisbt.org
> A task can be proposed and is added by the volunteer coordinators
> after checking to ensure the task description has enough information
> to complete the task. This is something completely separate from the
> DEVELOPER task list.
>
>
>
>
> On Jul 16, 12:49 am, Bottiger  wrote:
>
>> http://www.djangobook.com/license/
>>
>> Copyright 2006 by Adrian Holovaty and Jacob Kaplan-Moss
>>
>> Permission is granted to copy, distribute and/or modify this document
>> under the terms of the GNU Free Documentation License, Version 1.2 or
>> any later version published by the Free Software Foundation; with no
>> Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
>> copy of the license is included in the section entitled "GNU Free
>> Documentation License".
>>
>> On Jul 15, 3:20 pm, mdipierro  wrote:
>>
>>  
>>> What is the license of the DjangoBook? Who owns the copyright?
>>>
>>> Massimo
>>>
>>> On Jul 15, 5:13 pm, Bottiger  wrote:
>>>
 One idea is to do the same thing as DjangoBook.com. Have a freely
 commentable edition online so people can help improve it and you don't
 have to waste an entire summer writing one. Then you can sell the
 printed version to recover some costs.
  
 On Jul 15, 2:58 pm, mdipierro

[web2py:26683] models question

2009-07-16 Thread JohnMc

I am following through on a suggestion Massimo offered to be able to
select particular db's. Essentially the code works quite well in a
test app --

# coding: utf8
# try something like
import os

def create():

files=os.listdir(os.path.join(request.folder,'databases'))
# choose a file, for example
file=files[1]
db=SQLDB('sqlite://%s'+file)
db.define_table('table1', db.Field('field1','string'))
db.define_table('table2', db.Field('field2','string'))
db.define_table('table3', db.Field('field3','string'))
return

However looking at the process from how the application will operate
the potential is that there could be 100's of separate db's and Nx
that many tables. So I have been exploring the idea of possibly using
subdirectories of 'databases' parent to keep the layout logical.
Something like --

../databases
  /smythe2675476
  /harris04204
  /arnold47345
 db.db
 152345123512435145_table1.table
 356783456256745736_table2.table
 789574356737224356_table3.table
  ...
  ...

Employing that idea with some test code I can get the db.db to be
created in the appropriate subdirectory. The associated tables however
end up back in the parent dir -- /databases. Is there a workaround?

Thanks.

JohnMc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26682] Re: clear select() cache on GAE?

2009-07-16 Thread Dan

so would I need to run a new query? is that the only way to remove the
old/invalid results when running on GAE?

On Jul 16, 4:03 pm, mdipierro  wrote:
> correction. This is DOES NOT supported on GAE.
>
> On Jul 16, 3:54 pm, mdipierro  wrote:
>
> > yes
>
> > cache.ram.clear(regex="")
>
> > On 16 Lug, 13:16, Dan  wrote:
>
> > > Hello- I saw this thread which discusses ways to clear a cached select
> > > () result on non-GAE platforms. Is there a way to use the cache.clear
> > > (regex=??) command to remove the results of a known datastore query
> > > that works on GAE too?
> > > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26681] Re: Web2Py Foundation?

2009-07-16 Thread waTR

Sounds like a job for a zealous undergrad at your school!!




On Jul 16, 8:56 am, JohnMc  wrote:
> There are resources for setting up foundations 
> --http://foundationcenter.org/getstarted/.
> IRS has details as well 
> --http://www.irs.gov/charities/foundations/article/0,,id=127912,00.html.
> Depending where you intend to operate you may also have state
> reporting requirements. US viewpoint --
>
> * Typically organized like a 'C' Corporation. That means you have to
> have a board of directors and bylaws to be in compliance with
> applicable state law.
> * Have to have proper accounting of grants, other funds and
> disbursements.
> * Have quarterly filing requirements.
>
> But Massimo, you are in a better position than most of us being at
> DePaul. I think if you looked in your internal phone directory you
> will probably find a office that handles nothing but grants and giving
> (not the Pell stuff to students) to the University. You will probably
> find that DePaul has assisted large donors in setting up foundations
> to maximize the gifts. Find that person and they can probably tell you
> all you need to know. If you are lucky and they feel generous they
> might even have the legal docs in a Word file to give you.
>
> But I do agree with AchipA you need a parttime staffer that knows how
> to do the reporting.
>
> On Jul 16, 9:29 am, mdipierro  wrote:
>
> > But the is the point of the conservatory. We would not have to run our
> > own foundation. They do it.
>
> > Massimo
>
> > On Jul 16, 9:21 am, AchipA  wrote:
>
> > > Running stuff (even if it's a non-profit organization like a
> > > foundation) costs money. IANAL, not even an accountant and most
> > > definitely do not live in the US, so I suggest getting more detailed
> > > info about it from other people already running free software
> > > foundations (FSF, OSGeo, Apache, etc).
>
> > > On Jul 16, 3:21 pm, mdipierro  wrote:
>
> > > > Can you elaborate? specifically on the last point.
>
> > > > On Jul 16, 5:30 am, AchipA  wrote:
>
> > > > > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > > > > Upside:
> > > > > - clear authority with regard to announcements, project stance,
> > > > > roadmap, etc
> > > > > - clear ownership of copyright, licenses, and source of help for
> > > > > developers/companies interested in that matter
> > > > > - well defined source of additional resources, contacts, etc
> > > > > - allows some organizational burden taken off of the core developer's
> > > > > back
>
> > > > > Downside:
> > > > > - more paperwork
> > > > > - needs dedicated people (generally not developers, but people with
> > > > > organisational skills) who can run things for *long* periods of time
> > > > > (volunteering for particular projects is another issue)
> > > > > - decisions can get bogged down if things get 'too' democratic/
> > > > > commitee driven
> > > > > - material cost even if it's non-profit (registration, tax stuff,
> > > > > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26680] Re: Where's the roadmap?

2009-07-16 Thread waTR

Massimo, thank you for this wonderful framework! BUT YOU WORK TOO
HARD!!!  I remember the first thing I learned about management of
projects was: "Work ON the projects, not IN the projects!   i.e. stop
coding, start organizing and making systems to organize others to code
and slowly start pulling yourself higher and higher away from the
actual work, until you can JUST do spokesperson work. That seems like
a good roadmap template for you to fill-in the blanks as to how to get
from A-to-B-to-C.

RE: documentation
Documentation is definitely a stumbling block. Personally, I bought
the book for $12, and am happy I did. However, for an open-source
project to really succeed, it needs to have open-source documentation.

I would like to note, however, that this project is still very young,
and is doing very well for its age. I would also like to point out
that Django did not get the django book immediately either. It took a
few years for the Django book to show up. Django was released as
public code in 2005 (src: wikipedia) -- developed probably 1-2 yrs
prior. The djangobook site appeared in Nov 2007, nearly 2 years later
(src: archive.org).

I would also like to mention that at this point, there is enough
documentation out there about web2py to not need the book at all,
however, it is nice to have. Otherwise, the community here I have
found to be incredibly responsive.


RE: roadmap
The first thing that needs to happen is that this project needs to set-
up a foundation. Once that is done, directors can be elected. Once
that is done, the project can start to organize committees of
volunteers. I don't see any formalized volunteer management process
yet... How can a volunteer driven effort succeed without volunteers?

For inspiration about the best organized volunteer contribution
system, check the KDE project. They have coding requests made public
so everyone can contribute, and they have varying difficulties, so if
you are new to coding you can still help.

NOTE! Massimo cannot do any of the above alone. Volunteers are needed.
I say the first step that needs to happen is that 2 more google groups
need to be created. This current group renamed to USERS, another group
added named DEVELOPERS, and another group called FOUNDATION.
USERS group = help seeking people while learning/making apps with
web2py
DEVELOPERS group = help seeking people while adding code to web2py
code-base
FOUNDATION group = help / question answers / organization for people
wanting to contribute.

Main point is not to have these HUGE projects for people to work on,
but break them down to VERY small parts that someone can do in 10min.
Therefore, what is ALSO needed, is a task management system.

I.e. for the book: Task 1 = Write an intro, Task 2 = Write some
simple, well commented, "hello world" code. Anyone in the community
wanting to help can take-on a task.


MOST IMPORTANT: Stop "roll-your-own" mentality. Not everything needs
to be web2py. Wiki can be mediaWiki. No one is going to not choose
web2py because not EVERY single part of the project works on web2py.
YES, eventually everything will, but not at the beginning. There are
not enough people involved, and those that are involved don't have
enough time.

A good place to start would be to add a centralized TASK tracker. I.e.
http://www.mantisbt.org
A task can be proposed and is added by the volunteer coordinators
after checking to ensure the task description has enough information
to complete the task. This is something completely separate from the
DEVELOPER task list.




On Jul 16, 12:49 am, Bottiger  wrote:
> http://www.djangobook.com/license/
>
> Copyright 2006 by Adrian Holovaty and Jacob Kaplan-Moss
>
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.2 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
> copy of the license is included in the section entitled "GNU Free
> Documentation License".
>
> On Jul 15, 3:20 pm, mdipierro  wrote:
>
> > What is the license of the DjangoBook? Who owns the copyright?
>
> > Massimo
>
> > On Jul 15, 5:13 pm, Bottiger  wrote:
>
> > > One idea is to do the same thing as DjangoBook.com. Have a freely
> > > commentable edition online so people can help improve it and you don't
> > > have to waste an entire summer writing one. Then you can sell the
> > > printed version to recover some costs.
>
> > > On Jul 15, 2:58 pm, mdipierro  wrote:
>
> > > > I have sold about 100 printed version before the end of the year 2008,
> > > > when PDF was not available. I do not know since then. I suspect nobody
> > > > buys the printed book given what it costs. The problem is that all of
> > > > the cost is in the overhead. I could reduce the cost to $25 by
> > > > publishing the printed copy with lulu. For the next version, one
> > > > option is to give the PDF free and the printed copy on lul

[web2py:26679] Re: clear select() cache on GAE?

2009-07-16 Thread mdipierro

correction. This is DOES NOT supported on GAE.

On Jul 16, 3:54 pm, mdipierro  wrote:
> yes
>
> cache.ram.clear(regex="")
>
> On 16 Lug, 13:16, Dan  wrote:
>
> > Hello- I saw this thread which discusses ways to clear a cached select
> > () result on non-GAE platforms. Is there a way to use the cache.clear
> > (regex=??) command to remove the results of a known datastore query
> > that works on GAE too?
> > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26678] Re: clear select() cache on GAE?

2009-07-16 Thread Dan

sorry, I meant to ask: what should I put in the regex? For example, if
this is the select statement that I sent previously, how can I clear
the results of it from the cache?

results = db(auth.settings.table_user.name=="Joe").select(cache=
(self.cache.ram,3600))


On Jul 16, 1:54 pm, mdipierro  wrote:
> yes
>
> cache.ram.clear(regex="")
>
> On 16 Lug, 13:16, Dan  wrote:
>
> > Hello- I saw this thread which discusses ways to clear a cached select
> > () result on non-GAE platforms. Is there a way to use the cache.clear
> > (regex=??) command to remove the results of a known datastore query
> > that works on GAE too?
> > Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26677] Re: Unladen Swallow

2009-07-16 Thread Bottiger

Web2Py isn't going to get free publicity like that until it has some
killer feature that Django doesn't have, instead of simply being
slightly better at everything.

On a side note, Unladen Swallow is far from usable. Memory usage is
10x normal.

On Jul 16, 1:48 pm, Jonathan Lundell  wrote:
> http://arstechnica.com/open-source/news/2009/07/new-milestone-release...
>
> I didn't see a mention of this in the list archive. It's early days  
> yet, of course, but I see that Django's getting some free publicity.  
> Of course there's the Google connection to thank for that.
>
> The Unladen Swallow project, which seeks to bring a 5-fold performance  
> boost to the Python programming language, has delivered its first  
> milestone release. Although the project hasn't delivered real-world  
> performance improvements yet, the new version is a big step forward  
> and helps to demonstrate the technical viability of the effort.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26676] Re: Bzr Repo cleaning

2009-07-16 Thread Dominic

However,

those who need just to checkout a copy of web2py to work with it (e.g.
Sahana developers), should use

bzr export web2py_current lp:~mdipierro/web2py/devel

instead of

bzr get lp:~mdipierro/web2py/devel web2py_current

This will omit the .bzr directories and just produce a runnable copy
of the branch (3.9 MByte currently including demo apps).

Of course, from this copy you cannot work on the web2py branch, but
you can run it in any case.

Dominic

On Jul 15, 11:02 pm, Fran  wrote:
> Bumping this for attention - the packs folder is now 560 
> Mb!http://groups.google.com/group/web2py/msg/6143643210ee4a99
>
> This makes it very hard for developers from more bandwidth-contrained
> areas (such as Sahana developers).
>
> Suggestions:
> (1) Don't include the .w2p files in the repository (all the files in
> these tarballs are included anyway)
> (2) Don't rebuild the .w2p files on every commit - only rebuild those
> whose files have been modified
>
> Hopefully a quick hack to stop the repo from growing further is to
> simply delete from the repo:
> bzr remove admin.w2p
> bzr remove examples.w2p
> bzr remove welcome.w2p
> Then add files to .bzrignore & then they can be regenerated without
> affecting the repo size.
>
> Cleaning up the historical files from the packs may be harder - I
> guess it might need creating a new repo.
> To me this is well worthwhile as the current problem is so severe.
>
> I'd be tempted to do it like this:
> * Push old-repo to a different branch (e.g. lp:~mdipierro/web2py/old)
> * Create new repo with the current files in & push to the old
> location: lp:~mdipierro/web2py/devel
>
> Thanks,
> Fran.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26675] Re: Strange behavior with firefox

2009-07-16 Thread Jose



On 15 jul, 19:48, mdipierro  wrote:
> I do not see the problem. Can you try (just out of curiosity) replace
>
> session.vars = ...
>
> with
>
> session.vars = dict(...)
>

Do you say to create the dictionary with the names of the fields? I do
not know do like the code.

Before I wrote that this happens when I fill the forms 2, 3 and 4, was
wrong, only it happens in the second form (domicilio1 to domicilio2).

Also I tried with Konqueror and it works well.

Jose


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26674] Re: reddish2

2009-07-16 Thread Yarko Tymciurak
I think that could be possible, and useful...

There will be some point where it be useful to flush out basic concepts, and
(I would guess) some point where it will not be suited to define a
"project", requirement, tests, play rollout, etc.   but for that phase we
can move to something else.

What are your thoughts?  Do you think this could work?
What would you want to see for identifying and flushing out the high level
aspects of roadmap items?

On Thu, Jul 16, 2009 at 4:32 PM, lpg  wrote:

>
> Massimo, Yarko,
> Is it your idea to use Reddish2 to discuss and vote on the roadmap?
> Thanks,
> Lucas
>
> On Jul 15, 8:01 pm, Yarko Tymciurak  wrote:
> > On Wed, Jul 15, 2009 at 5:47 PM, mdipierro 
> wrote:
> >
> > > OK I will fix this. meanwhile use
> >
> > >http://localhost:8000/rdsh/default/user/login
> >
> > Yep - this works (sorry - I didn't have time to dig more; just try)
> >
> >
> >
> > > instead of
> >
> > >http://localhost:8000/rdsh/plugin_reddish/user/login
> >
> > > and check what else does not work.
> >
> > > On Jul 15, 5:30 pm, Yarko Tymciurak  wrote:
> > > > Hmm... now that I'm paying attention again -
> >
> > > > Going to
> >
> > > >http://localhost:8000/rdsh  (what I named my redish-2 ...)
> >
> > > > redirects to:
> >
> > > >http://localhost:8000/rdsh/plugin_reddish/index
> >
> > > > Selecting the "login" link requests:
> >
> > > >http://localhost:8000/rdsh/plugin_reddish/user/login
> >
> > > > which returns an "
> > > > invalid function
> > > > page.
> >
> > > > On Wed, Jul 15, 2009 at 5:00 PM, mdipierro 
> > > wrote:
> >
> > > > > What triggers it?
> >
> > > > > On Jul 15, 4:04 pm, Yarko Tymciurak  wrote:
> > > > > > ... it's trying to go to reddish/redish_plugin/user/login (no
> such
> > > fcn
> > > > > > indeed)
> >
> > > > > > On Wed, Jul 15, 2009 at 4:02 PM, Yarko Tymciurak <
> yark...@gmail.com>
> > > > > wrote:
> > > > > > > strange - login - invalid function!  (registration works, logs
> > > in... so
> > > > > I'm
> > > > > > > still testing...)
> >
> > > > > > > On Wed, Jul 15, 2009 at 2:40 PM, Massimo Di Pierro <
> > > > > > > mdipie...@cs.depaul.edu> wrote:
> >
> > > > > > >> You are right. The version of reddish that is posted is much
> worse
> > > > > > >> than I thought. So I rewrote it.
> >
> > > > > > >> Please test it and let me know.
> >
> > > > > > >> Should work on GAE too.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26673] Re: reddish2

2009-07-16 Thread lpg

Massimo, Yarko,
Is it your idea to use Reddish2 to discuss and vote on the roadmap?
Thanks,
Lucas

On Jul 15, 8:01 pm, Yarko Tymciurak  wrote:
> On Wed, Jul 15, 2009 at 5:47 PM, mdipierro  wrote:
>
> > OK I will fix this. meanwhile use
>
> >http://localhost:8000/rdsh/default/user/login
>
> Yep - this works (sorry - I didn't have time to dig more; just try)
>
>
>
> > instead of
>
> >http://localhost:8000/rdsh/plugin_reddish/user/login
>
> > and check what else does not work.
>
> > On Jul 15, 5:30 pm, Yarko Tymciurak  wrote:
> > > Hmm... now that I'm paying attention again -
>
> > > Going to
>
> > >http://localhost:8000/rdsh  (what I named my redish-2 ...)
>
> > > redirects to:
>
> > >http://localhost:8000/rdsh/plugin_reddish/index
>
> > > Selecting the "login" link requests:
>
> > >http://localhost:8000/rdsh/plugin_reddish/user/login
>
> > > which returns an "
> > > invalid function
> > > page.
>
> > > On Wed, Jul 15, 2009 at 5:00 PM, mdipierro 
> > wrote:
>
> > > > What triggers it?
>
> > > > On Jul 15, 4:04 pm, Yarko Tymciurak  wrote:
> > > > > ... it's trying to go to reddish/redish_plugin/user/login (no such
> > fcn
> > > > > indeed)
>
> > > > > On Wed, Jul 15, 2009 at 4:02 PM, Yarko Tymciurak 
> > > > wrote:
> > > > > > strange - login - invalid function!  (registration works, logs
> > in... so
> > > > I'm
> > > > > > still testing...)
>
> > > > > > On Wed, Jul 15, 2009 at 2:40 PM, Massimo Di Pierro <
> > > > > > mdipie...@cs.depaul.edu> wrote:
>
> > > > > >> You are right. The version of reddish that is posted is much worse
> > > > > >> than I thought. So I rewrote it.
>
> > > > > >> Please test it and let me know.
>
> > > > > >> Should work on GAE too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26672] Authentication

2009-07-16 Thread FERNANDO VILLARROEL


Dear all.

I am trying to use authentication:

http://www.web2py.com/examples/default/tools

I have the following code on my db.py:


from gluon.tools import *
auth=Auth(globals(),db)# authentication/authorization

# define custom tables (table_user_name is 'auth_user')
auth.settings.table_user = db.define_table(auth.settings.table_user_name, 
db.Field('first_name', length=128,default=''),
db.Field('last_name', length=128,default=''),
db.Field('email', length=128,default='', requires = [IS_EMAIL(), 
IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]), 
db.Field('password', 'password', readable=False, label='Password', 
requires=CRYPT()),
db.Field('registration_key', length=128, writable=False, 
readable=False,default=''),migrate=False)


auth.define_tables()# creates all needed tables
auth.settings.create_user_groups=False

But the application return the next exception:

  self._db._execute(query)
  File "/home/fvillarroel/web2py/gluon/sql.py", line 726, in 
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: no existe la relación «auth_group»

What is the struct of the table auth_group?

what i am doing wrong?

Any idea or how i can solved the problem.

Fernando


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26671] Re: custom form problem

2009-07-16 Thread murray3

Any help with this would be great as I am stuck and cannot get it to
work :(
I had FCKeditor working as  wiki editor I was able to open and save
fields
to the db without any problems.
I moved the app code to the jpolite framework and now when I edit a
field it does not
update the database.
The form_main_tab , which uses FORM(), is where the problem seems to
be.
I am using sqlform in another part of my app also within jpolite and
it uPdates the db without problem.
If anyone could just look at to see if there is anything obvious in
the FORM definition of form_main_tab.
thanks
Chrism

> In controller:
> def m203():
>      try: thisprodj_id=db(db.prodj.id==request.args[0]).select()[0]
>      except: redirect(URL(r=request,f='index'))
>      form_maintab=FORM(DIV(TEXTAREA(_style="width: 98%;",
> _name="form_main_tab", _id="form_main_tab",value=XML
> (thisprodj_id.main_tab))),INPUT
> (_type="submit",_value="Save"),_class='ajaxform1')  # ,sanitize=True
> does not show images in form?
>      if form_maintab.accepts(request.vars,session,keepvalues=True):
>          thisprodj_id.update_record   # updates record - not woking in 
> jpolite?
> (main_tab=form_maintab.vars.form_main_tab)
>          response.flash="form accepted!"
>      elif form_maintab.errors:
>          response.flash="form is invalid!"
>      form_wikitab0=FORM(DIV(TEXTAREA(_style="width: 98%;",
> _name="form_wiki_tab0", _id="form_wiki_tab0",value=XML
> (thisprodj_id.wiki_tab0))),INPUT
> (_type="submit",_value="Save"),_class='ajaxform1')  # ,sanitize=True
> does not show inages in form?
>      if form_wikitab0.accepts(request.vars,session,keepvalues=True):
>          thisprodj_id.update_record
> (wiki_tab0=form_wikitab0.vars.form_wiki_tab0)
>          response.flash="form accepted!"
>      elif form_wikitab0.errors:
>          response.flash="form is invalid!"
>      return dict
> (form_maintab=form_maintab,form_wikitab0=form_wikitab0,prodj=thisprodj_id)
>
> in view:
> 
> {{=prodj.name}}
> 
> 
>    Prodj Home
>    Wiki
>    Parts List
>    Files
>    {{=LI(A("Show Prodj",_href=URL(r=request,f='m202',args=
> [prodj.id]),_class='local'))}}
> 
> 
> {{=form_maintab}}
> 
> {{=form_wikitab0}}
> 
> 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26670] Re: Oracle Errors on multiple row retrieval

2009-07-16 Thread mdipierro

try db.commit() after the first fetch.

On 16 Lug, 15:07, DJ  wrote:
> Hi there,
>
> I get these errors when I run a search query (retrieve multiple rows),
> but not when I do a single row retrieval (such as viewing a record).
> Any suggestions or methods to get around this?
>
> -Sebastian
>
> Traceback (most recent call last):
>   File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
> \gluon\restricted.py", line 98, in restricted
>     exec ccode in environment
>   File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
> \applications\myapp/views/viewer/search.html", line 67, in 
>   File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
> \gluon\globals.py", line 84, in write
>     self.body.write(xmlescape(data))
>   File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
> \gluon\html.py", line 97, in xmlescape
>     data = str(data)
> ProgrammingError: LOB variable no longer valid after subsequent fetch
>
> Version: 1.65.5
> CX_Oracle docs for LOB:http://cx-oracle.sourceforge.net/html/lob.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26669] Re: clear select() cache on GAE?

2009-07-16 Thread mdipierro

yes

cache.ram.clear(regex="")

On 16 Lug, 13:16, Dan  wrote:
> Hello- I saw this thread which discusses ways to clear a cached select
> () result on non-GAE platforms. Is there a way to use the cache.clear
> (regex=??) command to remove the results of a known datastore query
> that works on GAE too?
> Dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26668] Unladen Swallow

2009-07-16 Thread Jonathan Lundell
http://arstechnica.com/open-source/news/2009/07/new-milestone-release-of-unladen-swallow-shows-progress.ars

I didn't see a mention of this in the list archive. It's early days  
yet, of course, but I see that Django's getting some free publicity.  
Of course there's the Google connection to thank for that.

The Unladen Swallow project, which seeks to bring a 5-fold performance  
boost to the Python programming language, has delivered its first  
milestone release. Although the project hasn't delivered real-world  
performance improvements yet, the new version is a big step forward  
and helps to demonstrate the technical viability of the effort.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26667] Oracle Errors on multiple row retrieval

2009-07-16 Thread DJ

Hi there,

I get these errors when I run a search query (retrieve multiple rows),
but not when I do a single row retrieval (such as viewing a record).
Any suggestions or methods to get around this?

-Sebastian

Traceback (most recent call last):
  File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
\gluon\restricted.py", line 98, in restricted
exec ccode in environment
  File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
\applications\myapp/views/viewer/search.html", line 67, in 
  File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
\gluon\globals.py", line 84, in write
self.body.write(xmlescape(data))
  File "C:\Documents and Settings\sjayaraj\Desktop\web2py_src\web2py
\gluon\html.py", line 97, in xmlescape
data = str(data)
ProgrammingError: LOB variable no longer valid after subsequent fetch


Version: 1.65.5
CX_Oracle docs for LOB: http://cx-oracle.sourceforge.net/html/lob.html

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26666] clear select() cache on GAE?

2009-07-16 Thread Dan

Hello- I saw this thread which discusses ways to clear a cached select
() result on non-GAE platforms. Is there a way to use the cache.clear
(regex=??) command to remove the results of a known datastore query
that works on GAE too?
Dan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26665] Re: Cron not working with Controller Functions

2009-07-16 Thread Fran

On Jul 16, 6:30 pm, Fran  wrote:
> Another cron issue I have is that even the wrapper script file isn't
> working when running as a Windows Service (http://mdp.cti.depaul.edu/
> AlterEgo/default/show/77).
> - even if I keep accessing the server, so it's not just rveerting to
> Soft mode.

I can see that the file web2py/applications/admin/cron/cron.master is
updated when I access a page, but not otherwise...does this suggest
that the service can only do softcron?

PS I sent a patch to Masimo to fix the typo in 'horly' (not that this
affects me)

F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26664] Re: Cron not working with Controller Functions

2009-07-16 Thread Fran

On Jul 16, 5:03 pm, AchipA  wrote:
> Depending on the cron mode, you likely won't see the logging.warn as
> it is executed in a different process when called from cron. When
> called from the script, the warn is executed in the 'main' process and
> hence you can see it. So that in itself does not mean anything.

Right yes, sorry - I reduced the call to that simple function when my
1st attempts failed.
The real call is an email send using mail.send()
This works fine, as a Hard Cron, if I'm running the Widget & using the
wrapper script to call it.

> When
> debugging cron functions, first make sure it works by calling it via -
> S app/contr/func as debug output will be hard to obtain straight from
> subprocesses.

The function itself works fine from the Web UI, via the CLI called
like this & via the wrapper script called by Cron.
It fails when trying to call from Cron direct.

Another cron issue I have is that even the wrapper script file isn't
working when running as a Windows Service (http://mdp.cti.depaul.edu/
AlterEgo/default/show/77).
- even if I keep accessing the server, so it's not just rveerting to
Soft mode.

Any further tips on debugging either of these issues would be
welcome :)

F

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26663] Re: Custom SQLFORM problem

2009-07-16 Thread mdipierro

On Jul 16, 11:47 am, Artman  wrote:
> Hi. I'm trying to take advantage of SQLFORM but without returning it
> to the view where I placed a custom form. But when I submit the form,
> everything seems to be ok, no form.errors. But the data hasn't sent to
> the database! I'm sure I'm following the convention to naming the
> input tag and the Storage post back correctly. Anybody can help me? In
> my custome form, I have changed a text-input-tag into a ,
> where the values are stored in  tag. Is it the problem?

It could be but I cannot say without looking at the code. If you could
post the model, validators, action and view, I may be able to help
more.

Massimo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26662] Custom SQLFORM problem

2009-07-16 Thread Artman

Hi. I'm trying to take advantage of SQLFORM but without returning it
to the view where I placed a custom form. But when I submit the form,
everything seems to be ok, no form.errors. But the data hasn't sent to
the database! I'm sure I'm following the convention to naming the
input tag and the Storage post back correctly. Anybody can help me? In
my custome form, I have changed a text-input-tag into a ,
where the values are stored in  tag. Is it the problem?
Thanks. (I don't know why I can't get a new line by pressing Enter key
in this text area; it makes the text sort of hard to read. Sorry!)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26661] Re: web2py cache

2009-07-16 Thread mdipierro

I do not understand the question.

Something is creating the object (a function or a constructor, which
is also a function).

myobject=MyObject()

You can only reference the object after it has been created or after
is has been extracted from cache. This means the constructor of the
object must be called the first time but not the second time.

myobject = get_me_the_object_from_cache_or_make_one_using(MyObject())

In web2py this is translated as

myobject = cache.ram('myobject',lambda: MyObject(), 10**10)

If you already have the object you want to cache you can do this:

if I already_have_the object_I_want_to_cache:
cache.ram('myobject',lambda:myobject,0)
else: # get me the object
myobject = cache.ram('myobject',lambda: None,10**10)

Since web2py 1.65.4 you can use None instead of 10**10 and None means:
never expires. 0 means expires now.

On Jul 16, 11:29 am, klarson  wrote:
> I understand that but I was wondering if there was a way to just cache
> the object without having to call a function, i.e. a way to cache
> large objects instead of storing them in session or pickling.
>
> For a little background, I'm grafting large trees together.  The user
> would search and view trees to copy what they need to a clipboard and
> then graft into the super tree later.  Since I have already created
> the trees when searching, I want to cache them.  When I go back to the
> super tree I can do the paste without recreating that copied tree.
>
> I think I can do what I want by just caching the method so I was just
> wondering if I can, or even should, try to cache the object directly.
>
> Thanks!
> Krista
>
> On Jul 10, 3:09 pm, mdipierro  wrote:
>
> > You alwayscachethe object returned by the function. The function can
> > be a dummy that returns the object you want tocache.
>
> > On Jul 10, 1:30 pm, krista  wrote:
>
> > > Is there a way to justcachethe object and not the function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26660] Re: Online Code dojo's, code sprints, etc.

2009-07-16 Thread JohnMc

Well your next option is vyew (http://vyew.com/site). But only half as
many participants and must have flash 9. (can be a problem for the
linux x64 crowd)  At least in the free category.

JohnMc

On Jul 16, 1:35 am, Yarko Tymciurak  wrote:
> Nice - alas, you can only share desktops from Mac or Windows
>
> I want to be able to share from my Linux (I _could_ run from Virtualbox
> windows, but somehow that seems like sacrelige!)
>
> On Wed, Jul 15, 2009 at 7:25 PM, JohnMc  wrote:
>
> > I like the idea.
>
> > You might take a look at Dim-Dim.
>
> > They provide the source code if you want to host yourself.
> > They offer free hosting for presentations < 20 participants.
>
> > I always recommend them, its good stuff.
>
> > JohnMc
>
> > On Jul 15, 4:22 pm, Yarko Tymciurak  wrote:
> > > Hi All -
>
> > > I've been thinking a lot about setting up project teams, live internet
> > code
> > > sprints... and it occurs to me that we could really use code dojos... (an
> > > "increase your skills" session versus  sprints, which are a bit more "I'm
> > > brining my skills and want to contribute"; of course you learn at each).
>
> > > Thinking about a dojo really helped me see this.
>
> > > I'd like to ask if anyone has any ideas, experience with live streaming
> > > broadcasts on the internet, and can recommend software and servers.  I've
> > > found a few things, but - as with IDE's, nothing beats the wisdom of the
> > > community!
>
> > > For dojo's, video of a leader, and being able to switch to a screencast
> > are
> > > the primary objectives (this, along with an IRC, a pastebin and a
> > mercurial
> > > repository should do it; for sprints - where we have no more than 5
> > people,
> > > we could use skype conference calls too).
>
> > > For video / screen casting, latency should not be a big deal (30 second,
> > 1
> > > minute delay would probably be tolerable for following along with a dojo
> > > leader typing).
>
> > > The bigger concern for me is resolution - 320 x 240 for typing code will
> > be
> > > hard to either read, or to follow (in the case of a small portal moving
> > > around the hosting person's screen).
>
> > > Thanks for any suggestions / feedback!
>
> > > Regards,
> > > - Yarko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26659] Re: web2py cache

2009-07-16 Thread klarson

I understand that but I was wondering if there was a way to just cache
the object without having to call a function, i.e. a way to cache
large objects instead of storing them in session or pickling.

For a little background, I'm grafting large trees together.  The user
would search and view trees to copy what they need to a clipboard and
then graft into the super tree later.  Since I have already created
the trees when searching, I want to cache them.  When I go back to the
super tree I can do the paste without recreating that copied tree.

I think I can do what I want by just caching the method so I was just
wondering if I can, or even should, try to cache the object directly.

Thanks!
Krista

On Jul 10, 3:09 pm, mdipierro  wrote:
> You alwayscachethe object returned by the function. The function can
> be a dummy that returns the object you want tocache.
>
> On Jul 10, 1:30 pm, krista  wrote:
>
> > Is there a way to justcachethe object and not the function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26658] Re: Authentication for services

2009-07-16 Thread Jonathan Lundell

On Jul 16, 2009, at 7:57 AM, mdipierro wrote:

> PS.
>
> You can do still handle any type of special char in the url by using
> routes and mapping some args into a vars.

I suppose that solves the immediate problem, but along with the  
entirely legitimate role of web2py in machine-to-machine  
communications, where human readability is irrelevant, there's no real  
enforcement of readability anyway. Which of these is more human- 
readable, anyway?

http://localhost:8000/init/default/json_read_nologin/user%40domain.com
http://localhost:8000/init/default/json_read_nologin?email=user%40domain.com
http://localhost:8000/init/default/json_read_nologin/dXNlckBkb21haW4uY29tCg

web2py objects to the first, but not the second (vars) or third  
(base64), both of which include 'encoded characters'.


>
>
>
> On Jul 16, 9:54 am, mdipierro  wrote:
>> This is a big can of worms.
>>
>> @ is a reserved character and if used in urls, it should be  
>> encoded. I
>> do not want encoded chars in the URL because this defies the all
>> purpose: readability by humans.
>>
>> Massimo
>>
>> On Jul 16, 9:07 am, Jonathan Lundell  wrote:
>>
>>> On Jul 16, 2009, at 6:35 AM, Jonathan Lundell wrote:
>>
 On Jul 16, 2009, at 6:18 AM, mdipierro wrote:
>>
> web2py validates the URL and does allow the @ sign in the URL,  
> only
> alphanumaric characters, _, - and non-consecutive . and /.
>>
 Did you mean "does not allow"? Shouldn't the validation be more
 generous in the args section? There's nothing wrong with this as an
 http URL:
>>
 http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>>
 (Where does the validation happen?)
>>
>>> OK, that last was a dumb question, since I just finished  
>>> reformatting
>>> regex_url.
>>
>>> So here's the validation for args: ([\w\-][\=\./]?)+
>>
>>> I don't want to make a proposal here, since I have no idea what args
>>> consumers are assuming for validation. But it does seem reasonable  
>>> in
>>> the abstract to allow a little more than this pattern permits.
>>
>>> (And I could see piggybacking on the IS_HTTP_URL validator for the
>>> first cut.)
>>
> On Jul 16, 2:07 am, David Watson  wrote:
>> I'm using web2py 1.65.5 with google app engine.
>>
>> I've run into a problem with request.args in relation to my json
>> calls:
>>
>> @service.json
>> def json_read_nologin():
>>return request.args[0]
>>
>> or the same function defined sans the service decorator, both  
>> work
>> fine, as long as I don't pass something containing an @ sign,  
>> i.e.
>>
>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>>
>> this generates an invalid request even if url encoded:
>>
>> http://localhost:8000/init/default/json_read_nologin/user
>> %40domain.com
>>
>> I'm not sure what I'm doing wrong here but this behavior doesn't
>> seem
>> like what I'd expect.
>>
>> Thanks,
>> David
>>
>> On Jun 23, 8:47 pm, mdipierro  wrote:
>>
>>> You cannot mix authorization and services this way. It is
>>> complicated
>>> an there are many cases
>>
>>> If you have
>>
>>> @auth.requires_login()
>>> def acceptme():
>>>return 'accepted'
>>
>>> you can call "http:///acceptme.json"; and you will get aJSON
>>> response. You do not need the decorator.
>>
>>> @auth.requires_login()
>>> @service.json()
>>> def acceptme():
>>>return 'accepted'
>>> def run(): return service()
>>
>>> exposes "http:///service/json/acceptme"; before requiring  
>>> login.
>>
>>> @service.json()
>>> def acceptme():
>>>return 'accepted'
>>> @auth.requires_login()
>>> def run(): return service()
>>
>>> this should work but will require login for all services
>>
>>> @service.json()
>>> @auth.requires_login()
>>> def acceptme():
>>>return 'accepted'
>>> def run(): return service()
>>
>>> this is not completely clear to me why does not work but I see  
>>> some
>>> logical problems.
>>
>>> Massimo
>>
>>> On Jun 23, 7:31 pm, Hasanat Kazmi   
>>> wrote:
>>
 Here is an interesting behavior.
 i have following function
>>
 @auth.requires_login()
 @service.json
 @service.jsonrpc
 def acceptme():
return "accepted"
>>
 in this case, whatever username and password I give, I get
 returned
 "accepted" but if I put @auth.requires_login() after
 @service.jsonrpc,
 it always returns me "Object does not exist" .
>>
 I call it like 
 this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal
 ...
>>
 Anyone has an idea whats going on?
>>
 On Jun 4, 7:28 am, Alexei Vinidiktov  
 
 wrote:
>>
> I've tried this with the pyjamas tutorial and it didn't work.
> I've
> enabled user r

[web2py:26657] Re: Cron not working with Controller Functions

2009-07-16 Thread AchipA

Depending on the cron mode, you likely won't see the logging.warn as
it is executed in a different process when called from cron. When
called from the script, the warn is executed in the 'main' process and
hence you can see it. So that in itself does not mean anything. When
debugging cron functions, first make sure it works by calling it via -
S app/contr/func as debug output will be hard to obtain straight from
subprocesses.

On Jul 16, 5:46 pm, Fran  wrote:
> I'm using Trunk Source on Windows XP (Python-2.5.4)
>
> I can get Cron working fine if I do:
> */5   *       *       *       *       root *applications/myapp/cron/
> email_send.py
> However this fails:
> */5   *       *       *       *       root *mycontroller/email_send
>
> According to the docs, this should 
> work:http://web2py.com/examples/default/cron
>
> email_send function is currently just:
> import logging
> logging.warn('email about to be sent!')
>
> email_send.py is just:
> import urllib
> urllib.urlopen('http://%s/myapp/mycontroller/email_send' %
> request.env.http_host).read()
>
> Many thanks,
> Fran.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26656] Re: Web2Py Foundation?

2009-07-16 Thread JohnMc

There are resources for setting up foundations -- 
http://foundationcenter.org/getstarted/.
IRS has details as well -- 
http://www.irs.gov/charities/foundations/article/0,,id=127912,00.html.
Depending where you intend to operate you may also have state
reporting requirements. US viewpoint --

* Typically organized like a 'C' Corporation. That means you have to
have a board of directors and bylaws to be in compliance with
applicable state law.
* Have to have proper accounting of grants, other funds and
disbursements.
* Have quarterly filing requirements.

But Massimo, you are in a better position than most of us being at
DePaul. I think if you looked in your internal phone directory you
will probably find a office that handles nothing but grants and giving
(not the Pell stuff to students) to the University. You will probably
find that DePaul has assisted large donors in setting up foundations
to maximize the gifts. Find that person and they can probably tell you
all you need to know. If you are lucky and they feel generous they
might even have the legal docs in a Word file to give you.

But I do agree with AchipA you need a parttime staffer that knows how
to do the reporting.


On Jul 16, 9:29 am, mdipierro  wrote:
> But the is the point of the conservatory. We would not have to run our
> own foundation. They do it.
>
> Massimo
>
> On Jul 16, 9:21 am, AchipA  wrote:
>
> > Running stuff (even if it's a non-profit organization like a
> > foundation) costs money. IANAL, not even an accountant and most
> > definitely do not live in the US, so I suggest getting more detailed
> > info about it from other people already running free software
> > foundations (FSF, OSGeo, Apache, etc).
>
> > On Jul 16, 3:21 pm, mdipierro  wrote:
>
> > > Can you elaborate? specifically on the last point.
>
> > > On Jul 16, 5:30 am, AchipA  wrote:
>
> > > > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > > > Upside:
> > > > - clear authority with regard to announcements, project stance,
> > > > roadmap, etc
> > > > - clear ownership of copyright, licenses, and source of help for
> > > > developers/companies interested in that matter
> > > > - well defined source of additional resources, contacts, etc
> > > > - allows some organizational burden taken off of the core developer's
> > > > back
>
> > > > Downside:
> > > > - more paperwork
> > > > - needs dedicated people (generally not developers, but people with
> > > > organisational skills) who can run things for *long* periods of time
> > > > (volunteering for particular projects is another issue)
> > > > - decisions can get bogged down if things get 'too' democratic/
> > > > commitee driven
> > > > - material cost even if it's non-profit (registration, tax stuff,
> > > > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26655] Re: Authentication against a web2py hosted json function from python client

2009-07-16 Thread Fran

On Jul 16, 4:43 pm, Fran  wrote:
> @service.xmlrpc

I see you use JSON, so:
@service.jsonrpc

> from xmlrpclib import ServerProxy
> server = ServerProxy('http:///app/default/call/xmlrpc')
> print server.myfunction('user', 'password')

from jsonrpc import ServiceProxy
server = ServiceProxy("http://localhost:8000/app/default/call/
jsonrpc")
server.myfunction("user","password")

F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26654] Cron not working with Controller Functions

2009-07-16 Thread Fran

I'm using Trunk Source on Windows XP (Python-2.5.4)

I can get Cron working fine if I do:
*/5   *   *   *   *   root *applications/myapp/cron/
email_send.py
However this fails:
*/5   *   *   *   *   root *mycontroller/email_send

According to the docs, this should work:
http://web2py.com/examples/default/cron

email_send function is currently just:
import logging
logging.warn('email about to be sent!')

email_send.py is just:
import urllib
urllib.urlopen('http://%s/myapp/mycontroller/email_send' %
request.env.http_host).read()

Many thanks,
Fran.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26653] Re: Authentication against a web2py hosted json function from python client

2009-07-16 Thread Fran

On Jul 16, 4:38 pm, David Watson  wrote:
> What is this login_bare that you speak of? The page that you
> reference, which I had previously read, makes no mention of it, and
> google seems to know nothing of it.

It's defined in gluon/tools.py

> I assume your example is server-side

Yes

>, if so, where do the username and password come from?

Passed as arguments to the function:
@service.xmlrpc
def myfunction(username, password):
...

> And are we talking about the basic auth client encoding that I referenced?

I use some thing like (http://web2py.com/examples/default/
tools#services):
from xmlrpclib import ServerProxy
server = ServerProxy('http:///app/default/call/xmlrpc')
print server.myfunction('user', 'password')

F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26652] Re: Authentication for services

2009-07-16 Thread David Watson

Perhaps ironically, the case I'm talking about is machine-to-machine,
no humans involved. While I understand the need for human readability,
that restriction seems like throwing the baby out with the bathwater.
That said, I'll have a look at routes.py.

On Jul 16, 10:54 am, mdipierro  wrote:
> This is a big can of worms.
>
> @ is a reserved character and if used in urls, it should be encoded. I
> do not want encoded chars in the URL because this defies the all
> purpose: readability by humans.
>
> Massimo
>
> On Jul 16, 9:07 am, Jonathan Lundell  wrote:
>
> > On Jul 16, 2009, at 6:35 AM, Jonathan Lundell wrote:
>
> > > On Jul 16, 2009, at 6:18 AM, mdipierro wrote:
>
> > >> web2py validates the URL and does allow the @ sign in the URL, only
> > >> alphanumaric characters, _, - and non-consecutive . and /.
>
> > > Did you mean "does not allow"? Shouldn't the validation be more
> > > generous in the args section? There's nothing wrong with this as an
> > > http URL:
>
> > >http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>
> > > (Where does the validation happen?)
>
> > OK, that last was a dumb question, since I just finished reformatting  
> > regex_url.
>
> > So here's the validation for args: ([\w\-][\=\./]?)+
>
> > I don't want to make a proposal here, since I have no idea what args  
> > consumers are assuming for validation. But it does seem reasonable in  
> > the abstract to allow a little more than this pattern permits.
>
> > (And I could see piggybacking on the IS_HTTP_URL validator for the  
> > first cut.)
>
> > >> On Jul 16, 2:07 am, David Watson  wrote:
> > >>> I'm using web2py 1.65.5 with google app engine.
>
> > >>> I've run into a problem with request.args in relation to my json
> > >>> calls:
>
> > >>> @service.json
> > >>> def json_read_nologin():
> > >>>    return request.args[0]
>
> > >>> or the same function defined sans the service decorator, both work
> > >>> fine, as long as I don't pass something containing an @ sign, i.e.
>
> > >>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>
> > >>> this generates an invalid request even if url encoded:
>
> > >>>http://localhost:8000/init/default/json_read_nologin/user
> > >>> %40domain.com
>
> > >>> I'm not sure what I'm doing wrong here but this behavior doesn't  
> > >>> seem
> > >>> like what I'd expect.
>
> > >>> Thanks,
> > >>> David
>
> > >>> On Jun 23, 8:47 pm, mdipierro  wrote:
>
> >  You cannot mix authorization and services this way. It is
> >  complicated
> >  an there are many cases
>
> >  If you have
>
> >  @auth.requires_login()
> >  def acceptme():
> >     return 'accepted'
>
> >  you can call "http:///acceptme.json"; and you will get aJSON
> >  response. You do not need the decorator.
>
> >  @auth.requires_login()
> >  @service.json()
> >  def acceptme():
> >     return 'accepted'
> >  def run(): return service()
>
> >  exposes "http:///service/json/acceptme"; before requiring login.
>
> >  @service.json()
> >  def acceptme():
> >     return 'accepted'
> >  @auth.requires_login()
> >  def run(): return service()
>
> >  this should work but will require login for all services
>
> >  @service.json()
> >  @auth.requires_login()
> >  def acceptme():
> >     return 'accepted'
> >  def run(): return service()
>
> >  this is not completely clear to me why does not work but I see some
> >  logical problems.
>
> >  Massimo
>
> >  On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>
> > > Here is an interesting behavior.
> > > i have following function
>
> > > @auth.requires_login()
> > > @service.json
> > > @service.jsonrpc
> > > def acceptme():
> > >    return "accepted"
>
> > > in this case, whatever username and password I give, I get  
> > > returned
> > > "accepted" but if I put @auth.requires_login() after
> > > @service.jsonrpc,
> > > it always returns me "Object does not exist" .
>
> > > I call it like 
> > > this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal
> > > ...
>
> > > Anyone has an idea whats going on?
>
> > > On Jun 4, 7:28 am, Alexei Vinidiktov 
> > > wrote:
>
> > >> I've tried this with the pyjamas tutorial and it didn't work.  
> > >> I've
> > >> enabled user registration and registered a user whose
> > >> credentials are
> > >> used in the URL below. I got a server error when a function
> > >> requiring
> > >> user authentication was called.
>
> > >> I changed the line
>
> > >> JSONProxy.__init__(self, "../../default/call/jsonrpc",
> > >> ["getTasks",
> > >> "addTask","deleteTask"])
>
> > >> to read
>
> > >> JSONProxy.__init__(self,
> > >> "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul
> > >> ...",
> > >> ["getTasks", "addTask","deleteTask"])
>
> > >> What am I miss

[web2py:26651] Re: Authentication against a web2py hosted json function from python client

2009-07-16 Thread David Watson

Fran,

What is this login_bare that you speak of? The page that you
reference, which I had previously read, makes no mention of it, and
google seems to know nothing of it.

I assume your example is server-side, if so, where do the username and
password come from? And are we talking about the basic auth client
encoding that I referenced?

Thanks,
David

On Jul 16, 5:54 am, Fran  wrote:
> On Jul 16, 8:18 am, David Watson  wrote:
>
> > I'm trying to get authentication working for a python client talking
> > to a web2py json function. I'm using the @auth.requires_login()
> > decorator but I can't seem to get a successful login (works fine from
> > the user login web page).
>
> Don't use @auth.requires_login() decorator with services.
> (See this 
> thread:http://groups.google.com/group/web2py/browse_thread/thread/6c7fe7cb5b...)
>
> Instead use:
>
> user = auth.login_bare(username, password)
> if not user:
>     return "authentication failed"
>
> F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26650] Re: Web2Py Foundation?

2009-07-16 Thread AchipA

I can only repeat I'm not a lawyer , but the difference as I
understand it is that then there is no foundation. You have the
conservancy, which you you're a member project of, and they apparently
provide some services, but you're not a separate legal entity. Whether
that's what you want or not is your call.

On Jul 16, 4:29 pm, mdipierro  wrote:
> But the is the point of the conservatory. We would not have to run our
> own foundation. They do it.
>
> Massimo
>
> On Jul 16, 9:21 am, AchipA  wrote:
>
> > Running stuff (even if it's a non-profit organization like a
> > foundation) costs money. IANAL, not even an accountant and most
> > definitely do not live in the US, so I suggest getting more detailed
> > info about it from other people already running free software
> > foundations (FSF, OSGeo, Apache, etc).
>
> > On Jul 16, 3:21 pm, mdipierro  wrote:
>
> > > Can you elaborate? specifically on the last point.
>
> > > On Jul 16, 5:30 am, AchipA  wrote:
>
> > > > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > > > Upside:
> > > > - clear authority with regard to announcements, project stance,
> > > > roadmap, etc
> > > > - clear ownership of copyright, licenses, and source of help for
> > > > developers/companies interested in that matter
> > > > - well defined source of additional resources, contacts, etc
> > > > - allows some organizational burden taken off of the core developer's
> > > > back
>
> > > > Downside:
> > > > - more paperwork
> > > > - needs dedicated people (generally not developers, but people with
> > > > organisational skills) who can run things for *long* periods of time
> > > > (volunteering for particular projects is another issue)
> > > > - decisions can get bogged down if things get 'too' democratic/
> > > > commitee driven
> > > > - material cost even if it's non-profit (registration, tax stuff,
> > > > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26649] Re: Authentication for services

2009-07-16 Thread mdipierro

PS.

You can do still handle any type of special char in the url by using
routes and mapping some args into a vars.



On Jul 16, 9:54 am, mdipierro  wrote:
> This is a big can of worms.
>
> @ is a reserved character and if used in urls, it should be encoded. I
> do not want encoded chars in the URL because this defies the all
> purpose: readability by humans.
>
> Massimo
>
> On Jul 16, 9:07 am, Jonathan Lundell  wrote:
>
> > On Jul 16, 2009, at 6:35 AM, Jonathan Lundell wrote:
>
> > > On Jul 16, 2009, at 6:18 AM, mdipierro wrote:
>
> > >> web2py validates the URL and does allow the @ sign in the URL, only
> > >> alphanumaric characters, _, - and non-consecutive . and /.
>
> > > Did you mean "does not allow"? Shouldn't the validation be more
> > > generous in the args section? There's nothing wrong with this as an
> > > http URL:
>
> > >http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>
> > > (Where does the validation happen?)
>
> > OK, that last was a dumb question, since I just finished reformatting  
> > regex_url.
>
> > So here's the validation for args: ([\w\-][\=\./]?)+
>
> > I don't want to make a proposal here, since I have no idea what args  
> > consumers are assuming for validation. But it does seem reasonable in  
> > the abstract to allow a little more than this pattern permits.
>
> > (And I could see piggybacking on the IS_HTTP_URL validator for the  
> > first cut.)
>
> > >> On Jul 16, 2:07 am, David Watson  wrote:
> > >>> I'm using web2py 1.65.5 with google app engine.
>
> > >>> I've run into a problem with request.args in relation to my json
> > >>> calls:
>
> > >>> @service.json
> > >>> def json_read_nologin():
> > >>>    return request.args[0]
>
> > >>> or the same function defined sans the service decorator, both work
> > >>> fine, as long as I don't pass something containing an @ sign, i.e.
>
> > >>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>
> > >>> this generates an invalid request even if url encoded:
>
> > >>>http://localhost:8000/init/default/json_read_nologin/user
> > >>> %40domain.com
>
> > >>> I'm not sure what I'm doing wrong here but this behavior doesn't  
> > >>> seem
> > >>> like what I'd expect.
>
> > >>> Thanks,
> > >>> David
>
> > >>> On Jun 23, 8:47 pm, mdipierro  wrote:
>
> >  You cannot mix authorization and services this way. It is
> >  complicated
> >  an there are many cases
>
> >  If you have
>
> >  @auth.requires_login()
> >  def acceptme():
> >     return 'accepted'
>
> >  you can call "http:///acceptme.json"; and you will get aJSON
> >  response. You do not need the decorator.
>
> >  @auth.requires_login()
> >  @service.json()
> >  def acceptme():
> >     return 'accepted'
> >  def run(): return service()
>
> >  exposes "http:///service/json/acceptme"; before requiring login.
>
> >  @service.json()
> >  def acceptme():
> >     return 'accepted'
> >  @auth.requires_login()
> >  def run(): return service()
>
> >  this should work but will require login for all services
>
> >  @service.json()
> >  @auth.requires_login()
> >  def acceptme():
> >     return 'accepted'
> >  def run(): return service()
>
> >  this is not completely clear to me why does not work but I see some
> >  logical problems.
>
> >  Massimo
>
> >  On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>
> > > Here is an interesting behavior.
> > > i have following function
>
> > > @auth.requires_login()
> > > @service.json
> > > @service.jsonrpc
> > > def acceptme():
> > >    return "accepted"
>
> > > in this case, whatever username and password I give, I get  
> > > returned
> > > "accepted" but if I put @auth.requires_login() after
> > > @service.jsonrpc,
> > > it always returns me "Object does not exist" .
>
> > > I call it like 
> > > this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal
> > > ...
>
> > > Anyone has an idea whats going on?
>
> > > On Jun 4, 7:28 am, Alexei Vinidiktov 
> > > wrote:
>
> > >> I've tried this with the pyjamas tutorial and it didn't work.  
> > >> I've
> > >> enabled user registration and registered a user whose
> > >> credentials are
> > >> used in the URL below. I got a server error when a function
> > >> requiring
> > >> user authentication was called.
>
> > >> I changed the line
>
> > >> JSONProxy.__init__(self, "../../default/call/jsonrpc",
> > >> ["getTasks",
> > >> "addTask","deleteTask"])
>
> > >> to read
>
> > >> JSONProxy.__init__(self,
> > >> "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul
> > >> ...",
> > >> ["getTasks", "addTask","deleteTask"])
>
> > >> What am I missing?
>
> > >> Thanks.
>
> > >> On Mon, Jun 1, 2009 at 12:51 PM, mdipierro
> > >>  wrote:
>
> > >>> OK. As you request si

[web2py:26648] Re: Authentication for services

2009-07-16 Thread mdipierro

This is a big can of worms.

@ is a reserved character and if used in urls, it should be encoded. I
do not want encoded chars in the URL because this defies the all
purpose: readability by humans.

Massimo


On Jul 16, 9:07 am, Jonathan Lundell  wrote:
> On Jul 16, 2009, at 6:35 AM, Jonathan Lundell wrote:
>
>
>
> > On Jul 16, 2009, at 6:18 AM, mdipierro wrote:
>
> >> web2py validates the URL and does allow the @ sign in the URL, only
> >> alphanumaric characters, _, - and non-consecutive . and /.
>
> > Did you mean "does not allow"? Shouldn't the validation be more
> > generous in the args section? There's nothing wrong with this as an
> > http URL:
>
> >http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>
> > (Where does the validation happen?)
>
> OK, that last was a dumb question, since I just finished reformatting  
> regex_url.
>
> So here's the validation for args: ([\w\-][\=\./]?)+
>
> I don't want to make a proposal here, since I have no idea what args  
> consumers are assuming for validation. But it does seem reasonable in  
> the abstract to allow a little more than this pattern permits.
>
> (And I could see piggybacking on the IS_HTTP_URL validator for the  
> first cut.)
>
>
>
> >> On Jul 16, 2:07 am, David Watson  wrote:
> >>> I'm using web2py 1.65.5 with google app engine.
>
> >>> I've run into a problem with request.args in relation to my json
> >>> calls:
>
> >>> @service.json
> >>> def json_read_nologin():
> >>>    return request.args[0]
>
> >>> or the same function defined sans the service decorator, both work
> >>> fine, as long as I don't pass something containing an @ sign, i.e.
>
> >>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>
> >>> this generates an invalid request even if url encoded:
>
> >>>http://localhost:8000/init/default/json_read_nologin/user
> >>> %40domain.com
>
> >>> I'm not sure what I'm doing wrong here but this behavior doesn't  
> >>> seem
> >>> like what I'd expect.
>
> >>> Thanks,
> >>> David
>
> >>> On Jun 23, 8:47 pm, mdipierro  wrote:
>
>  You cannot mix authorization and services this way. It is
>  complicated
>  an there are many cases
>
>  If you have
>
>  @auth.requires_login()
>  def acceptme():
>     return 'accepted'
>
>  you can call "http:///acceptme.json"; and you will get aJSON
>  response. You do not need the decorator.
>
>  @auth.requires_login()
>  @service.json()
>  def acceptme():
>     return 'accepted'
>  def run(): return service()
>
>  exposes "http:///service/json/acceptme"; before requiring login.
>
>  @service.json()
>  def acceptme():
>     return 'accepted'
>  @auth.requires_login()
>  def run(): return service()
>
>  this should work but will require login for all services
>
>  @service.json()
>  @auth.requires_login()
>  def acceptme():
>     return 'accepted'
>  def run(): return service()
>
>  this is not completely clear to me why does not work but I see some
>  logical problems.
>
>  Massimo
>
>  On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>
> > Here is an interesting behavior.
> > i have following function
>
> > @auth.requires_login()
> > @service.json
> > @service.jsonrpc
> > def acceptme():
> >    return "accepted"
>
> > in this case, whatever username and password I give, I get  
> > returned
> > "accepted" but if I put @auth.requires_login() after
> > @service.jsonrpc,
> > it always returns me "Object does not exist" .
>
> > I call it like 
> > this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal
> > ...
>
> > Anyone has an idea whats going on?
>
> > On Jun 4, 7:28 am, Alexei Vinidiktov 
> > wrote:
>
> >> I've tried this with the pyjamas tutorial and it didn't work.  
> >> I've
> >> enabled user registration and registered a user whose
> >> credentials are
> >> used in the URL below. I got a server error when a function
> >> requiring
> >> user authentication was called.
>
> >> I changed the line
>
> >> JSONProxy.__init__(self, "../../default/call/jsonrpc",
> >> ["getTasks",
> >> "addTask","deleteTask"])
>
> >> to read
>
> >> JSONProxy.__init__(self,
> >> "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul
> >> ...",
> >> ["getTasks", "addTask","deleteTask"])
>
> >> What am I missing?
>
> >> Thanks.
>
> >> On Mon, Jun 1, 2009 at 12:51 PM, mdipierro
> >>  wrote:
>
> >>> OK. As you request since the latest version in trunk you can do
>
> >>> @auth.requires_login()
> >>> def index(): return 'hello world'
>
> >>> and access it with
>
> >>>  curl -u username:passwordhttp://127.0.0.1:8000/app/default/
> >>> index
>
> >>> or
>
> >>>  curlhttp://username:passw...@127.0.0.1:8000/app/default/index
>
> >>> In the latter case username and

[web2py:26647] Re: Web2Py Foundation?

2009-07-16 Thread mdipierro

But the is the point of the conservatory. We would not have to run our
own foundation. They do it.

Massimo

On Jul 16, 9:21 am, AchipA  wrote:
> Running stuff (even if it's a non-profit organization like a
> foundation) costs money. IANAL, not even an accountant and most
> definitely do not live in the US, so I suggest getting more detailed
> info about it from other people already running free software
> foundations (FSF, OSGeo, Apache, etc).
>
> On Jul 16, 3:21 pm, mdipierro  wrote:
>
> > Can you elaborate? specifically on the last point.
>
> > On Jul 16, 5:30 am, AchipA  wrote:
>
> > > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > > Upside:
> > > - clear authority with regard to announcements, project stance,
> > > roadmap, etc
> > > - clear ownership of copyright, licenses, and source of help for
> > > developers/companies interested in that matter
> > > - well defined source of additional resources, contacts, etc
> > > - allows some organizational burden taken off of the core developer's
> > > back
>
> > > Downside:
> > > - more paperwork
> > > - needs dedicated people (generally not developers, but people with
> > > organisational skills) who can run things for *long* periods of time
> > > (volunteering for particular projects is another issue)
> > > - decisions can get bogged down if things get 'too' democratic/
> > > commitee driven
> > > - material cost even if it's non-profit (registration, tax stuff,
> > > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26646] Re: Web2Py Foundation?

2009-07-16 Thread AchipA

Running stuff (even if it's a non-profit organization like a
foundation) costs money. IANAL, not even an accountant and most
definitely do not live in the US, so I suggest getting more detailed
info about it from other people already running free software
foundations (FSF, OSGeo, Apache, etc).

On Jul 16, 3:21 pm, mdipierro  wrote:
> Can you elaborate? specifically on the last point.
>
> On Jul 16, 5:30 am, AchipA  wrote:
>
> > MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> > Upside:
> > - clear authority with regard to announcements, project stance,
> > roadmap, etc
> > - clear ownership of copyright, licenses, and source of help for
> > developers/companies interested in that matter
> > - well defined source of additional resources, contacts, etc
> > - allows some organizational burden taken off of the core developer's
> > back
>
> > Downside:
> > - more paperwork
> > - needs dedicated people (generally not developers, but people with
> > organisational skills) who can run things for *long* periods of time
> > (volunteering for particular projects is another issue)
> > - decisions can get bogged down if things get 'too' democratic/
> > commitee driven
> > - material cost even if it's non-profit (registration, tax stuff,
> > attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26645] Re: Authentication for services

2009-07-16 Thread Jonathan Lundell

On Jul 16, 2009, at 6:35 AM, Jonathan Lundell wrote:

>
> On Jul 16, 2009, at 6:18 AM, mdipierro wrote:
>
>>
>> web2py validates the URL and does allow the @ sign in the URL, only
>> alphanumaric characters, _, - and non-consecutive . and /.
>
> Did you mean "does not allow"? Shouldn't the validation be more
> generous in the args section? There's nothing wrong with this as an
> http URL:
>
> http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>
> (Where does the validation happen?)

OK, that last was a dumb question, since I just finished reformatting  
regex_url.

So here's the validation for args: ([\w\-][\=\./]?)+

I don't want to make a proposal here, since I have no idea what args  
consumers are assuming for validation. But it does seem reasonable in  
the abstract to allow a little more than this pattern permits.

(And I could see piggybacking on the IS_HTTP_URL validator for the  
first cut.)

>
>>
>> On Jul 16, 2:07 am, David Watson  wrote:
>>> I'm using web2py 1.65.5 with google app engine.
>>>
>>> I've run into a problem with request.args in relation to my json
>>> calls:
>>>
>>> @service.json
>>> def json_read_nologin():
>>>return request.args[0]
>>>
>>> or the same function defined sans the service decorator, both work
>>> fine, as long as I don't pass something containing an @ sign, i.e.
>>>
>>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>>>
>>> this generates an invalid request even if url encoded:
>>>
>>> http://localhost:8000/init/default/json_read_nologin/user
>>> %40domain.com
>>>
>>> I'm not sure what I'm doing wrong here but this behavior doesn't  
>>> seem
>>> like what I'd expect.
>>>
>>> Thanks,
>>> David
>>>
>>> On Jun 23, 8:47 pm, mdipierro  wrote:
>>>
 You cannot mix authorization and services this way. It is
 complicated
 an there are many cases
>>>
 If you have
>>>
 @auth.requires_login()
 def acceptme():
return 'accepted'
>>>
 you can call "http:///acceptme.json"; and you will get aJSON
 response. You do not need the decorator.
>>>
 @auth.requires_login()
 @service.json()
 def acceptme():
return 'accepted'
 def run(): return service()
>>>
 exposes "http:///service/json/acceptme"; before requiring login.
>>>
 @service.json()
 def acceptme():
return 'accepted'
 @auth.requires_login()
 def run(): return service()
>>>
 this should work but will require login for all services
>>>
 @service.json()
 @auth.requires_login()
 def acceptme():
return 'accepted'
 def run(): return service()
>>>
 this is not completely clear to me why does not work but I see some
 logical problems.
>>>
 Massimo
>>>
 On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>>>
> Here is an interesting behavior.
> i have following function
>>>
> @auth.requires_login()
> @service.json
> @service.jsonrpc
> def acceptme():
>return "accepted"
>>>
> in this case, whatever username and password I give, I get  
> returned
> "accepted" but if I put @auth.requires_login() after
> @service.jsonrpc,
> it always returns me "Object does not exist" .
>>>
> I call it like 
> this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal
> ...
>>>
> Anyone has an idea whats going on?
>>>
> On Jun 4, 7:28 am, Alexei Vinidiktov 
> wrote:
>>>
>> I've tried this with the pyjamas tutorial and it didn't work.  
>> I've
>> enabled user registration and registered a user whose
>> credentials are
>> used in the URL below. I got a server error when a function
>> requiring
>> user authentication was called.
>>>
>> I changed the line
>>>
>> JSONProxy.__init__(self, "../../default/call/jsonrpc",
>> ["getTasks",
>> "addTask","deleteTask"])
>>>
>> to read
>>>
>> JSONProxy.__init__(self,
>> "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul
>> ...",
>> ["getTasks", "addTask","deleteTask"])
>>>
>> What am I missing?
>>>
>> Thanks.
>>>
>> On Mon, Jun 1, 2009 at 12:51 PM, mdipierro
>>  wrote:
>>>
>>> OK. As you request since the latest version in trunk you can do
>>>
>>> @auth.requires_login()
>>> def index(): return 'hello world'
>>>
>>> and access it with
>>>
>>>  curl -u username:passwordhttp://127.0.0.1:8000/app/default/
>>> index
>>>
>>> or
>>>
>>>  curlhttp://username:passw...@127.0.0.1:8000/app/default/index
>>>
>>> In the latter case username and password have to be encoded by
>>> urllib.quote()
>>>
>>> works for services too.
>>>
>>> Massimo
>>>
>>> On May 31, 10:43 pm, Dan  wrote:
 Since my last message on this thread, I came up with a patch
 to the
 Auth.login() code that lets me do what I need, so figured I
 should
 post it here. Let me know if you see any issues with this
>>>

[web2py:26644] Re: Authentication for services

2009-07-16 Thread Jonathan Lundell

On Jul 16, 2009, at 6:18 AM, mdipierro wrote:

>
> web2py validates the URL and does allow the @ sign in the URL, only
> alphanumaric characters, _, - and non-consecutive . and /.

Did you mean "does not allow"? Shouldn't the validation be more  
generous in the args section? There's nothing wrong with this as an  
http URL:

http://localhost:8000/init/default/json_read_nologin/user%40domain.com

(Where does the validation happen?)

>
> On Jul 16, 2:07 am, David Watson  wrote:
>> I'm using web2py 1.65.5 with google app engine.
>>
>> I've run into a problem with request.args in relation to my json
>> calls:
>>
>> @service.json
>> def json_read_nologin():
>> return request.args[0]
>>
>> or the same function defined sans the service decorator, both work
>> fine, as long as I don't pass something containing an @ sign, i.e.
>>
>> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>>
>> this generates an invalid request even if url encoded:
>>
>> http://localhost:8000/init/default/json_read_nologin/user 
>> %40domain.com
>>
>> I'm not sure what I'm doing wrong here but this behavior doesn't seem
>> like what I'd expect.
>>
>> Thanks,
>> David
>>
>> On Jun 23, 8:47 pm, mdipierro  wrote:
>>
>>> You cannot mix authorization and services this way. It is  
>>> complicated
>>> an there are many cases
>>
>>> If you have
>>
>>> @auth.requires_login()
>>> def acceptme():
>>> return 'accepted'
>>
>>> you can call "http:///acceptme.json"; and you will get aJSON
>>> response. You do not need the decorator.
>>
>>> @auth.requires_login()
>>> @service.json()
>>> def acceptme():
>>> return 'accepted'
>>> def run(): return service()
>>
>>> exposes "http:///service/json/acceptme"; before requiring login.
>>
>>> @service.json()
>>> def acceptme():
>>> return 'accepted'
>>> @auth.requires_login()
>>> def run(): return service()
>>
>>> this should work but will require login for all services
>>
>>> @service.json()
>>> @auth.requires_login()
>>> def acceptme():
>>> return 'accepted'
>>> def run(): return service()
>>
>>> this is not completely clear to me why does not work but I see some
>>> logical problems.
>>
>>> Massimo
>>
>>> On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>>
 Here is an interesting behavior.
 i have following function
>>
 @auth.requires_login()
 @service.json
 @service.jsonrpc
 def acceptme():
 return "accepted"
>>
 in this case, whatever username and password I give, I get returned
 "accepted" but if I put @auth.requires_login() after  
 @service.jsonrpc,
 it always returns me "Object does not exist" .
>>
 I call it like 
 this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal 
 ...
>>
 Anyone has an idea whats going on?
>>
 On Jun 4, 7:28 am, Alexei Vinidiktov 
 wrote:
>>
> I've tried this with the pyjamas tutorial and it didn't work. I've
> enabled user registration and registered a user whose  
> credentials are
> used in the URL below. I got a server error when a function  
> requiring
> user authentication was called.
>>
> I changed the line
>>
> JSONProxy.__init__(self, "../../default/call/jsonrpc",  
> ["getTasks",
> "addTask","deleteTask"])
>>
> to read
>>
> JSONProxy.__init__(self,
> "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul 
> ...",
> ["getTasks", "addTask","deleteTask"])
>>
> What am I missing?
>>
> Thanks.
>>
> On Mon, Jun 1, 2009 at 12:51 PM, mdipierro  
>  wrote:
>>
>> OK. As you request since the latest version in trunk you can do
>>
>> @auth.requires_login()
>> def index(): return 'hello world'
>>
>> and access it with
>>
>>   curl -u username:passwordhttp://127.0.0.1:8000/app/default/ 
>> index
>>
>> or
>>
>>   curlhttp://username:passw...@127.0.0.1:8000/app/default/index
>>
>> In the latter case username and password have to be encoded by
>> urllib.quote()
>>
>> works for services too.
>>
>> Massimo
>>
>> On May 31, 10:43 pm, Dan  wrote:
>>> Since my last message on this thread, I came up with a patch  
>>> to the
>>> Auth.login() code that lets me do what I need, so figured I  
>>> should
>>> post it here. Let me know if you see any issues with this  
>>> approach (or
>>> improvements to it).
>>
>>> To recap, what I want to do is to let a script runing wget  
>>> (not a
>>> browser)loginand then work with some parts of the app that  
>>> require
>>> membership in groups. I want to pass the user's name and  
>>> password to
>>> theloginformusing post variables in the URL. This is not  
>>> normally
>>> possible with web2py'sAuth.login() function, so it needs to be
>>> modified, like this-
>>
>>> referring to source code 
>>> here:http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools-pysrc
>>>  
>>> ...
>>> C

[web2py:26643] Re: Web2Py Foundation?

2009-07-16 Thread mdipierro

Can you elaborate? specifically on the last point.

On Jul 16, 5:30 am, AchipA  wrote:
> MapServer and OpenLayers, both under the OSGeo Foundation umbrella.
>
> Upside:
> - clear authority with regard to announcements, project stance,
> roadmap, etc
> - clear ownership of copyright, licenses, and source of help for
> developers/companies interested in that matter
> - well defined source of additional resources, contacts, etc
> - allows some organizational burden taken off of the core developer's
> back
>
> Downside:
> - more paperwork
> - needs dedicated people (generally not developers, but people with
> organisational skills) who can run things for *long* periods of time
> (volunteering for particular projects is another issue)
> - decisions can get bogged down if things get 'too' democratic/
> commitee driven
> - material cost even if it's non-profit (registration, tax stuff,
> attorney, whatever is needed in the particular country it's in)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26642] Re: report a small bug

2009-07-16 Thread mdipierro

You are right.

On Jul 16, 2:56 am, zhang zheng  wrote:
> in  gluon/contrib/login_methods/email_auth.py,   version 1.65.5
> ..
> try:
> server = smtplib.SMTP(host, port)
> server.ehlo()
> server.starttls()
> server.ehlo()
> server.login(email, password)
> server.quit()
> return True
> except:
> server.quit()
> return False
> return email_auth_aux
>
> if  smtplib.SMTP(host, port)   throw exception,  then  workflow execute the
> code "server.quit()"
> however,  now, server is just  a string object,   rather than  a instance of
> smtplib.SMTP
>
> Do you think it ?
>
> --
> 张峥
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26641] Re: Authentication for services

2009-07-16 Thread mdipierro

web2py validates the URL and does allow the @ sign in the URL, only
alphanumaric characters, _, - and non-consecutive . and /.

On Jul 16, 2:07 am, David Watson  wrote:
> I'm using web2py 1.65.5 with google app engine.
>
> I've run into a problem with request.args in relation to my json
> calls:
>
> @service.json
> def json_read_nologin():
>     return request.args[0]
>
> or the same function defined sans the service decorator, both work
> fine, as long as I don't pass something containing an @ sign, i.e.
>
> http://localhost:8000/init/default/json_read_nologin/u...@domain.com
>
> this generates an invalid request even if url encoded:
>
> http://localhost:8000/init/default/json_read_nologin/user%40domain.com
>
> I'm not sure what I'm doing wrong here but this behavior doesn't seem
> like what I'd expect.
>
> Thanks,
> David
>
> On Jun 23, 8:47 pm, mdipierro  wrote:
>
> > You cannot mix authorization and services this way. It is complicated
> > an there are many cases
>
> > If you have
>
> > @auth.requires_login()
> > def acceptme():
> >     return 'accepted'
>
> > you can call "http:///acceptme.json"; and you will get aJSON
> > response. You do not need the decorator.
>
> > @auth.requires_login()
> > @service.json()
> > def acceptme():
> >     return 'accepted'
> > def run(): return service()
>
> > exposes "http:///service/json/acceptme"; before requiring login.
>
> > @service.json()
> > def acceptme():
> >     return 'accepted'
> > @auth.requires_login()
> > def run(): return service()
>
> > this should work but will require login for all services
>
> > @service.json()
> > @auth.requires_login()
> > def acceptme():
> >     return 'accepted'
> > def run(): return service()
>
> > this is not completely clear to me why does not work but I see some
> > logical problems.
>
> > Massimo
>
> > On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>
> > > Here is an interesting behavior.
> > > i have following function
>
> > > @auth.requires_login()
> > > @service.json
> > > @service.jsonrpc
> > > def acceptme():
> > >     return "accepted"
>
> > > in this case, whatever username and password I give, I get returned
> > > "accepted" but if I put @auth.requires_login() after @service.jsonrpc,
> > > it always returns me "Object does not exist" .
>
> > > I call it like 
> > > this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal...
>
> > > Anyone has an idea whats going on?
>
> > > On Jun 4, 7:28 am, Alexei Vinidiktov 
> > > wrote:
>
> > > > I've tried this with the pyjamas tutorial and it didn't work. I've
> > > > enabled user registration and registered a user whose credentials are
> > > > used in the URL below. I got a server error when a function requiring
> > > > user authentication was called.
>
> > > > I changed the line
>
> > > > JSONProxy.__init__(self, "../../default/call/jsonrpc", ["getTasks",
> > > > "addTask","deleteTask"])
>
> > > > to read
>
> > > > JSONProxy.__init__(self,
> > > > "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul...";,
> > > > ["getTasks", "addTask","deleteTask"])
>
> > > > What am I missing?
>
> > > > Thanks.
>
> > > > On Mon, Jun 1, 2009 at 12:51 PM, mdipierro  
> > > > wrote:
>
> > > > > OK. As you request since the latest version in trunk you can do
>
> > > > > @auth.requires_login()
> > > > > def index(): return 'hello world'
>
> > > > > and access it with
>
> > > > >   curl -u username:passwordhttp://127.0.0.1:8000/app/default/index
>
> > > > > or
>
> > > > >   curlhttp://username:passw...@127.0.0.1:8000/app/default/index
>
> > > > > In the latter case username and password have to be encoded by
> > > > > urllib.quote()
>
> > > > > works for services too.
>
> > > > > Massimo
>
> > > > > On May 31, 10:43 pm, Dan  wrote:
> > > > >> Since my last message on this thread, I came up with a patch to the
> > > > >>Auth.login() code that lets me do what I need, so figured I should
> > > > >> post it here. Let me know if you see any issues with this approach 
> > > > >> (or
> > > > >> improvements to it).
>
> > > > >> To recap, what I want to do is to let a script runing wget (not a
> > > > >> browser)loginand then work with some parts of the app that require
> > > > >> membership in groups. I want to pass the user's name and password to
> > > > >> theloginformusing post variables in the URL. This is not normally
> > > > >> possible with web2py'sAuth.login() function, so it needs to be
> > > > >> modified, like this-
>
> > > > >> referring to source code 
> > > > >> here:http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools-pysrc...
> > > > >> Change these 3 lines ...
> > > > >>  622          ifFORM.accepts(form, request.vars, session,
> > > > >>  623                          formname='login',
> > > > >>  624                          onvalidation=onvalidation):
>
> > > > >> ... to be these 3 lines:
> > > > >> if username in request.vars.keys() and request.vars.password and \
> > > > >>        FORM.accepts(form, request.vars,
> > > > >>  

[web2py:26640] Advice on deployment

2009-07-16 Thread Miguel Lopes

I need to deploy fast.

Since currently I've way too much on my hands already, I wonder if any
of the available hosting alternatives will setup a web2py environment
for the customer and if any of you could express their personal
experience with it (positive, negative, things to watch for...).

Alternatively, if I have to do it myself, how good is support (I mean
hand-holding). This is important since it's my first deployment and I
have no sys admin skills.

Txs for the tips,
Miguel

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26639] Re: Web2Py Foundation?

2009-07-16 Thread AchipA

MapServer and OpenLayers, both under the OSGeo Foundation umbrella.

Upside:
- clear authority with regard to announcements, project stance,
roadmap, etc
- clear ownership of copyright, licenses, and source of help for
developers/companies interested in that matter
- well defined source of additional resources, contacts, etc
- allows some organizational burden taken off of the core developer's
back

Downside:
- more paperwork
- needs dedicated people (generally not developers, but people with
organisational skills) who can run things for *long* periods of time
(volunteering for particular projects is another issue)
- decisions can get bogged down if things get 'too' democratic/
commitee driven
- material cost even if it's non-profit (registration, tax stuff,
attorney, whatever is needed in the particular country it's in)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26638] Re: Authentication against a web2py hosted json function from python client

2009-07-16 Thread Fran

On Jul 16, 8:18 am, David Watson  wrote:
> I'm trying to get authentication working for a python client talking
> to a web2py json function. I'm using the @auth.requires_login()
> decorator but I can't seem to get a successful login (works fine from
> the user login web page).

Don't use @auth.requires_login() decorator with services.
(See this thread: 
http://groups.google.com/group/web2py/browse_thread/thread/6c7fe7cb5b844072)

Instead use:

user = auth.login_bare(username, password)
if not user:
return "authentication failed"


F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26637] report a small bug

2009-07-16 Thread zhang zheng
in  gluon/contrib/login_methods/email_auth.py,   version 1.65.5
..
try:
server = smtplib.SMTP(host, port)
server.ehlo()
server.starttls()
server.ehlo()
server.login(email, password)
server.quit()
return True
except:
server.quit()
return False
return email_auth_aux


if  smtplib.SMTP(host, port)   throw exception,  then  workflow execute the
code "server.quit()"
however,  now, server is just  a string object,   rather than  a instance of
smtplib.SMTP

Do you think it ?


-- 
张峥

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26636] Re: Where's the roadmap?

2009-07-16 Thread Bottiger

http://www.djangobook.com/license/

Copyright 2006 by Adrian Holovaty and Jacob Kaplan-Moss

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License".


On Jul 15, 3:20 pm, mdipierro  wrote:
> What is the license of the DjangoBook? Who owns the copyright?
>
> Massimo
>
> On Jul 15, 5:13 pm, Bottiger  wrote:
>
> > One idea is to do the same thing as DjangoBook.com. Have a freely
> > commentable edition online so people can help improve it and you don't
> > have to waste an entire summer writing one. Then you can sell the
> > printed version to recover some costs.
>
> > On Jul 15, 2:58 pm, mdipierro  wrote:
>
> > > I have sold about 100 printed version before the end of the year 2008,
> > > when PDF was not available. I do not know since then. I suspect nobody
> > > buys the printed book given what it costs. The problem is that all of
> > > the cost is in the overhead. I could reduce the cost to $25 by
> > > publishing the printed copy with lulu. For the next version, one
> > > option is to give the PDF free and the printed copy on lulu.
>
> > > Massimo
>
> > > On Jul 15, 4:14 pm, Jonathan Lundell  wrote:
>
> > > > On Jul 15, 2009, at 1:07 PM, mdipierro wrote:
>
> > > > > Would it make a difference it the book were to be free?
>
> > > > The book is a very good introduction to and advertisement for web2py.  
> > > > The cost of the pdf isn't a big deal, but I think that purchasing  
> > > > anything for any price is a much bigger barrier that clicking a  
> > > > download link.
>
> > > > I'm curious: have you sold a significant number of the physical books?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26635] Authentication against a web2py hosted json function from python client

2009-07-16 Thread David Watson

Hi,

I'm trying to get authentication working for a python client talking
to a web2py json function. I'm using the @auth.requires_login()
decorator but I can't seem to get a successful login (works fine from
the user login web page). I'm using client code copied directly from
the last example on this page:

http://www.voidspace.org.uk/python/articles/authentication.shtml

Should the basic auth work here, or do I need more infrastructure for
either the redirect handler or the cookies? No matter what, it always
redirects to the login page even though I'm passing the properly
initialized credentials.

Thanks,
David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:26634] Re: Authentication for services

2009-07-16 Thread David Watson

I'm using web2py 1.65.5 with google app engine.

I've run into a problem with request.args in relation to my json
calls:

@service.json
def json_read_nologin():
return request.args[0]

or the same function defined sans the service decorator, both work
fine, as long as I don't pass something containing an @ sign, i.e.

http://localhost:8000/init/default/json_read_nologin/u...@domain.com

this generates an invalid request even if url encoded:

http://localhost:8000/init/default/json_read_nologin/user%40domain.com

I'm not sure what I'm doing wrong here but this behavior doesn't seem
like what I'd expect.

Thanks,
David

On Jun 23, 8:47 pm, mdipierro  wrote:
> You cannot mix authorization and services this way. It is complicated
> an there are many cases
>
> If you have
>
> @auth.requires_login()
> def acceptme():
>     return 'accepted'
>
> you can call "http:///acceptme.json"; and you will get aJSON
> response. You do not need the decorator.
>
> @auth.requires_login()
> @service.json()
> def acceptme():
>     return 'accepted'
> def run(): return service()
>
> exposes "http:///service/json/acceptme"; before requiring login.
>
> @service.json()
> def acceptme():
>     return 'accepted'
> @auth.requires_login()
> def run(): return service()
>
> this should work but will require login for all services
>
> @service.json()
> @auth.requires_login()
> def acceptme():
>     return 'accepted'
> def run(): return service()
>
> this is not completely clear to me why does not work but I see some
> logical problems.
>
> Massimo
>
> On Jun 23, 7:31 pm, Hasanat Kazmi  wrote:
>
> > Here is an interesting behavior.
> > i have following function
>
> > @auth.requires_login()
> > @service.json
> > @service.jsonrpc
> > def acceptme():
> >     return "accepted"
>
> > in this case, whatever username and password I give, I get returned
> > "accepted" but if I put @auth.requires_login() after @service.jsonrpc,
> > it always returns me "Object does not exist" .
>
> > I call it like 
> > this:http://hasanatkazmi%40gmail.com:**...@localhost:8000/sahana/admin/cal...
>
> > Anyone has an idea whats going on?
>
> > On Jun 4, 7:28 am, Alexei Vinidiktov 
> > wrote:
>
> > > I've tried this with the pyjamas tutorial and it didn't work. I've
> > > enabled user registration and registered a user whose credentials are
> > > used in the URL below. I got a server error when a function requiring
> > > user authentication was called.
>
> > > I changed the line
>
> > > JSONProxy.__init__(self, "../../default/call/jsonrpc", ["getTasks",
> > > "addTask","deleteTask"])
>
> > > to read
>
> > > JSONProxy.__init__(self,
> > > "http://myemail%40gmail.com%3amypassw...@127.0.0.1:8000/pyjamas/defaul...";,
> > > ["getTasks", "addTask","deleteTask"])
>
> > > What am I missing?
>
> > > Thanks.
>
> > > On Mon, Jun 1, 2009 at 12:51 PM, mdipierro  
> > > wrote:
>
> > > > OK. As you request since the latest version in trunk you can do
>
> > > > @auth.requires_login()
> > > > def index(): return 'hello world'
>
> > > > and access it with
>
> > > >   curl -u username:passwordhttp://127.0.0.1:8000/app/default/index
>
> > > > or
>
> > > >   curlhttp://username:passw...@127.0.0.1:8000/app/default/index
>
> > > > In the latter case username and password have to be encoded by
> > > > urllib.quote()
>
> > > > works for services too.
>
> > > > Massimo
>
> > > > On May 31, 10:43 pm, Dan  wrote:
> > > >> Since my last message on this thread, I came up with a patch to the
> > > >>Auth.login() code that lets me do what I need, so figured I should
> > > >> post it here. Let me know if you see any issues with this approach (or
> > > >> improvements to it).
>
> > > >> To recap, what I want to do is to let a script runing wget (not a
> > > >> browser)loginand then work with some parts of the app that require
> > > >> membership in groups. I want to pass the user's name and password to
> > > >> theloginformusing post variables in the URL. This is not normally
> > > >> possible with web2py'sAuth.login() function, so it needs to be
> > > >> modified, like this-
>
> > > >> referring to source code 
> > > >> here:http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools-pysrc...
> > > >> Change these 3 lines ...
> > > >>  622          ifFORM.accepts(form, request.vars, session,
> > > >>  623                          formname='login',
> > > >>  624                          onvalidation=onvalidation):
>
> > > >> ... to be these 3 lines:
> > > >> if username in request.vars.keys() and request.vars.password and \
> > > >>        FORM.accepts(form, request.vars,
> > > >>             formname=None, onvalidation=onvalidation):
>
> > > >> This change lets theformtake the username and password from the
> > > >> URL's post variables (or theformitself - but not both of course).
> > > >> Then my script willloginusing wget's optional arguments "--keep-
> > > >> session-cookies --save-cookies=" when submitting the user name and
> > > >> password to the app'sloginfunction. These w

[web2py:26633] Re: running as production

2009-07-16 Thread Yarko Tymciurak
On Thu, Jul 16, 2009 at 1:52 AM, Fran  wrote:

>
> On Jul 16, 6:36 am, jayvandal  wrote:
> > I am following the cookbook as a tutorial but I am confused about
> > relating this to a production mode. I thought I would have URL
> > HTTP://localhost/cookbook/
>

I'm not understanding your question:

Did you download the cookbook, and are reading through it?  (It's a PDF file
- not an applicaiton).

What were you expecting at the url you listed?  (this is what I don't
understand)


>
>
> You can run on port 80 if you wish (simply amend options_std.py).
> Real Production is unlikely to run on pure CherryPy unless using as a
> standalone desktop app.
> Multi-user server systems would likely front with a webserver such as
> Apache (e.g. using mod_WSGI)
>
> > that would give me a master menu and have
> > URLS that point to the detail  screens.
>
> I don't think Cookbook modifies the menu at all - I'd look at the
> welcome app to see how to create one.
>
> F
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---