Re: [web2py] Major Speedup in trunk 10x

2011-03-15 Thread Jason (spot) Brower
Very cool!  It's always fun to see Massimo pull out a card like that and
make the code itself better. Excited to give it a try on my systems.
---
Best Regards,
Jason Brower


On Tue, Mar 15, 2011 at 5:40 AM, Massimo Di Pierro 
massimo.dipie...@gmail.com wrote:

 At PyCon some people have suggested that they would like the ability
 to switch off some web2py functionality to make it faster. I never
 thought of this being an issue because I do not think web2py does much
 outside models/views and controllers.

 I run a lot of tests today using a barebone

def index(): return 'hello world'

 controller (no view, no model) and I discovered, to my surprise that
 even in this simple case, web2py spends huge amount of time saving
 sessions even if not used (~40ms/request on my laptop). This is also a
 problem because if you have many passive visitors web2py creates a lot
 of empty session files that fills the sessions folder and slow down
 the file system even more.

 I made some changes so that sessions are no longer saved if not
 modified or empty. For my simple code, the running time went down to
 4ms/request. That is 10x than before. That is only 5x the bare Rocket
 or Tornado speed (considering it is still checking for session, doing
 routing, parsing input and performing a lot of checks, and a lot of
 other stuff).

 I do not think it should break anything and you should feel it
 snappier immediately. Give it a try and let me know.

 Try run ab -n 1000 with both web2py 1.93.1 and trunk for your app. Let
 me know what you get.

 Enjoy!

 Massimo




[web2py] Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread Tom Atkins
Just looking at CubicWeb via the link given on Reddit.  Looks like an
interesting project - amazing what's out there that I've never heard of!

This blog post:

http://www.cubicweb.org/blogentry/1484253

describes an interesting way of using multi core processors to load balance
and solves session caching via squid.  Might this be a useful approach to
use for scaling web2py?


[web2py] Re: greetings from PyCon

2011-03-15 Thread Mengu
now that's sad massimo. i was extremely anxious to see how you built
the facebook clone and how people were impressed.

On Mar 14, 9:21 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 The second part was not recorded because I forgot to press the button
 [record] after the break and because the people who paid to attend
 deserve some exclusivity.
 Anyway, the second part included similar content ashttp://vimeo.com/20760298
 and thishttp://vimeo.com/20768689(although we did not build an
 online store but a facebook clone)

 On Mar 14, 8:58 am, contatogilson...@gmail.com

 contatogilson...@gmail.com wrote:
  And second part?
  _
  *Gilson Filho*
  *Web Developerhttp://gilsondev.com*




[web2py] Proposals for New Tagline

2011-03-15 Thread villas
The web2py tagline is currently: 'Enterprise Web Framework'.

Massimo agrees that this might be improved and this thread is to
solicit suggestions.  Ideally suggestions would encapsulate the
'spirit' of web2py or stress a feature(s) and simply make it seem more
attractive to new users.

As an idea,  here is one suggestion (inspired by Bruno) stressing the
productivity of web2py:

** Web2py - the Framework that gets things done! **


[web2py] Re: Dynamic generation model

2011-03-15 Thread toan75
Hi Massimo Di Pierro,

How do get requires, defaut, represent,... from field: 
db.mytable.myfield for create string: 
Field('myfield', requires=..., default=..., represent=...) ?

Thanks.


[web2py] Re: greetings from PyCon

2011-03-15 Thread Massimo Di Pierro
I have the code example so I will post it. I just need to add voice.

On Mar 15, 3:03 am, Mengu whalb...@gmail.com wrote:
 now that's sad massimo. i was extremely anxious to see how you built
 the facebook clone and how people were impressed.

 On Mar 14, 9:21 pm, Massimo Di Pierro massimo.dipie...@gmail.com
 wrote:







  The second part was not recorded because I forgot to press the button
  [record] after the break and because the people who paid to attend
  deserve some exclusivity.
  Anyway, the second part included similar content ashttp://vimeo.com/20760298
  and thishttp://vimeo.com/20768689(althoughwe did not build an
  online store but a facebook clone)

  On Mar 14, 8:58 am, contatogilson...@gmail.com

  contatogilson...@gmail.com wrote:
   And second part?
   _
   *Gilson Filho*
   *Web Developerhttp://gilsondev.com*


[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Ross Peoples
I did some testing on my app, which still implements the welcome app's 
default/index function that shows Hello World. Here are my results:

BEFORE TRUNK UPDATE - CONCURRENCY 1
===

Time taken for tests: 108 seconds
Requests per second: 9.25
Time per request: 108.138 ms


AFTER TRUNK UPDATE - CONCURRENCY 1
==

Time taken for tests: 108 seconds
Requests per second: 9.21
Time per request: 108.543


AFTER TRUNK UPDATE - CONCURRENCY 10
===

Time taken for tests: 98 seconds
Requests per second: 10.20
Time per request: 98.050

The last test was run with -c 10. According to ab, there wasn't any 
improvement, which is strange. I ran the rocket server using the following 
line:

python web2py.py -i 0.0.0.0 -a password -l '/dev/null'

I have the server running on a Ubuntu Server 10.04.2 virtual machine.


Re: [web2py] Proposals for New Tagline

2011-03-15 Thread Jason (spot) Brower
Hmm..
Twice as fast to code in than Django and four time easier.
Ok ok, it sucks, but it's true!
Let me think... how about:
Productivity by design.
Think about the page not the code!
Releiving finger ache by a factor of 2.
Bringing python and html together.
Framework for productive web applicatons.
Web application framework.
Development to the table.
Power to the python!
There's a party over here!
Truly agile.
MVC to the max!
The sensable MVC framework.
Built with MVC in mind.
Putting the fun back in to coding.

On Tue, Mar 15, 2011 at 1:04 PM, villas villa...@gmail.com wrote:

 The web2py tagline is currently: 'Enterprise Web Framework'.

 Massimo agrees that this might be improved and this thread is to
 solicit suggestions.  Ideally suggestions would encapsulate the
 'spirit' of web2py or stress a feature(s) and simply make it seem more
 attractive to new users.

 As an idea,  here is one suggestion (inspired by Bruno) stressing the
 productivity of web2py:

 ** Web2py - the Framework that gets things done! **



Re: [web2py] Re: Cant make a simple database

2011-03-15 Thread Jason (spot) Brower
I don't do that.  I would rather have orders than t_order how about
the_order :P
BR,
Jason

On Thu, Mar 10, 2011 at 6:13 PM, pbreit pbreitenb...@gmail.com wrote:

 Yeah I saw that. What are people's thoughts on that? It seems like clutter
 to me but can definitely mak things easier in places.


[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Ross Peoples
I just noticed that the sessions are still being saved, which may be why I 
didn't see any performance improvement. I deleted all of the sessions inside 
the sessions folder, stopped and restarted the server, then visited the 
/default/index page that flashes 'You are successfully running web2py.' and 
returns message=T('Hello World'). It seems that we2py is still creating 
session files. I did not log in or anything, I just visited the page as a 
guest.

[web2py] Re: Cant make a simple database

2011-03-15 Thread Ross Peoples
Since most orders contain line items, you might consider making an 
order_header table that stores information about the order, then a 
order_detail table that stores the information about each line item.

Re: [web2py] Re: Cron doesn't work for me...

2011-03-15 Thread Tito Garrido
Hi VP!

How did you use the system cron? I'm wondering how can I specify the
function that I want to execute...

Regards,

Tito

On Tue, Mar 15, 2011 at 1:53 AM, VP vtp2...@gmail.com wrote:

 Cron didn't work for me either, so I used the system cron.

 One question I have though is why root when web2py is run as www-
 data?




-- 

Linux User #387870
.
 _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Mengu
instead of the framework that gets things done i suggest get your
app done

On Mar 15, 1:04 pm, villas villa...@gmail.com wrote:
 The web2py tagline is currently: 'Enterprise Web Framework'.

 Massimo agrees that this might be improved and this thread is to
 solicit suggestions.  Ideally suggestions would encapsulate the
 'spirit' of web2py or stress a feature(s) and simply make it seem more
 attractive to new users.

 As an idea,  here is one suggestion (inspired by Bruno) stressing the
 productivity of web2py:

 ** Web2py - the Framework that gets things done! **


[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Massimo Di Pierro
You must find the logic in your code that is changing the session
object. There must be something. Do you have a form in the page?

On Mar 15, 8:00 am, Ross Peoples ross.peop...@gmail.com wrote:
 I just noticed that the sessions are still being saved, which may be why I
 didn't see any performance improvement. I deleted all of the sessions inside
 the sessions folder, stopped and restarted the server, then visited the
 /default/index page that flashes 'You are successfully running web2py.' and
 returns message=T('Hello World'). It seems that we2py is still creating
 session files. I did not log in or anything, I just visited the page as a
 guest.


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Mengu
what about generating such taglines and displaying them randomly?

On Mar 15, 2:54 pm, Jason (spot) Brower encomp...@gmail.com wrote:
 Hmm..
 Twice as fast to code in than Django and four time easier.
 Ok ok, it sucks, but it's true!
 Let me think... how about:
 Productivity by design.
 Think about the page not the code!
 Releiving finger ache by a factor of 2.
 Bringing python and html together.
 Framework for productive web applicatons.
 Web application framework.
 Development to the table.
 Power to the python!
 There's a party over here!
 Truly agile.
 MVC to the max!
 The sensable MVC framework.
 Built with MVC in mind.
 Putting the fun back in to coding.

 On Tue, Mar 15, 2011 at 1:04 PM, villas villa...@gmail.com wrote:
  The web2py tagline is currently: 'Enterprise Web Framework'.

  Massimo agrees that this might be improved and this thread is to
  solicit suggestions.  Ideally suggestions would encapsulate the
  'spirit' of web2py or stress a feature(s) and simply make it seem more
  attractive to new users.

  As an idea,  here is one suggestion (inspired by Bruno) stressing the
  productivity of web2py:

  ** Web2py - the Framework that gets things done! **




Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Martín Mulone
I will think a new one. Some words or ideas perhaps to include: python,
MVC, Full-stack, Framework, True MVC, RAD, Fast development,
Less development more creation, Easy to learn.

2011/3/15 Mengu whalb...@gmail.com

 what about generating such taglines and displaying them randomly?

 On Mar 15, 2:54 pm, Jason (spot) Brower encomp...@gmail.com wrote:
  Hmm..
  Twice as fast to code in than Django and four time easier.
  Ok ok, it sucks, but it's true!
  Let me think... how about:
  Productivity by design.
  Think about the page not the code!
  Releiving finger ache by a factor of 2.
  Bringing python and html together.
  Framework for productive web applicatons.
  Web application framework.
  Development to the table.
  Power to the python!
  There's a party over here!
  Truly agile.
  MVC to the max!
  The sensable MVC framework.
  Built with MVC in mind.
  Putting the fun back in to coding.
 
  On Tue, Mar 15, 2011 at 1:04 PM, villas villa...@gmail.com wrote:
   The web2py tagline is currently: 'Enterprise Web Framework'.
 
   Massimo agrees that this might be improved and this thread is to
   solicit suggestions.  Ideally suggestions would encapsulate the
   'spirit' of web2py or stress a feature(s) and simply make it seem more
   attractive to new users.
 
   As an idea,  here is one suggestion (inspired by Bruno) stressing the
   productivity of web2py:
 
   ** Web2py - the Framework that gets things done! **
 
 




-- 
Pablo Martín Mulone (mar...@tecnodoc.com.ar)
http://www.tecnodoc.com.ar/

My blog: http://martin.tecnodoc.com.ar
Expert4Solution Profile:
http://www.experts4solutions.com/e4s/default/expert/6


[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Ross Peoples
No form, I have customized the layout.html file, but nothing that uses 
session or forms.

Here is the controller:
def index():

example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html

response.flash = T('You are successfully running web2py.')
return dict(message=T('Hello World'))

And here is the view:
{{left_sidebar_enabled=right_sidebar_enabled=False}}
{{extend 'layout.html'}}

{{if 'message' in globals():}}

h1{{=message}}/h1

hr /
h2Readme/h2
ul
  li{{=T('You are successfully running web2py')}}/li
  li{{=T('This is a copy of the scaffolding application')}}/li
  li{{=T('You can modify this application and adapt it to your 
needs')}}/li
  li{{=A(B(T(click here for the administrative interface)), 
_href=URL('admin','default','index'))}}/li
  li{{=A(T(click here for online examples), 
_href=URL('examples','default','index'))}}/li
  lia href=http://web2py.com;web2py.com/a/li
  lia href=http://web2py.com/book;{{=T('documentation')}}/a/li
/ul

ol
  li{{=T('You visited the url')}} 
{{=A(request.env.path_info,_href=request.env.path_info)}}/li
  li{{=T('Which called the function')}} 
{{=A(request.function+'()',_href='#')}} {{=T('located in the file')}}

{{=A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,_href=URL('admin','default','peek',args=(request.application,'controllers',request.controller+'.py')))}}/li
  li{{=T('The output of the file is a dictionary that was rendered by the 
view')}}

{{=A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))}}/li
/ol

{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}

{{block left_sidebar}}New Left Sidebar Content{{end}}
{{block right_sidebar}}New Right Sidebar Content{{end}}


I even tried using the stock welcome application with ab:

ab -n 1000 http://127.0.0.1:8000/welcome

And the average time per request was 73 ms.


[web2py] Re: greetings from PyCon

2011-03-15 Thread Mengu
well, then i'll wait. :)

On Mar 15, 2:25 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 I have the code example so I will post it. I just need to add voice.

 On Mar 15, 3:03 am, Mengu whalb...@gmail.com wrote:

  now that's sad massimo. i was extremely anxious to see how you built
  the facebook clone and how people were impressed.

  On Mar 14, 9:21 pm, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

   The second part was not recorded because I forgot to press the button
   [record] after the break and because the people who paid to attend
   deserve some exclusivity.
   Anyway, the second part included similar content 
   ashttp://vimeo.com/20760298
   and thishttp://vimeo.com/20768689(althoughwedid not build an
   online store but a facebook clone)

   On Mar 14, 8:58 am, contatogilson...@gmail.com

   contatogilson...@gmail.com wrote:
And second part?
_
*Gilson Filho*
*Web Developerhttp://gilsondev.com*




Re: [web2py] Proposals for New Tagline

2011-03-15 Thread Bruno Rocha
web2py - Code Less Create More!
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]



On Tue, Mar 15, 2011 at 8:04 AM, villas villa...@gmail.com wrote:

 The web2py tagline is currently: 'Enterprise Web Framework'.

 Massimo agrees that this might be improved and this thread is to
 solicit suggestions.  Ideally suggestions would encapsulate the
 'spirit' of web2py or stress a feature(s) and simply make it seem more
 attractive to new users.

 As an idea,  here is one suggestion (inspired by Bruno) stressing the
 productivity of web2py:

 ** Web2py - the Framework that gets things done! **



[web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Corne
We (again) looked deeper into what is really happening; and it is yet
different.

What we ran into is the following:
We tried to set a session_id our self based on information in the url,
which in this case resulted in calling the session connect code (where
it went wrong) twice per request.

In case a cookie was send; there is no problem at all.
Session is handled by web2py like always (except for the fact that
it's done twice).
In case there is no cookie send; there is a problem.
The first call to connect (web2py internal) has no session_id, so a
new one is generated.
The second call to connect (our plugin) has a session id so it's
handled ok.

In the end of the request, the session changes are written. But in our
case (without cookie) the var session_new is True (and the session
file is (re)opened with 'wb').
Opening with 'wb' does seem to change the file handle. The request
that is handled by a differend process at the same time will now have
an invallid session.

This also explains the fact that reopening the session file seemed to
solve the problem except for the fact that the real problem is
somewhere else.

I guess that using connect is something that is / should be allowed
(it's in the book), this is also the way to, for example use sessions
from an other application.
and there the same issue could apply:
in case someone uses connect to just use a session from a different
application. The first connect from web2py might result in creating a
new session. While the connect which is issued later by the user does
result in an existing session.


Re: [web2py] Proposals for New Tagline

2011-03-15 Thread contatogilson...@gmail.com

 web2py - Code Less Create More!


+1
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*


[web2py] My new favorite web2py tweet

2011-03-15 Thread Anthony
http://twitter.com/#!/dmaffioletti/status/47658179693252609
 


Re: [web2py] Proposals for New Tagline

2011-03-15 Thread Tom Atkins
On 15 March 2011 13:43, Bruno Rocha rochacbr...@gmail.com wrote:

 web2py - Code Less Create More!


+1 (and then mention 'full-stack python web framework...')


[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Massimo Di Pierro
The speedup mentioned applies to do-nothing apps. In particular to
apps that do not use database.

The welcome app does lots of stuff even if you do not use. To start
with it opens the sqlite database. Although queries are fast it takes
just 30ms to open the db and lock it in my tests.

Anyway, you have lots of view logic, can you try bytecode compile your
app and tell me what you get? bytecode compilation speeds up views.



On Mar 15, 8:21 am, Ross Peoples ross.peop...@gmail.com wrote:
 No form, I have customized the layout.html file, but nothing that uses
 session or forms.

 Here is the controller:
 def index():
     
     example action using the internationalization operator T and flash
     rendered by views/default/index.html or views/generic.html
     
     response.flash = T('You are successfully running web2py.')
     return dict(message=T('Hello World'))

 And here is the view:
 {{left_sidebar_enabled=right_sidebar_enabled=False}}
 {{extend 'layout.html'}}

 {{if 'message' in globals():}}

 h1{{=message}}/h1

 hr /
 h2Readme/h2
 ul
   li{{=T('You are successfully running web2py')}}/li
   li{{=T('This is a copy of the scaffolding application')}}/li
   li{{=T('You can modify this application and adapt it to your
 needs')}}/li
   li{{=A(B(T(click here for the administrative interface)),
 _href=URL('admin','default','index'))}}/li
   li{{=A(T(click here for online examples),
 _href=URL('examples','default','index'))}}/li
   lia href=http://web2py.com;web2py.com/a/li
   lia href=http://web2py.com/book;{{=T('documentation')}}/a/li
 /ul

 ol
   li{{=T('You visited the url')}}
 {{=A(request.env.path_info,_href=request.env.path_info)}}/li
   li{{=T('Which called the function')}}
 {{=A(request.function+'()',_href='#')}} {{=T('located in the file')}}

 {{=A('web2py/applications/%(application)s/controllers/%(controller)s.py'%re 
 quest,_href=URL('admin','default','peek',args=(request.application,'control 
 lers',request.controller+'.py')))}}/li
   li{{=T('The output of the file is a dictionary that was rendered by the
 view')}}

 {{=A('web2py/applications/%(application)s/views/%(controller)s/index.html'% 
 request,_href=URL('admin','default','peek',args=(request.application,'views 
 ',request.controller,'index.html')))}}/li
 /ol

 {{else:}}
 {{=BEAUTIFY(response._vars)}}
 {{pass}}

 {{block left_sidebar}}New Left Sidebar Content{{end}}
 {{block right_sidebar}}New Right Sidebar Content{{end}}

 I even tried using the stock welcome application with ab:

 ab -n 1000http://127.0.0.1:8000/welcome

 And the average time per request was 73 ms.


Re: [web2py] My new favorite web2py tweet

2011-03-15 Thread Bruno Rocha
Thats a new tagline proposal!

*web2py - thing beautiful of God! *

LOL



On Tue, Mar 15, 2011 at 11:29 AM, Anthony abasta...@gmail.com wrote:

 http://twitter.com/#!/dmaffioletti/status/47658179693252609




[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Massimo Di Pierro
How about?

rapid web development that scales

I think we should use rapid development vs agile since the latter
sometimes has a negative connotation.

Massimo



On Mar 15, 9:36 am, Tom Atkins minkto...@gmail.com wrote:
 On 15 March 2011 13:43, Bruno Rocha rochacbr...@gmail.com wrote:

  web2py - Code Less Create More!

 +1 (and then mention 'full-stack python web framework...')


Re: [web2py] Re: Dynamic generation model

2011-03-15 Thread Manuele Pesenti

Dear Jose,

I think you posted a very interesting example... how have you resolved 
the problem of the spatial support by web2py?
I mean the fields of the tables you are going to create dynamically are 
the ones of a tipically spatial extension of a db... are they supported 
by web2py DAL? Can you post the complete solution of how you have 
implemented the dynamic tab inclusion in the model?


thank you very much

Cheers

Manuele

Il 14/03/2011 20:56, Jose ha scritto:


On 14 mar, 16:23, Massimo Di Pierromassimo.dipie...@gmail.com
wrote:

something like

db.define_table('name',*{Field(name) for name in ])

On Mar 14, 11:24 am, Josejjac...@gmail.com  wrote:


Thanks Massimo.

Exactly, that's what I need.

Thank you




[web2py] Can't connect to MySQL server on 'localhost'

2011-03-15 Thread Miguel
Hello to all, I have created a new project using the web wizard, for
some unknown reason the mysql connection is not working, this is the
uri im using:

mysql://cmts_monitor:cmtsTigoHome@localhost/cmts_monitor

and this is the error i got:

Traceback (most recent call last):
  File /home/www-data/web2py/gluon/restricted.py, line 188, in
restricted
exec ccode in environment
  File /home/www-data/web2py/applications/CMTS_Monitor/models/db.py,
line 17, in module
db = DAL('mysql://cmts_monitor:cmtsTigoHome@localhost/
cmts_monitor')   # if not, use SQLite or other DB
  File /home/www-data/web2py/gluon/dal.py, line 3423, in __init__
raise RuntimeError, Failure to connect, tried 5 times:\n%s %
error
RuntimeError: Failure to connect, tried 5 times:
(2003, Can't connect to MySQL server on 'localhost' (111))

i have tested the username/password combination in the command line,
it works fine:

mmiranda@appsrv01:/var/log/check_cmts$ mysql --user cmts_monitor --
database cmts_monitor --host=localhost -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20510
Server version: 5.1.37-1ubuntu5.5 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql


What should i check?
regards


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Kevin Ivarsen
So far I like Productivity by design.

Although it depends on what the goals of a tagline should be. If you
want to make the framework discoverable through search engines, it
might be more important to include words like python / mvc / web
framework. The web2py name by itself has the strength of being
relatively self-explanitory once you see it (it must have something to
do with web programming in python) and unique when doing searches.
Contrast with non-descriptive names with alternate meanings like
Django/Pylons/Pyramid. But if you don't yet know the name web2py yet,
a good tagline may help you discover it.

Some possible approaches (not necessarily mutually exclusive):
1. Emphasize speed and ease of development (a la Productivity by
design)
2. Laundry list of searchable keywords (something like A full-stack
MVC web framework in Python
3. Emphasize that this is not just a toy web framework (perhaps an
effect of the current Enterprise Web Framework tagline)
4. Something playful and catchy

The Django tagline, for example, meets #1 and #4 pretty well, with
just a bit of #2. At least, I thought it was pretty good when I
started with Python web frameworks. Of course, nobody should base
their choice of technology on a tagline, but first impressions
certainly count for something.

Kevin

On Mar 15, 8:54 am, Jason (spot) Brower encomp...@gmail.com wrote:
 Hmm..
 Twice as fast to code in than Django and four time easier.
 Ok ok, it sucks, but it's true!
 Let me think... how about:
 Productivity by design.
 Think about the page not the code!
 Releiving finger ache by a factor of 2.
 Bringing python and html together.
 Framework for productive web applicatons.
 Web application framework.
 Development to the table.
 Power to the python!
 There's a party over here!
 Truly agile.
 MVC to the max!
 The sensable MVC framework.
 Built with MVC in mind.
 Putting the fun back in to coding.







 On Tue, Mar 15, 2011 at 1:04 PM, villas villa...@gmail.com wrote:
  The web2py tagline is currently: 'Enterprise Web Framework'.

  Massimo agrees that this might be improved and this thread is to
  solicit suggestions.  Ideally suggestions would encapsulate the
  'spirit' of web2py or stress a feature(s) and simply make it seem more
  attractive to new users.

  As an idea,  here is one suggestion (inspired by Bruno) stressing the
  productivity of web2py:

  ** Web2py - the Framework that gets things done! **


[web2py] non redirection when authentication fails

2011-03-15 Thread Joaquin Orbe
Hi All,

I have two kind of users in my application: admins and users. Each
of them has different index function which I've decored, that's why I
get these URLs when trying to login:

* admins login through
http://127.0.0.1:8000/myapp/default/user/login?_next=/myapp/admin/index
* common users login through
http://127.0.0.1:8000/myapp/default/user/login?_next=/myapp/default/index

Everything work as I expected, but when authentication fails both
groups are redirect to http://127.0.0.1:8000/myapp/default/user/login.
Is it possible to have non-redirection when authentication fails? I've
been playing with auth.settings.on_failed_authorization and
auth.settings.on_failed_authentication but couldn't get it work.
Any help will be appreciated.


Joaquin.


[web2py] Re: SELECT won't remember selected option

2011-03-15 Thread Andrew Buchan
Thanks Massimo,

Nothing is actually wrong with Val, it's a float obtained from a row.
After a fair bit of ploughing, I found that the issue is to do with
the list of [OPTION...] for the SELECT control.
If you generate a list of [OPTION,] from a function like I did,
and reuse that list in multiple SELECT() calls, it gets modified as
you go:

def GenerateTimeIncrements(hours):
return [OPTION( '%s' % v , _value=v) for v in range(hours)]

def SomeController():

Values = GenerateTimeIncrements(10)
table = TABLE()
table.append(TR(TD(SELECT(value=1, *Values
table.append(TR(TD(SELECT(value=2, *Values
table.append(TR(TD(SELECT(value=3, *Values


In this case, all three drop-downs will have their default value set
to 3.0, as Values is being changed by the call to SELECT() where it
specifies which option is selected. To get what you want, you need to
do something like this:

table.append(TR(TD(SELECT(value=1, *GenerateTimeIncrements(10)
table.append(TR(TD(SELECT(value=2, *GenerateTimeIncrements(10)
table.append(TR(TD(SELECT(value=3, *GenerateTimeIncrements(10)

I know this is down to the fact in python, a list is an object and
passed around as such (which is one of my pet peeves with the
language) but I think that in this case the desired behaviour would be
for SELECT to take a copy of the list, and avoid these issues.

Curiously, the following still causes the error, and this is the
worrying part as this is not how python should work:

table = TABLE()
Values = GenerateTimeIncrements(10)
table.append(TR(TD(SELECT(value=1, *list(Values)
table.append(TR(TD(SELECT(value=2, *list(Values)
table.append(TR(TD(SELECT(value=3, *list(Values)

Any reason why this should be this way?

On Mar 14, 7:19 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 There is nothing wrong in this code. Look into the value returned by

  Val = TSE[field]

 I think it may not contain what you think it does. I do not know why.

 On Mar 14, 10:33 am, Andrew Buchan andyha...@gmail.com wrote:







  Hi,

  In my timesheet application I have a form which looks like a
  spreadsheet, where each cell has a drop-down list of time-measures in
  15min increments up to 9 hours, the idea being for the user to set the
  time he works against each job on the timesheet. The function below
  generates these Hours Input Cells, and works fine except that it
  won't set the selected option to the value as obtained from the
  assignment to Val in the second line of code.

  HOWEVER, if I assign a new value to Val (see commented-out line), then
  it selects the drop-down option to that value for each cell...
  Note that I am obtaining a valid value for Val, I can display it in
  the form for testing purposes (see TD in last line), and if when I
  assign one of those values to Val as per the commented-out line, it
  correctly sets it as selected in the drop-down list.

  def HoursInputCell(TSE, field):
      Val = TSE[field]
      FieldName = GetHoursCellName(TSE, field)
      Values = DayTimeIncrements
      #Val= 2.5
      return TD( Val , SELECT(value=Val , *Values, _name=FieldName,
  _width='20', _class='TimesheetHoursInput'),
  _class='TimesheetTableDayCell')

  Could this have anything to do with cache?


Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 8:12 AM, Kevin Ivarsen wrote:
 
 So far I like Productivity by design.

I do too. It speaks to web2py's strongest point.

I'm not happy with 'enterprise' because to me it reeks of Enterprise Java 
(Java is the new COBOL).

I'd be happier with 'scales' if we had deployed, large-scale apps to 
demonstrate. I'm sure it's possible, but we need to be able to point to them.

 
 Although it depends on what the goals of a tagline should be. If you
 want to make the framework discoverable through search engines, it
 might be more important to include words like python / mvc / web
 framework. The web2py name by itself has the strength of being
 relatively self-explanitory once you see it (it must have something to
 do with web programming in python) and unique when doing searches.
 Contrast with non-descriptive names with alternate meanings like
 Django/Pylons/Pyramid. But if you don't yet know the name web2py yet,
 a good tagline may help you discover it.
 
 Some possible approaches (not necessarily mutually exclusive):
 1. Emphasize speed and ease of development (a la Productivity by
 design)
 2. Laundry list of searchable keywords (something like A full-stack
 MVC web framework in Python
 3. Emphasize that this is not just a toy web framework (perhaps an
 effect of the current Enterprise Web Framework tagline)
 4. Something playful and catchy
 
 The Django tagline, for example, meets #1 and #4 pretty well, with
 just a bit of #2. At least, I thought it was pretty good when I
 started with Python web frameworks. Of course, nobody should base
 their choice of technology on a tagline, but first impressions
 certainly count for something.
 
 Kevin
 
 On Mar 15, 8:54 am, Jason (spot) Brower encomp...@gmail.com wrote:
 Hmm..
 Twice as fast to code in than Django and four time easier.
 Ok ok, it sucks, but it's true!
 Let me think... how about:
 Productivity by design.
 Think about the page not the code!
 Releiving finger ache by a factor of 2.
 Bringing python and html together.
 Framework for productive web applicatons.
 Web application framework.
 Development to the table.
 Power to the python!
 There's a party over here!
 Truly agile.
 MVC to the max!
 The sensable MVC framework.
 Built with MVC in mind.
 Putting the fun back in to coding.
 
 
 
 
 
 
 
 On Tue, Mar 15, 2011 at 1:04 PM, villas villa...@gmail.com wrote:
 The web2py tagline is currently: 'Enterprise Web Framework'.
 
 Massimo agrees that this might be improved and this thread is to
 solicit suggestions.  Ideally suggestions would encapsulate the
 'spirit' of web2py or stress a feature(s) and simply make it seem more
 attractive to new users.
 
 As an idea,  here is one suggestion (inspired by Bruno) stressing the
 productivity of web2py:
 
 ** Web2py - the Framework that gets things done! **




Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Bruno Rocha
On Tue, Mar 15, 2011 at 12:35 PM, Jonathan Lundell jlund...@pobox.comwrote:

 On Mar 15, 2011, at 8:12 AM, Kevin Ivarsen wrote:
 
  So far I like Productivity by design.

 I do too. It speaks to web2py's strongest point.

 I'm not happy with 'enterprise' because to me it reeks of Enterprise Java
 (Java is the new COBOL)


+ 1 to web2py web framework - Productivity by design


Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Tom Atkins
changing my +1 - now liking Productivity by design!

On 15 March 2011 15:39, Bruno Rocha rochacbr...@gmail.com wrote:

 On Tue, Mar 15, 2011 at 12:35 PM, Jonathan Lundell jlund...@pobox.comwrote:

 On Mar 15, 2011, at 8:12 AM, Kevin Ivarsen wrote:
 
  So far I like Productivity by design.

 I do too. It speaks to web2py's strongest point.

 I'm not happy with 'enterprise' because to me it reeks of Enterprise Java
 (Java is the new COBOL)


 + 1 to web2py web framework - Productivity by design



[web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Ross Peoples
Ok, that makes sense. My app connects to a MSSQL database on another 
machine, so that explains the response times  100 ms for me. So would 
setting pool_size to 1 on the DAL keep at least one database connection open 
for future page views and speed things up?

[web2py] Re: Cron doesn't work for me...

2011-03-15 Thread VP
I answered your email.   Briefly (on Linux/Unix):

+ Use crontab -l to see your cron entries.

+ Use crontab -e to create/edit cron entries.

+ Google / wikipedia for cron syntax.  To execute a URL (e.g. web2py
controller, you can either use wget or curl).




On Mar 15, 8:05 am, Tito Garrido titogarr...@gmail.com wrote:
 Hi VP!

 How did you use the system cron? I'm wondering how can I specify the
 function that I want to execute...

 Regards,

 Tito

 On Tue, Mar 15, 2011 at 1:53 AM, VP vtp2...@gmail.com wrote:
  Cron didn't work for me either, so I used the system cron.

  One question I have though is why root when web2py is run as www-
  data?

 --

 Linux User #387870
 .
  _/_õ|__|
 ..º[ .-.___.-._| . . . .
 .__( o)__( o).:___


[web2py] Re: Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread VP
Feature-wise, web2py is pretty complete.  I think the next milestones
of web2py should be on performance and scalability; (web2py is
reaching 2.0 sooner or later, right?)

I would like to see stronger built-in support for smart caching and
load balancing (distributing work across different servers).

I have a simple idea about smart caching (I don't know if it works or
not).  As web2py controls database access via the DAL, we can update
the cache only when the database is updated.  If the database is not
modified, there is no reason to refresh the cache.  Right?

To be safe you can set a minimum time (e.g. 5 minutes cache refresh),
just in case.




On Mar 15, 2:35 am, Tom Atkins minkto...@gmail.com wrote:
 Just looking at CubicWeb via the link given on Reddit.  Looks like an
 interesting project - amazing what's out there that I've never heard of!

 This blog post:

 http://www.cubicweb.org/blogentry/1484253

 describes an interesting way of using multi core processors to load balance
 and solves session caching via squid.  Might this be a useful approach to
 use for scaling web2py?


Re: [web2py] Re: Major Speedup in trunk 10x

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 6:00 AM, Ross Peoples wrote:
 I just noticed that the sessions are still being saved, which may be why I 
 didn't see any performance improvement. I deleted all of the sessions inside 
 the sessions folder, stopped and restarted the server, then visited the 
 /default/index page that flashes 'You are successfully running web2py.' and 
 returns message=T('Hello World'). It seems that we2py is still creating 
 session files. I did not log in or anything, I just visited the page as a 
 guest.

There's a bug in the speedup logic in the trunk right now that causes sessions 
to be written as usual. Hang on a bit...

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread VP
Web2py:  The Web Framework for Pragmatists with Deadlines.


(Don't ask how I came up with that. :-))


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Anthony


I haven't come up with any great tagline ideas of my own yet, but as we 
generate ideas, it might be useful to first think about some of the 
distinctive attributes and goals of web2py and its community. Here are some 
things I think about when I think of web2py:

   - Easy (to set up, learn, use, distribute, and deploy) 
   - Rapid development, productive, efficient, compact, concise 
   - Feature-packed, comprehensive 
   - Secure 
   - Stable (backwards compatible) 
   - User-focused 
   - Innovative 
   - Well integrated 
   - Actively developed, constantly improving, frequent releases, fast bug 
   fixes, responsive to user needs 
   - Friendly, open, welcoming, helpful, supportive 
   - Professional, mature, serious 
   - It's for everyone, from beginner (wizard, plugin_wiki) to expert

The book preface also provides some good inspiration: 
http://www.web2py.com/book/default/chapter/00
 
We should also be mindful of different potential audiences we may want to 
target, which may include small or solo web dev companies; internal web 
developers within larger organizations; web-based businesses; non-Python 
professional developers (e.g., coming from PHP, Java); beginners who are new 
to web dev and/or Python; entrepreneurs; managers within organizations or 
external clients who have to approve the use of the framework; instructors 
who are teaching web dev; etc. Different types of users will care more about 
different sets of attributes.

I think one challenge that web2py has in terms of communication is that it 
is appealing both to beginners and to professionals/experts. The problem is, 
when you advertise how easy and simple something is for beginners, experts 
might assume it is going to be too basic or constraining to meet their 
needs. On the other hand, if you advertise how powerful, flexible, and 
productive something is for experts, beginners might assume it will be too 
difficult and overwhelming for them. web2py has managed a great feat by 
being very easy but also very comprehensive, powerful, and flexible. It's 
got something for everyone.

Anyway, those are just some things to think about. So far, I think my 
favorite proposal has been:

   - Productivity by Design

Here are some other options:

   - web2py - The Web framework for Django users with deadlines. 
   - web2py - Why are you reading this tagline? You could have built a web 
   app by now!

Finally, although the term enterprise is sometimes misunderstood and even 
mocked, it clearly appeals to some potential users because it suggests that 
the framework is serious, stable, secure, professional, well-supported, etc. 
So, even if we're dropping enterprise from the tagline, I think we should 
still strive to communicate that aspect of the framework and community.
 
Best,
Anthony


Re: [web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 7:15 AM, Corne wrote:
 
 We (again) looked deeper into what is really happening; and it is yet
 different.
 
 What we ran into is the following:
 We tried to set a session_id our self based on information in the url,
 which in this case resulted in calling the session connect code (where
 it went wrong) twice per request.
 
 In case a cookie was send; there is no problem at all.
 Session is handled by web2py like always (except for the fact that
 it's done twice).
 In case there is no cookie send; there is a problem.
 The first call to connect (web2py internal) has no session_id, so a
 new one is generated.
 The second call to connect (our plugin) has a session id so it's
 handled ok.
 
 In the end of the request, the session changes are written. But in our
 case (without cookie) the var session_new is True (and the session
 file is (re)opened with 'wb').
 Opening with 'wb' does seem to change the file handle. The request
 that is handled by a differend process at the same time will now have
 an invallid session.
 
 This also explains the fact that reopening the session file seemed to
 solve the problem except for the fact that the real problem is
 somewhere else.
 
 I guess that using connect is something that is / should be allowed
 (it's in the book), this is also the way to, for example use sessions
 from an other application.
 and there the same issue could apply:
 in case someone uses connect to just use a session from a different
 application. The first connect from web2py might result in creating a
 new session. While the connect which is issued later by the user does
 result in an existing session.

When you set your own session_id, does the corresponding session file always 
exist? If it does not, session.connect is going to discard that session_id and 
generate a new uuid. I don't see a way to force session.connect to create a 
session file with a predetermined id.

If that's not an issue, you could try setting response.session_new = False 
before calling session.connect; session.connect probably ought to do that 
itself at the beginning of the not-db logic branch. We could also add a 
session-id argument to allow the caller to force an id, I suppose, but I'd like 
to be a little clearer on your use case. 

Doesn't creating a session id based on the request url open up a session to 
hijacking? 

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread pbreit
I like both Productivity by design and Rapid development that scales.

Also note that Django and Rails, at least, also have a short description.

Django
The Web framework for perfectionists with deadlines
Django makes it easier to build better Web apps more quickly and with less 
code.

Rails
Web development that doesn't hurt
RoR is an open-source web framework that's optimized...


[web2py] Re: Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread pbreit
Isn't load balancing usually handle by the web server or a load balancer? 
Can the framework really address load balancing effectively? Would be cool 
if it could, of course.

Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Bruno Rocha
web2py
Productivity by design
web2py is an open-source full stack web framework for rapid development that
scales


On Tue, Mar 15, 2011 at 2:45 PM, pbreit pbreitenb...@gmail.com wrote:

 I like both Productivity by design and Rapid development that scales.

 Also note that Django and Rails, at least, also have a short description.

 Django
 The Web framework for perfectionists with deadlines
 Django makes it easier to build better Web apps more quickly and with less
 code.

 Rails
 Web development that doesn't hurt
 RoR is an open-source web framework that's optimized...



Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Martín Mulone
+1

2011/3/15 Bruno Rocha rochacbr...@gmail.com

 web2py
 Productivity by design
 web2py is an open-source full stack web framework for rapid development
 that scales



 On Tue, Mar 15, 2011 at 2:45 PM, pbreit pbreitenb...@gmail.com wrote:

 I like both Productivity by design and Rapid development that scales.

 Also note that Django and Rails, at least, also have a short description.

 Django
 The Web framework for perfectionists with deadlines
 Django makes it easier to build better Web apps more quickly and with less
 code.

 Rails
 Web development that doesn't hurt
 RoR is an open-source web framework that's optimized...





-- 
Pablo Martín Mulone (mar...@tecnodoc.com.ar)
http://www.tecnodoc.com.ar/

My blog: http://martin.tecnodoc.com.ar
Expert4Solution Profile:
http://www.experts4solutions.com/e4s/default/expert/6


[web2py] Re: Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread Massimo Di Pierro
web2py user Jay at PyCon really convinced to look into nginex. It is
an amazing server, fast, easy to configure and can do load balancing:
http://wiki.nginx.org/NginxHttpUpstreamModule

Just start multiple web2py instances with rocket (on the same machine
or different machines) and add to the nginex list of ip:port.

On Mar 15, 12:48 pm, pbreit pbreitenb...@gmail.com wrote:
 Isn't load balancing usually handle by the web server or a load balancer?
 Can the framework really address load balancing effectively? Would be cool
 if it could, of course.


[web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Massimo Di Pierro
Right now the session is a combination of client ip and a uuid. The
uuid prevents session hijacking.

The ip serves two purposes:
- the server can find expired sessions more easily
- the apps the reject sessions coming from wrong ip thus further
protecting against hijacking.

On Mar 15, 11:55 am, Jonathan Lundell jlund...@pobox.com wrote:
 On Mar 15, 2011, at 7:15 AM, Corne wrote:











  We (again) looked deeper into what is really happening; and it is yet
  different.

  What we ran into is the following:
  We tried to set a session_id our self based on information in the url,
  which in this case resulted in calling the session connect code (where
  it went wrong) twice per request.

  In case a cookie was send; there is no problem at all.
  Session is handled by web2py like always (except for the fact that
  it's done twice).
  In case there is no cookie send; there is a problem.
  The first call to connect (web2py internal) has no session_id, so a
  new one is generated.
  The second call to connect (our plugin) has a session id so it's
  handled ok.

  In the end of the request, the session changes are written. But in our
  case (without cookie) the var session_new is True (and the session
  file is (re)opened with 'wb').
  Opening with 'wb' does seem to change the file handle. The request
  that is handled by a differend process at the same time will now have
  an invallid session.

  This also explains the fact that reopening the session file seemed to
  solve the problem except for the fact that the real problem is
  somewhere else.

  I guess that using connect is something that is / should be allowed
  (it's in the book), this is also the way to, for example use sessions
  from an other application.
  and there the same issue could apply:
  in case someone uses connect to just use a session from a different
  application. The first connect from web2py might result in creating a
  new session. While the connect which is issued later by the user does
  result in an existing session.

 When you set your own session_id, does the corresponding session file always 
 exist? If it does not, session.connect is going to discard that session_id 
 and generate a new uuid. I don't see a way to force session.connect to create 
 a session file with a predetermined id.

 If that's not an issue, you could try setting response.session_new = False 
 before calling session.connect; session.connect probably ought to do that 
 itself at the beginning of the not-db logic branch. We could also add a 
 session-id argument to allow the caller to force an id, I suppose, but I'd 
 like to be a little clearer on your use case.

 Doesn't creating a session id based on the request url open up a session to 
 hijacking?


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Massimo Di Pierro
LOL

On Mar 15, 11:31 am, VP vtp2...@gmail.com wrote:
 Web2py:  The Web Framework for Pragmatists with Deadlines.

 (Don't ask how I came up with that. :-))


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread mart
Just throwing in my 2 cents worth,

Personally, I kind of like the that it says Enterprise, but as
mentioned here, depends on who's reading it. This is my first try in
world if open source so the experience may speak to me differently
than let's say the younger crowed who may be growing up with it. So my
take on it as well as the enthousiasme I may have for it is in fact
telling of previous experiences. When I have to get up in front of
folks (usually at a much higher pay grade ;) ) and talk about where I
want to take my projects and how I want to handle the releases of
their software, I tend to speak about what's exciting about web2py
and much less about how it will help us be more productive.
Somethings tend to be the same (at least that how I see it), I never
would have sold the idea or even have gotten as far  with convincing
my current employer to dump  and trash all current processes and
associated resources  tools without  showing conviction and
excitement. I sold them on this because i relied on what I liked about
web2py and what could inspire me, which is something I never would
have been able to to do any other way.

Personally, i find I care a lot less abut being productive and MUCH
more about being excited about being productive. I like web2py, and I
like python, I like that i can start something and quickly see things
happen and I really like that I can take time to think about changing
things around, scaling other things upwards, etc, and I can do this
because web2py has a community where one can login post a question and
get quick answers (as well as good exchanges that make me think).

Given the choice, that's what I would rely on to tag web2py... i would
choose something that sounds exciting, has community and something
that inspires... (all the great technical details are without a doubt
impressive and great, but that would put me in shopping mode as
opposed relying on impression. so I would ask a question instead...

what inspires you?

Who wouldn't look twice at a t-shirt with a big red tree on it that
aks a question like that?

anyways,

That's it,
Mart :)




On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
 I haven't come up with any great tagline ideas of my own yet, but as we
 generate ideas, it might be useful to first think about some of the
 distinctive attributes and goals of web2py and its community. Here are some
 things I think about when I think of web2py:

    - Easy (to set up, learn, use, distribute, and deploy)
    - Rapid development, productive, efficient, compact, concise
    - Feature-packed, comprehensive
    - Secure
    - Stable (backwards compatible)
    - User-focused
    - Innovative
    - Well integrated
    - Actively developed, constantly improving, frequent releases, fast bug
    fixes, responsive to user needs
    - Friendly, open, welcoming, helpful, supportive
    - Professional, mature, serious
    - It's for everyone, from beginner (wizard, plugin_wiki) to expert

 The book preface also provides some good 
 inspiration:http://www.web2py.com/book/default/chapter/00

 We should also be mindful of different potential audiences we may want to
 target, which may include small or solo web dev companies; internal web
 developers within larger organizations; web-based businesses; non-Python
 professional developers (e.g., coming from PHP, Java); beginners who are new
 to web dev and/or Python; entrepreneurs; managers within organizations or
 external clients who have to approve the use of the framework; instructors
 who are teaching web dev; etc. Different types of users will care more about
 different sets of attributes.

 I think one challenge that web2py has in terms of communication is that it
 is appealing both to beginners and to professionals/experts. The problem is,
 when you advertise how easy and simple something is for beginners, experts
 might assume it is going to be too basic or constraining to meet their
 needs. On the other hand, if you advertise how powerful, flexible, and
 productive something is for experts, beginners might assume it will be too
 difficult and overwhelming for them. web2py has managed a great feat by
 being very easy but also very comprehensive, powerful, and flexible. It's
 got something for everyone.

 Anyway, those are just some things to think about. So far, I think my
 favorite proposal has been:

    - Productivity by Design

 Here are some other options:

    - web2py - The Web framework for Django users with deadlines.
    - web2py - Why are you reading this tagline? You could have built a web
    app by now!

 Finally, although the term enterprise is sometimes misunderstood and even
 mocked, it clearly appeals to some potential users because it suggests that
 the framework is serious, stable, secure, professional, well-supported, etc.
 So, even if we're dropping enterprise from the tagline, I think we should
 still strive to communicate that aspect of the framework and community.

 Best,
 Anthony


Re: [web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 11:33 AM, Massimo Di Pierro wrote:
 
 Right now the session is a combination of client ip and a uuid. The
 uuid prevents session hijacking.
 
 The ip serves two purposes:
 - the server can find expired sessions more easily
 - the apps the reject sessions coming from wrong ip thus further
 protecting against hijacking.

Right, but I was referring to Corne's mechanism:

 We tried to set a session_id our self based on information in the url,
 which in this case resulted in calling the session connect code (where
 it went wrong) twice per request.


Unless there's a secret key or hash or something in the URL (like the newish 
hash logic in URL()), this seems open to hijacking.

 
 On Mar 15, 11:55 am, Jonathan Lundell jlund...@pobox.com wrote:
 On Mar 15, 2011, at 7:15 AM, Corne wrote:
 We (again) looked deeper into what is really happening; and it is yet
 different.
 
 What we ran into is the following:
 We tried to set a session_id our self based on information in the url,
 which in this case resulted in calling the session connect code (where
 it went wrong) twice per request.
 
 In case a cookie was send; there is no problem at all.
 Session is handled by web2py like always (except for the fact that
 it's done twice).
 In case there is no cookie send; there is a problem.
 The first call to connect (web2py internal) has no session_id, so a
 new one is generated.
 The second call to connect (our plugin) has a session id so it's
 handled ok.
 
 In the end of the request, the session changes are written. But in our
 case (without cookie) the var session_new is True (and the session
 file is (re)opened with 'wb').
 Opening with 'wb' does seem to change the file handle. The request
 that is handled by a differend process at the same time will now have
 an invallid session.
 
 This also explains the fact that reopening the session file seemed to
 solve the problem except for the fact that the real problem is
 somewhere else.
 
 I guess that using connect is something that is / should be allowed
 (it's in the book), this is also the way to, for example use sessions
 from an other application.
 and there the same issue could apply:
 in case someone uses connect to just use a session from a different
 application. The first connect from web2py might result in creating a
 new session. While the connect which is issued later by the user does
 result in an existing session.
 
 When you set your own session_id, does the corresponding session file always 
 exist? If it does not, session.connect is going to discard that session_id 
 and generate a new uuid. I don't see a way to force session.connect to 
 create a session file with a predetermined id.
 
 If that's not an issue, you could try setting response.session_new = False 
 before calling session.connect; session.connect probably ought to do that 
 itself at the beginning of the not-db logic branch. We could also add a 
 session-id argument to allow the caller to force an id, I suppose, but I'd 
 like to be a little clearer on your use case.
 
 Doesn't creating a session id based on the request url open up a session to 
 hijacking?




[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Massimo Di Pierro
I do not think the tagline should be a question.

On Mar 15, 1:44 pm, mart msenecal...@gmail.com wrote:
 Just throwing in my 2 cents worth,

 Personally, I kind of like the that it says Enterprise, but as
 mentioned here, depends on who's reading it. This is my first try in
 world if open source so the experience may speak to me differently
 than let's say the younger crowed who may be growing up with it. So my
 take on it as well as the enthousiasme I may have for it is in fact
 telling of previous experiences. When I have to get up in front of
 folks (usually at a much higher pay grade ;) ) and talk about where I
 want to take my projects and how I want to handle the releases of
 their software, I tend to speak about what's exciting about web2py
 and much less about how it will help us be more productive.
 Somethings tend to be the same (at least that how I see it), I never
 would have sold the idea or even have gotten as far  with convincing
 my current employer to dump  and trash all current processes and
 associated resources  tools without  showing conviction and
 excitement. I sold them on this because i relied on what I liked about
 web2py and what could inspire me, which is something I never would
 have been able to to do any other way.

 Personally, i find I care a lot less abut being productive and MUCH
 more about being excited about being productive. I like web2py, and I
 like python, I like that i can start something and quickly see things
 happen and I really like that I can take time to think about changing
 things around, scaling other things upwards, etc, and I can do this
 because web2py has a community where one can login post a question and
 get quick answers (as well as good exchanges that make me think).

 Given the choice, that's what I would rely on to tag web2py... i would
 choose something that sounds exciting, has community and something
 that inspires... (all the great technical details are without a doubt
 impressive and great, but that would put me in shopping mode as
 opposed relying on impression. so I would ask a question instead...

 what inspires you?

 Who wouldn't look twice at a t-shirt with a big red tree on it that
 aks a question like that?

 anyways,

 That's it,
 Mart :)

 On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:







  I haven't come up with any great tagline ideas of my own yet, but as we
  generate ideas, it might be useful to first think about some of the
  distinctive attributes and goals of web2py and its community. Here are some
  things I think about when I think of web2py:

     - Easy (to set up, learn, use, distribute, and deploy)
     - Rapid development, productive, efficient, compact, concise
     - Feature-packed, comprehensive
     - Secure
     - Stable (backwards compatible)
     - User-focused
     - Innovative
     - Well integrated
     - Actively developed, constantly improving, frequent releases, fast bug
     fixes, responsive to user needs
     - Friendly, open, welcoming, helpful, supportive
     - Professional, mature, serious
     - It's for everyone, from beginner (wizard, plugin_wiki) to expert

  The book preface also provides some good 
  inspiration:http://www.web2py.com/book/default/chapter/00

  We should also be mindful of different potential audiences we may want to
  target, which may include small or solo web dev companies; internal web
  developers within larger organizations; web-based businesses; non-Python
  professional developers (e.g., coming from PHP, Java); beginners who are new
  to web dev and/or Python; entrepreneurs; managers within organizations or
  external clients who have to approve the use of the framework; instructors
  who are teaching web dev; etc. Different types of users will care more about
  different sets of attributes.

  I think one challenge that web2py has in terms of communication is that it
  is appealing both to beginners and to professionals/experts. The problem is,
  when you advertise how easy and simple something is for beginners, experts
  might assume it is going to be too basic or constraining to meet their
  needs. On the other hand, if you advertise how powerful, flexible, and
  productive something is for experts, beginners might assume it will be too
  difficult and overwhelming for them. web2py has managed a great feat by
  being very easy but also very comprehensive, powerful, and flexible. It's
  got something for everyone.

  Anyway, those are just some things to think about. So far, I think my
  favorite proposal has been:

     - Productivity by Design

  Here are some other options:

     - web2py - The Web framework for Django users with deadlines.
     - web2py - Why are you reading this tagline? You could have built a web
     app by now!

  Finally, although the term enterprise is sometimes misunderstood and even
  mocked, it clearly appeals to some potential users because it suggests that
  the framework is serious, stable, secure, professional, 

[web2py] Re: Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread pbreit
I just switched from Cherokee to Nginx but have not investigated load 
balancing yet. Is Rocket necessary? I have a Nginx/uWSGI setup. I posted my 
install Fabfile on another thread.

Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread danto
2011/3/15 mart msenecal...@gmail.com

 Just throwing in my 2 cents worth,

 Personally, I kind of like the that it says Enterprise, but as
 mentioned here, depends on who's reading it. This is my first try in
 world if open source so the experience may speak to me differently
 than let's say the younger crowed who may be growing up with it. So my
 take on it as well as the enthousiasme I may have for it is in fact
 telling of previous experiences. When I have to get up in front of
 folks (usually at a much higher pay grade ;) ) and talk about where I
 want to take my projects and how I want to handle the releases of
 their software, I tend to speak about what's exciting about web2py
 and much less about how it will help us be more productive.
 Somethings tend to be the same (at least that how I see it), I never
 would have sold the idea or even have gotten as far  with convincing
 my current employer to dump  and trash all current processes and
 associated resources  tools without  showing conviction and
 excitement. I sold them on this because i relied on what I liked about
 web2py and what could inspire me, which is something I never would
 have been able to to do any other way.

 Personally, i find I care a lot less abut being productive and MUCH
 more about being excited about being productive. I like web2py, and I
 like python, I like that i can start something and quickly see things
 happen and I really like that I can take time to think about changing
 things around, scaling other things upwards, etc, and I can do this
 because web2py has a community where one can login post a question and
 get quick answers (as well as good exchanges that make me think).

 Given the choice, that's what I would rely on to tag web2py... i would
 choose something that sounds exciting, has community and something
 that inspires... (all the great technical details are without a doubt
 impressive and great, but that would put me in shopping mode as
 opposed relying on impression. so I would ask a question instead...

 what inspires you?

 Who wouldn't look twice at a t-shirt with a big red tree on it that
 aks a question like that?

 anyways,

 That's it,
 Mart :)




 On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
  I haven't come up with any great tagline ideas of my own yet, but as we
  generate ideas, it might be useful to first think about some of the
  distinctive attributes and goals of web2py and its community. Here are
 some
  things I think about when I think of web2py:
 
 - Easy (to set up, learn, use, distribute, and deploy)
 - Rapid development, productive, efficient, compact, concise
 - Feature-packed, comprehensive
 - Secure
 - Stable (backwards compatible)
 - User-focused
 - Innovative
 - Well integrated
 - Actively developed, constantly improving, frequent releases, fast
 bug
 fixes, responsive to user needs
 - Friendly, open, welcoming, helpful, supportive
 - Professional, mature, serious
 - It's for everyone, from beginner (wizard, plugin_wiki) to expert
 
  The book preface also provides some good inspiration:
 http://www.web2py.com/book/default/chapter/00
 
  We should also be mindful of different potential audiences we may want to
  target, which may include small or solo web dev companies; internal web
  developers within larger organizations; web-based businesses; non-Python
  professional developers (e.g., coming from PHP, Java); beginners who are
 new
  to web dev and/or Python; entrepreneurs; managers within organizations or
  external clients who have to approve the use of the framework;
 instructors
  who are teaching web dev; etc. Different types of users will care more
 about
  different sets of attributes.
 
  I think one challenge that web2py has in terms of communication is that
 it
  is appealing both to beginners and to professionals/experts. The problem
 is,
  when you advertise how easy and simple something is for beginners,
 experts
  might assume it is going to be too basic or constraining to meet their
  needs. On the other hand, if you advertise how powerful, flexible, and
  productive something is for experts, beginners might assume it will be
 too
  difficult and overwhelming for them. web2py has managed a great feat by
  being very easy but also very comprehensive, powerful, and flexible. It's
  got something for everyone.
 
  Anyway, those are just some things to think about. So far, I think my
  favorite proposal has been:
 
 - Productivity by Design
 
  Here are some other options:
 
 - web2py - The Web framework for Django users with deadlines.
 - web2py - Why are you reading this tagline? You could have built a
 web
 app by now!
 
  Finally, although the term enterprise is sometimes misunderstood and
 even
  mocked, it clearly appeals to some potential users because it suggests
 that
  the framework is serious, stable, secure, professional, well-supported,
 etc.
  So, even if we're dropping 

[web2py] Re: Squid caching, processor load balancing (via Cubicweb)

2011-03-15 Thread Anthony
FYI, Nginx + uWSGI is what DotCloud uses for its Python hosting (HAProxy for 
load balancing): http://docs.dotcloud.com/components/python/

On Tuesday, March 15, 2011 3:11:53 PM UTC-4, pbreit wrote:

 I just switched from Cherokee to Nginx but have not investigated load 
 balancing yet. Is Rocket necessary? I have a Nginx/uWSGI setup. I posted my 
 install Fabfile on another thread.



Re: [web2py] Internet Explorer Issue

2011-03-15 Thread Bruno Rocha
in *base.css* for welcome app change


input[type=text], input[type=password], select {
height: 16px;
}

to

input[type=text], input[type=password], select {
height: 25px;
}


On Mon, Mar 14, 2011 at 9:12 PM, Ialejandro ialejandr...@gmail.com wrote:

 Hi every body! I have some issues with Internet Explorer (I think all
 versions)

 when I get into my app developed with wep2py in chrome or firefox
 there's no problem, but with IE, the dropdowns doesn't show correctly,
 when I select a value it appears split, some fields are overlapped...
 well I have a lot of issues.

 How could I make it work fine?




[web2py] Re: Proposals for New Tagline

2011-03-15 Thread mwolfe02
+1 Productivity by design

On Mar 15, 2:13 pm, danto web2py.n...@gmail.com wrote:
 2011/3/15 mart msenecal...@gmail.com









  Just throwing in my 2 cents worth,

  Personally, I kind of like the that it says Enterprise, but as
  mentioned here, depends on who's reading it. This is my first try in
  world if open source so the experience may speak to me differently
  than let's say the younger crowed who may be growing up with it. So my
  take on it as well as the enthousiasme I may have for it is in fact
  telling of previous experiences. When I have to get up in front of
  folks (usually at a much higher pay grade ;) ) and talk about where I
  want to take my projects and how I want to handle the releases of
  their software, I tend to speak about what's exciting about web2py
  and much less about how it will help us be more productive.
  Somethings tend to be the same (at least that how I see it), I never
  would have sold the idea or even have gotten as far  with convincing
  my current employer to dump  and trash all current processes and
  associated resources  tools without  showing conviction and
  excitement. I sold them on this because i relied on what I liked about
  web2py and what could inspire me, which is something I never would
  have been able to to do any other way.

  Personally, i find I care a lot less abut being productive and MUCH
  more about being excited about being productive. I like web2py, and I
  like python, I like that i can start something and quickly see things
  happen and I really like that I can take time to think about changing
  things around, scaling other things upwards, etc, and I can do this
  because web2py has a community where one can login post a question and
  get quick answers (as well as good exchanges that make me think).

  Given the choice, that's what I would rely on to tag web2py... i would
  choose something that sounds exciting, has community and something
  that inspires... (all the great technical details are without a doubt
  impressive and great, but that would put me in shopping mode as
  opposed relying on impression. so I would ask a question instead...

  what inspires you?

  Who wouldn't look twice at a t-shirt with a big red tree on it that
  aks a question like that?

  anyways,

  That's it,
  Mart :)

  On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
   I haven't come up with any great tagline ideas of my own yet, but as we
   generate ideas, it might be useful to first think about some of the
   distinctive attributes and goals of web2py and its community. Here are
  some
   things I think about when I think of web2py:

      - Easy (to set up, learn, use, distribute, and deploy)
      - Rapid development, productive, efficient, compact, concise
      - Feature-packed, comprehensive
      - Secure
      - Stable (backwards compatible)
      - User-focused
      - Innovative
      - Well integrated
      - Actively developed, constantly improving, frequent releases, fast
  bug
      fixes, responsive to user needs
      - Friendly, open, welcoming, helpful, supportive
      - Professional, mature, serious
      - It's for everyone, from beginner (wizard, plugin_wiki) to expert

   The book preface also provides some good inspiration:
 http://www.web2py.com/book/default/chapter/00

   We should also be mindful of different potential audiences we may want to
   target, which may include small or solo web dev companies; internal web
   developers within larger organizations; web-based businesses; non-Python
   professional developers (e.g., coming from PHP, Java); beginners who are
  new
   to web dev and/or Python; entrepreneurs; managers within organizations or
   external clients who have to approve the use of the framework;
  instructors
   who are teaching web dev; etc. Different types of users will care more
  about
   different sets of attributes.

   I think one challenge that web2py has in terms of communication is that
  it
   is appealing both to beginners and to professionals/experts. The problem
  is,
   when you advertise how easy and simple something is for beginners,
  experts
   might assume it is going to be too basic or constraining to meet their
   needs. On the other hand, if you advertise how powerful, flexible, and
   productive something is for experts, beginners might assume it will be
  too
   difficult and overwhelming for them. web2py has managed a great feat by
   being very easy but also very comprehensive, powerful, and flexible. It's
   got something for everyone.

   Anyway, those are just some things to think about. So far, I think my
   favorite proposal has been:

      - Productivity by Design

   Here are some other options:

      - web2py - The Web framework for Django users with deadlines.
      - web2py - Why are you reading this tagline? You could have built a
  web
      app by now!

   Finally, although the term enterprise is sometimes misunderstood and
  even
   mocked, it clearly 

[web2py] Re: Small edits to web2py book

2011-03-15 Thread Kevin Ivarsen
Villas - thanks for making those corrections. I went through to verify
the edits, and crossed them off in my document.

Today I added many more suggested changes for chapters 5 thru 7 for
any editors interested in incorporating them into the book. Many of
them are small nitpicks, but the Validators section of Chapter 7 has
several important edits that should be made. Perhaps most importantly,
the description of strftime format specifiers is almost entirely
missing from the IS_DATETIME section. Also of note is that the book
lists the wrong boundary conditions for IS_FLOAT_IN_RANGE and
IS_INT_IN_RANGE.

As before, the edits are documented here:
https://docs.google.com/document/pub?id=15y2g6aYOvfc1joFgW5ZUhKk7HHWm2rYBre6muwZgIBY

Best regards,
Kevin



On Mar 14, 7:54 pm, villas villa...@gmail.com wrote:
 Hi Kevin

 That is great! Thesesmalltypos and mistakes detract from the web2py
 project.

 I have already done thoseedits(and I hope correctly!).  If you post
 moreedits,  I and other editors are very pleased to make the
 changes.

 Best regards,
 David

 On Mar 14, 8:53 pm, Kevin Ivarsen kivar...@gmail.com wrote:







  Folks,

  I've been working my way through the web2py book. The content is
  outstanding - many thanks to everyone who is involved with this work!
  However, a fewsmalltypos popped out at me along the way. Starting
  around Chapter 5 I began recording these as I noticed them. (I haven't
  yet tried to go back and find the ones I had noticed earlier in the
  book.)

  My notes may be found 
  here:https://docs.google.com/document/d/15y2g6aYOvfc1joFgW5ZUhKk7HHWm2rYBr...

  In his Pycon talk Massimo mentioned that several people have edit
  privileges on the book. If anybody is interested in making these
  corrections, let me know and I will continue to update the document as
  I find things to tweak. Alternatively, if I could be granted edit
  privileges I'd be happy to make these changes myself.

  Cheers,
  Kevin


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Kevin Ivarsen
I don't know how to fit it in elegantly, but wanted to offer the idea
of relating Python's batteries included mantra to web2py. That's one
thing that struck me about web2py early on - it gives you a lot of
nice features right off the bat.

Kevin


On Mar 15, 3:49 pm, mwolfe02 michael.joseph.wo...@gmail.com wrote:
 +1 Productivity by design

 On Mar 15, 2:13 pm, danto web2py.n...@gmail.com wrote:







  2011/3/15 mart msenecal...@gmail.com

   Just throwing in my 2 cents worth,

   Personally, I kind of like the that it says Enterprise, but as
   mentioned here, depends on who's reading it. This is my first try in
   world if open source so the experience may speak to me differently
   than let's say the younger crowed who may be growing up with it. So my
   take on it as well as the enthousiasme I may have for it is in fact
   telling of previous experiences. When I have to get up in front of
   folks (usually at a much higher pay grade ;) ) and talk about where I
   want to take my projects and how I want to handle the releases of
   their software, I tend to speak about what's exciting about web2py
   and much less about how it will help us be more productive.
   Somethings tend to be the same (at least that how I see it), I never
   would have sold the idea or even have gotten as far  with convincing
   my current employer to dump  and trash all current processes and
   associated resources  tools without  showing conviction and
   excitement. I sold them on this because i relied on what I liked about
   web2py and what could inspire me, which is something I never would
   have been able to to do any other way.

   Personally, i find I care a lot less abut being productive and MUCH
   more about being excited about being productive. I like web2py, and I
   like python, I like that i can start something and quickly see things
   happen and I really like that I can take time to think about changing
   things around, scaling other things upwards, etc, and I can do this
   because web2py has a community where one can login post a question and
   get quick answers (as well as good exchanges that make me think).

   Given the choice, that's what I would rely on to tag web2py... i would
   choose something that sounds exciting, has community and something
   that inspires... (all the great technical details are without a doubt
   impressive and great, but that would put me in shopping mode as
   opposed relying on impression. so I would ask a question instead...

   what inspires you?

   Who wouldn't look twice at a t-shirt with a big red tree on it that
   aks a question like that?

   anyways,

   That's it,
   Mart :)

   On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
I haven't come up with any great tagline ideas of my own yet, but as we
generate ideas, it might be useful to first think about some of the
distinctive attributes and goals of web2py and its community. Here are
   some
things I think about when I think of web2py:

   - Easy (to set up, learn, use, distribute, and deploy)
   - Rapid development, productive, efficient, compact, concise
   - Feature-packed, comprehensive
   - Secure
   - Stable (backwards compatible)
   - User-focused
   - Innovative
   - Well integrated
   - Actively developed, constantly improving, frequent releases, fast
   bug
   fixes, responsive to user needs
   - Friendly, open, welcoming, helpful, supportive
   - Professional, mature, serious
   - It's for everyone, from beginner (wizard, plugin_wiki) to expert

The book preface also provides some good inspiration:
  http://www.web2py.com/book/default/chapter/00

We should also be mindful of different potential audiences we may want 
to
target, which may include small or solo web dev companies; internal web
developers within larger organizations; web-based businesses; non-Python
professional developers (e.g., coming from PHP, Java); beginners who are
   new
to web dev and/or Python; entrepreneurs; managers within organizations 
or
external clients who have to approve the use of the framework;
   instructors
who are teaching web dev; etc. Different types of users will care more
   about
different sets of attributes.

I think one challenge that web2py has in terms of communication is that
   it
is appealing both to beginners and to professionals/experts. The problem
   is,
when you advertise how easy and simple something is for beginners,
   experts
might assume it is going to be too basic or constraining to meet their
needs. On the other hand, if you advertise how powerful, flexible, and
productive something is for experts, beginners might assume it will be
   too
difficult and overwhelming for them. web2py has managed a great feat by
being very easy but also very comprehensive, powerful, and flexible. 
It's
got something for everyone.

Anyway, those are 

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread mikech
I like the idea of rotating taglines.  

Instant gratification   comes to mind.


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Anthony
I like Productivity by Design because it sounds catchy and includes the 
word Productivity, but I'm sort of wondering what we mean with by 
design. Does that imply we didn't accidentally create a productive 
framework but have done so with forethought by design? Or perhaps that 
web2py achieves productivity by promoting a particular design to its web 
apps? I want it to be meaningful because it sounds cool, but it seems a 
little murky to me.
 
Anthony

On Tuesday, March 15, 2011 3:49:47 PM UTC-4, mwolfe02 wrote:

 +1 Productivity by design 

 On Mar 15, 2:13 pm, danto web2p...@gmail.com wrote: 
  2011/3/15 mart msene...@gmail.com 
  
  
  
  
  
  
  
  
  
   Just throwing in my 2 cents worth, 
  
   Personally, I kind of like the that it says Enterprise, but as 
   mentioned here, depends on who's reading it. This is my first try in 
   world if open source so the experience may speak to me differently 
   than let's say the younger crowed who may be growing up with it. So my 
   take on it as well as the enthousiasme I may have for it is in fact 
   telling of previous experiences. When I have to get up in front of 
   folks (usually at a much higher pay grade ;) ) and talk about where I 
   want to take my projects and how I want to handle the releases of 
   their software, I tend to speak about what's exciting about web2py 
   and much less about how it will help us be more productive. 
   Somethings tend to be the same (at least that how I see it), I never 
   would have sold the idea or even have gotten as far  with convincing 
   my current employer to dump  and trash all current processes and 
   associated resources  tools without  showing conviction and 
   excitement. I sold them on this because i relied on what I liked about 
   web2py and what could inspire me, which is something I never would 
   have been able to to do any other way. 
  
   Personally, i find I care a lot less abut being productive and MUCH 
   more about being excited about being productive. I like web2py, and I 
   like python, I like that i can start something and quickly see things 
   happen and I really like that I can take time to think about changing 
   things around, scaling other things upwards, etc, and I can do this 
   because web2py has a community where one can login post a question and 
   get quick answers (as well as good exchanges that make me think). 
  
   Given the choice, that's what I would rely on to tag web2py... i would 
   choose something that sounds exciting, has community and something 
   that inspires... (all the great technical details are without a doubt 
   impressive and great, but that would put me in shopping mode as 
   opposed relying on impression. so I would ask a question instead... 
  
   what inspires you? 
  
   Who wouldn't look twice at a t-shirt with a big red tree on it that 
   aks a question like that? 
  
   anyways, 
  
   That's it, 
   Mart :) 
  
   On Mar 15, 12:56 pm, Anthony abas...@gmail.com wrote: 
I haven't come up with any great tagline ideas of my own yet, but as 
 we 
generate ideas, it might be useful to first think about some of the 
distinctive attributes and goals of web2py and its community. Here 
 are 
   some 
things I think about when I think of web2py: 
  
   - Easy (to set up, learn, use, distribute, and deploy) 
   - Rapid development, productive, efficient, compact, concise 
   - Feature-packed, comprehensive 
   - Secure 
   - Stable (backwards compatible) 
   - User-focused 
   - Innovative 
   - Well integrated 
   - Actively developed, constantly improving, frequent releases, 
 fast 
   bug 
   fixes, responsive to user needs 
   - Friendly, open, welcoming, helpful, supportive 
   - Professional, mature, serious 
   - It's for everyone, from beginner (wizard, plugin_wiki) to expert 

  
The book preface also provides some good inspiration: 
  http://www.web2py.com/book/default/chapter/00 
  
We should also be mindful of different potential audiences we may 
 want to 
target, which may include small or solo web dev companies; internal 
 web 
developers within larger organizations; web-based businesses; 
 non-Python 
professional developers (e.g., coming from PHP, Java); beginners who 
 are 
   new 
to web dev and/or Python; entrepreneurs; managers within 
 organizations or 
external clients who have to approve the use of the framework; 
   instructors 
who are teaching web dev; etc. Different types of users will care 
 more 
   about 
different sets of attributes. 
  
I think one challenge that web2py has in terms of communication is 
 that 
   it 
is appealing both to beginners and to professionals/experts. The 
 problem 
   is, 
when you advertise how easy and simple something is for beginners, 
   experts 
might assume it is going to be too basic or constraining to meet 
 their 
needs. On the other hand, if you 

[web2py] Re: Can't connect to MySQL server on 'localhost'

2011-03-15 Thread Kevin Ivarsen
Miguel,

MySQL can communicate over either TCP or a named pipe. It's possible
that your MySQL server is only listening on the named pipe. I could
imagine that the mysql command line client would connect successfully
over this channel, but Python would try to connect to the TCP socket
and fail.

Try telnetting to the local mysql port and see what happens:

telnet localhost 3306

If you get an error like connection refused, then this is almost
certainly the problem. Take a look at your mysql config file (/etc/
mysql/my.cnf or similar) and look for the bind-address or skip-
networking settings.

Kevin

On Mar 15, 11:08 am, Miguel miguel.miran...@gmail.com wrote:
 Hello to all, I have created a new project using the web wizard, for
 some unknown reason the mysql connection is not working, this is the
 uri im using:

 mysql://cmts_monitor:cmtsTigoHome@localhost/cmts_monitor

 and this is the error i got:

 Traceback (most recent call last):
   File /home/www-data/web2py/gluon/restricted.py, line 188, in
 restricted
     exec ccode in environment
   File /home/www-data/web2py/applications/CMTS_Monitor/models/db.py,
 line 17, in module
     db = DAL('mysql://cmts_monitor:cmtsTigoHome@localhost/
 cmts_monitor')       # if not, use SQLite or other DB
   File /home/www-data/web2py/gluon/dal.py, line 3423, in __init__
     raise RuntimeError, Failure to connect, tried 5 times:\n%s %
 error
 RuntimeError: Failure to connect, tried 5 times:
 (2003, Can't connect to MySQL server on 'localhost' (111))

 i have tested the username/password combination in the command line,
 it works fine:

 mmiranda@appsrv01:/var/log/check_cmts$ mysql --user cmts_monitor --
 database cmts_monitor --host=localhost -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 20510
 Server version: 5.1.37-1ubuntu5.5 (Ubuntu)

 Type 'help;' or '\h' for help. Type '\c' to clear the current input
 statement.

 mysql

 What should i check?
 regards


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Joe Barnhart
IMNSHO, Productivity by Design sucks.

It is vague, wishy-washy, and banal.  It could be said of every web
development tool from Apache to Zope.  It fails to capture any of
web2py's essential advantages.

Massimo's offer of rapid web development that scales is closer to
the mark because it at least mentions one totally unique feature --
the fact that web2py scales from memory-stick to datacenter.  (This is
what brought it to my attention first.)

Another unique feature of web2py is it's Python all the way
down (see http://en.wikipedia.org/wiki/Turtles_all_the_way_down for
the cosmological reference).  Again, this is a totally unique property
of web2py that no other environment can claim.  I find it liberating
that I only need to become proficient in Python (all right, and a
little JS) to get my job done.

Finally, the security model of web2py is vastly stronger than its
peers.  Massimo has done more to make web2py resistant to hacks,
attacks, and vulnerabilities than any other platform that I'm familiar
with.

The familiar saw that web2py is more productive than other platforms
is the most difficult to prove and the quickest to start flame wars.
Who can say which platform is more productive?  It is totally
subjective.  Someone skilled in Java development, who has never seen
Python in his short life will probably not be more productive in
web2py.  Sad, but true.

So how about: web2py: scalable, pure python, and secure

-- Joe B.



[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Pystar
+1

On Mar 15, 2:43 pm, Bruno Rocha rochacbr...@gmail.com wrote:
 web2py - Code Less Create More!
 --
 Bruno Rocha
 [ About me:http://zerp.ly/rochacbruno]







 On Tue, Mar 15, 2011 at 8:04 AM, villas villa...@gmail.com wrote:
  The web2py tagline is currently: 'Enterprise Web Framework'.

  Massimo agrees that this might be improved and this thread is to
  solicit suggestions.  Ideally suggestions would encapsulate the
  'spirit' of web2py or stress a feature(s) and simply make it seem more
  attractive to new users.

  As an idea,  here is one suggestion (inspired by Bruno) stressing the
  productivity of web2py:

  ** Web2py - the Framework that gets things done! **


[web2py] Dealing with BLOBs

2011-03-15 Thread Ross Peoples
I have been trying this for a while now and have had some serious problems 
with BLOBs. I have taken the DAL out of the equation by using executesql(). 
I am grabbing a picture blob from an existing database (each picture os 
about 35 kb). I am taking the blob and writing it to a file, but only the 
first 4096 bytes are written to the file. Does anyone know what's going on? 
Did I do this wrong? Here's my code:

folder = os.path.join(self.request.folder, 'uploads')

rows = source.executesql('SELECT TOP 3 * FROM EmployeesPictures;')

for row in rows:
username = row[0].lower()

id = users_rev[username].id
picture = row[1]
if not picture: continue

file = open(os.path.join(folder, username + '.png'), 'wb')
for i in picture:
file.write(i)

file.close()


Re: [web2py] Re: Paypal slice question

2011-03-15 Thread howesc
yes, you should be putting your paypal values in there.  i abstracted them 
to a site-settings table so an admin could update them (and we could switch 
them easily between test and production values).

make sense?

cfh


[web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Corne
 When you set your own session_id, does the corresponding session file always 
 exist?
Yes, it does. I'm sure..

 If that's not an issue, you could try setting response.session_new = False 
 before calling session.connect
I already tried that, and then it does work.
The problem we are running into is exactly this: The
response.session_new = True, and is never reset. (I guess it should do
that).

 Doesn't creating a session id based on the request url open up a session to 
 hijacking?
The sessions are created by web2py as usual, in the request we only
add a hash to find the session back (in our case the client might have
no cookies). Internally we do also check the ip to avoid session
hijacking.

What is stored on the disk are the normal web2py sessions.
In case that a client supports cookies it all works the normal way.
In case there are no cookies, we use the hash from the url to set the
session (using session.connect())


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Massimo Di Pierro
how about designed for productivity?

On Mar 15, 2:49 pm, mwolfe02 michael.joseph.wo...@gmail.com wrote:
 +1 Productivity by design

 On Mar 15, 2:13 pm, danto web2py.n...@gmail.com wrote:







  2011/3/15 mart msenecal...@gmail.com

   Just throwing in my 2 cents worth,

   Personally, I kind of like the that it says Enterprise, but as
   mentioned here, depends on who's reading it. This is my first try in
   world if open source so the experience may speak to me differently
   than let's say the younger crowed who may be growing up with it. So my
   take on it as well as the enthousiasme I may have for it is in fact
   telling of previous experiences. When I have to get up in front of
   folks (usually at a much higher pay grade ;) ) and talk about where I
   want to take my projects and how I want to handle the releases of
   their software, I tend to speak about what's exciting about web2py
   and much less about how it will help us be more productive.
   Somethings tend to be the same (at least that how I see it), I never
   would have sold the idea or even have gotten as far  with convincing
   my current employer to dump  and trash all current processes and
   associated resources  tools without  showing conviction and
   excitement. I sold them on this because i relied on what I liked about
   web2py and what could inspire me, which is something I never would
   have been able to to do any other way.

   Personally, i find I care a lot less abut being productive and MUCH
   more about being excited about being productive. I like web2py, and I
   like python, I like that i can start something and quickly see things
   happen and I really like that I can take time to think about changing
   things around, scaling other things upwards, etc, and I can do this
   because web2py has a community where one can login post a question and
   get quick answers (as well as good exchanges that make me think).

   Given the choice, that's what I would rely on to tag web2py... i would
   choose something that sounds exciting, has community and something
   that inspires... (all the great technical details are without a doubt
   impressive and great, but that would put me in shopping mode as
   opposed relying on impression. so I would ask a question instead...

   what inspires you?

   Who wouldn't look twice at a t-shirt with a big red tree on it that
   aks a question like that?

   anyways,

   That's it,
   Mart :)

   On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
I haven't come up with any great tagline ideas of my own yet, but as we
generate ideas, it might be useful to first think about some of the
distinctive attributes and goals of web2py and its community. Here are
   some
things I think about when I think of web2py:

   - Easy (to set up, learn, use, distribute, and deploy)
   - Rapid development, productive, efficient, compact, concise
   - Feature-packed, comprehensive
   - Secure
   - Stable (backwards compatible)
   - User-focused
   - Innovative
   - Well integrated
   - Actively developed, constantly improving, frequent releases, fast
   bug
   fixes, responsive to user needs
   - Friendly, open, welcoming, helpful, supportive
   - Professional, mature, serious
   - It's for everyone, from beginner (wizard, plugin_wiki) to expert

The book preface also provides some good inspiration:
  http://www.web2py.com/book/default/chapter/00

We should also be mindful of different potential audiences we may want 
to
target, which may include small or solo web dev companies; internal web
developers within larger organizations; web-based businesses; non-Python
professional developers (e.g., coming from PHP, Java); beginners who are
   new
to web dev and/or Python; entrepreneurs; managers within organizations 
or
external clients who have to approve the use of the framework;
   instructors
who are teaching web dev; etc. Different types of users will care more
   about
different sets of attributes.

I think one challenge that web2py has in terms of communication is that
   it
is appealing both to beginners and to professionals/experts. The problem
   is,
when you advertise how easy and simple something is for beginners,
   experts
might assume it is going to be too basic or constraining to meet their
needs. On the other hand, if you advertise how powerful, flexible, and
productive something is for experts, beginners might assume it will be
   too
difficult and overwhelming for them. web2py has managed a great feat by
being very easy but also very comprehensive, powerful, and flexible. 
It's
got something for everyone.

Anyway, those are just some things to think about. So far, I think my
favorite proposal has been:

   - Productivity by Design

Here are some other options:

   - web2py - The Web framework for Django users with 

Re: [web2py] Re: Bug? Opening session files from multiple processes

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 12:17 PM, Corne wrote:
 
 When you set your own session_id, does the corresponding session file always 
 exist?
 Yes, it does. I'm sure..
 
 If that's not an issue, you could try setting response.session_new = False 
 before calling session.connect
 I already tried that, and then it does work.
 The problem we are running into is exactly this: The
 response.session_new = True, and is never reset. (I guess it should do
 that).

I don't offhand see any harm in setting it properly in each connect call. I'm a 
little unsure about the logic if the session file doesn't exist, but as long as 
it does it should work fine. I'll suggest a patch to Massimo, but setting it to 
False before your call should continue to work regardless.

I'm leaning in the direction of passing in a session id argument as well, but 
I'd like to think about it a little more. In your case (session file always 
exists) it doesn't matter so much, but if someone wanted to force the creation 
of a session file with a particular id, the logic you're using wouldn't work, 
because the id gets rewritten.

At any rate: you have a working solution, right?

 
 Doesn't creating a session id based on the request url open up a session to 
 hijacking?
 The sessions are created by web2py as usual, in the request we only
 add a hash to find the session back (in our case the client might have
 no cookies). Internally we do also check the ip to avoid session
 hijacking.
 
 What is stored on the disk are the normal web2py sessions.
 In case that a client supports cookies it all works the normal way.
 In case there are no cookies, we use the hash from the url to set the
 session (using session.connect())




Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Jonathan Lundell
On Mar 15, 2011, at 2:42 PM, Massimo Di Pierro wrote:
 
 how about designed for productivity?

Productivity. Security. Community.

 
 On Mar 15, 2:49 pm, mwolfe02 michael.joseph.wo...@gmail.com wrote:
 +1 Productivity by design
 
 On Mar 15, 2:13 pm, danto web2py.n...@gmail.com wrote:
 
 2011/3/15 mart msenecal...@gmail.com
 
 Just throwing in my 2 cents worth,
 
 Personally, I kind of like the that it says Enterprise, but as
 mentioned here, depends on who's reading it. This is my first try in
 world if open source so the experience may speak to me differently
 than let's say the younger crowed who may be growing up with it. So my
 take on it as well as the enthousiasme I may have for it is in fact
 telling of previous experiences. When I have to get up in front of
 folks (usually at a much higher pay grade ;) ) and talk about where I
 want to take my projects and how I want to handle the releases of
 their software, I tend to speak about what's exciting about web2py
 and much less about how it will help us be more productive.
 Somethings tend to be the same (at least that how I see it), I never
 would have sold the idea or even have gotten as far  with convincing
 my current employer to dump  and trash all current processes and
 associated resources  tools without  showing conviction and
 excitement. I sold them on this because i relied on what I liked about
 web2py and what could inspire me, which is something I never would
 have been able to to do any other way.
 
 Personally, i find I care a lot less abut being productive and MUCH
 more about being excited about being productive. I like web2py, and I
 like python, I like that i can start something and quickly see things
 happen and I really like that I can take time to think about changing
 things around, scaling other things upwards, etc, and I can do this
 because web2py has a community where one can login post a question and
 get quick answers (as well as good exchanges that make me think).
 
 Given the choice, that's what I would rely on to tag web2py... i would
 choose something that sounds exciting, has community and something
 that inspires... (all the great technical details are without a doubt
 impressive and great, but that would put me in shopping mode as
 opposed relying on impression. so I would ask a question instead...
 
 what inspires you?
 
 Who wouldn't look twice at a t-shirt with a big red tree on it that
 aks a question like that?
 
 anyways,
 
 That's it,
 Mart :)
 
 On Mar 15, 12:56 pm, Anthony abasta...@gmail.com wrote:
 I haven't come up with any great tagline ideas of my own yet, but as we
 generate ideas, it might be useful to first think about some of the
 distinctive attributes and goals of web2py and its community. Here are
 some
 things I think about when I think of web2py:
 
- Easy (to set up, learn, use, distribute, and deploy)
- Rapid development, productive, efficient, compact, concise
- Feature-packed, comprehensive
- Secure
- Stable (backwards compatible)
- User-focused
- Innovative
- Well integrated
- Actively developed, constantly improving, frequent releases, fast
 bug
fixes, responsive to user needs
- Friendly, open, welcoming, helpful, supportive
- Professional, mature, serious
- It's for everyone, from beginner (wizard, plugin_wiki) to expert
 
 The book preface also provides some good inspiration:
 http://www.web2py.com/book/default/chapter/00
 
 We should also be mindful of different potential audiences we may want to
 target, which may include small or solo web dev companies; internal web
 developers within larger organizations; web-based businesses; non-Python
 professional developers (e.g., coming from PHP, Java); beginners who are
 new
 to web dev and/or Python; entrepreneurs; managers within organizations or
 external clients who have to approve the use of the framework;
 instructors
 who are teaching web dev; etc. Different types of users will care more
 about
 different sets of attributes.
 
 I think one challenge that web2py has in terms of communication is that
 it
 is appealing both to beginners and to professionals/experts. The problem
 is,
 when you advertise how easy and simple something is for beginners,
 experts
 might assume it is going to be too basic or constraining to meet their
 needs. On the other hand, if you advertise how powerful, flexible, and
 productive something is for experts, beginners might assume it will be
 too
 difficult and overwhelming for them. web2py has managed a great feat by
 being very easy but also very comprehensive, powerful, and flexible. It's
 got something for everyone.
 
 Anyway, those are just some things to think about. So far, I think my
 favorite proposal has been:
 
- Productivity by Design
 
 Here are some other options:
 
- web2py - The Web framework for Django users with deadlines.
- web2py - Why are you reading this tagline? You could have built a
 web
app by now!
 
 Finally, 

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread psikahtik
Web2py: The python framework for speed, security and scalability.

[web2py] Re: Can't connect to MySQL server on 'localhost'

2011-03-15 Thread Tamas
Hi Miguel,

I had a similar problem on ubuntu linux recently  and the solution was
to enter the port number (which is usually 3306) in connect string.
Try: mysql://username:password@localhost:port/test

Cheers
Tamas


On Mar 16, 2:08 am, Miguel miguel.miran...@gmail.com wrote:
 Hello to all, I have created a new project using the web wizard, for
 some unknown reason the mysql connection is not working, this is the
 uri im using:

 mysql://cmts_monitor:cmtsTigoHome@localhost/cmts_monitor

 and this is the error i got:

 Traceback (most recent call last):
   File /home/www-data/web2py/gluon/restricted.py, line 188, in
 restricted
     exec ccode in environment
   File /home/www-data/web2py/applications/CMTS_Monitor/models/db.py,
 line 17, in module
     db = DAL('mysql://cmts_monitor:cmtsTigoHome@localhost/
 cmts_monitor')       # if not, use SQLite or other DB
   File /home/www-data/web2py/gluon/dal.py, line 3423, in __init__
     raise RuntimeError, Failure to connect, tried 5 times:\n%s %
 error
 RuntimeError: Failure to connect, tried 5 times:
 (2003, Can't connect to MySQL server on 'localhost' (111))

 i have tested the username/password combination in the command line,
 it works fine:

 mmiranda@appsrv01:/var/log/check_cmts$ mysql --user cmts_monitor --
 database cmts_monitor --host=localhost -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 20510
 Server version: 5.1.37-1ubuntu5.5 (Ubuntu)

 Type 'help;' or '\h' for help. Type '\c' to clear the current input
 statement.

 mysql

 What should i check?
 regards


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread pbreit
I think python all the way down invites controversy since the main 
criticism of web2py is that it is not pythonic.

Re: [web2py] Re: Paypal slice question

2011-03-15 Thread pbreit
I'm struggling to complete a re-write of the code to be more generic. Still 
working. And I'm going to try to put it in Massimo's tutorial format.

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread luismurciano
Here's mine, just for fun.

Web2py
{{=response.subtitle}}

Its an original tagline :P


[web2py] Re: Small edits to web2py book

2011-03-15 Thread villas
Thanks Kevin I've done those.

On Mar 15, 7:55 pm, Kevin Ivarsen kivar...@gmail.com wrote:
 Villas - thanks for making those corrections. I went through to verify
 the edits, and crossed them off in my document.

 Today I added many more suggested changes for chapters 5 thru 7 for
 any editors interested in incorporating them into the book. Many of
 them are small nitpicks, but the Validators section of Chapter 7 has
 several important edits that should be made. Perhaps most importantly,
 the description of strftime format specifiers is almost entirely
 missing from the IS_DATETIME section. Also of note is that the book
 lists the wrong boundary conditions for IS_FLOAT_IN_RANGE and
 IS_INT_IN_RANGE.

 As before, the edits are documented 
 here:https://docs.google.com/document/pub?id=15y2g6aYOvfc1joFgW5ZUhKk7HHWm...

 Best regards,
 Kevin

 On Mar 14, 7:54 pm, villas villa...@gmail.com wrote:

  Hi Kevin

  That is great! Thesesmalltypos and mistakes detract from the web2py
  project.

  I have already done thoseedits(and I hope correctly!).  If you post
  moreedits,  I and other editors are very pleased to make the
  changes.

  Best regards,
  David

  On Mar 14, 8:53 pm, Kevin Ivarsen kivar...@gmail.com wrote:

   Folks,

   I've been working my way through the web2py book. The content is
   outstanding - many thanks to everyone who is involved with this work!
   However, a fewsmalltypos popped out at me along the way. Starting
   around Chapter 5 I began recording these as I noticed them. (I haven't
   yet tried to go back and find the ones I had noticed earlier in the
   book.)

   My notes may be found 
   here:https://docs.google.com/document/d/15y2g6aYOvfc1joFgW5ZUhKk7HHWm2rYBr...

   In his Pycon talk Massimo mentioned that several people have edit
   privileges on the book. If anybody is interested in making these
   corrections, let me know and I will continue to update the document as
   I find things to tweak. Alternatively, if I could be granted edit
   privileges I'd be happy to make these changes myself.

   Cheers,
   Kevin




[web2py] tabular form

2011-03-15 Thread JmiXIII
Hello,


I need to key around 30 value for a single field at regular times.
Using a loop form in a view doesn't fit this purpose as I will have to
submit every form.
I'd prefer a kind a tabular and a single submit button that would save
the 30 values in the database.

Can somebody give me a clue on the way to achive this ?


[web2py] Re: Another jerk!

2011-03-15 Thread b00m_chef
Web2py: the framework for everyone!

or

Web2py: for realists with deadlines!

or

Web2py: best thing since django/ruby!






On Mar 14, 10:04 pm, VP vtp2...@gmail.com wrote:
 Another vote for dropping the word Enterprise.  I don't think the
 word will make it any more convincing for enterprise people when
 they shop around for frameworks.  On the other hand, it's a source of
 criticisms (justified or not).

 Web2py's merits should be based on substance and good documentations
 that show people how to do things.  These words don't do anything; and
 if they bring troubles, they should be dropped like a rock.

 On Mar 14, 10:30 pm, Massimo Di Pierro massimo.dipie...@gmail.com
 wrote:







  we will change the tagline. Let'open a thread for proposals

  On Mar 14, 9:50 pm, villas villa...@gmail.com wrote:

   Well,  my own (limited) experience suggests that most 'enterprise'
   clients have some proper IT guys who would know what they are doing
   and have already made a few strategic commitments, which,  if they do
   not include Python, then you are flogging a dead horse (I mean
   snake!). I do not see any benefit for web2py to particularly target
   those guys, they are just too entrenched.

   The big growth in new users will come from small 'agile' firms, non-
   profits and web start-ups.  Why not target that 'real' market with
   something attractive to them instead of going after the people who
   have already made their choices.

   On Mar 15, 1:53 am, G. Clifford Williams g...@notadiscussion.com
   wrote:

As someone who's developed several web2py appications for 'enterprise' 
clients, I can only say that the managers who don't know any better do 
actually notice the presence of that particular adjective. It helps get 
web2py past the buzz-word filter.

I've had a client tell me that my application ...felt more stable... 
when they had me rewrite it from ... that shell script thing.. to 
Java. All I'd done was redeploy from Python to Jython and connected it 
to their Oracle DBMS instead of using SQLite. To some, any type of 
'scripting' is not 'business class'.

On Mon, Mar 14, 2011 at 10:17:03PM -0300, rochacbruno spake:

 I would like to drop the enterprise, because translated to portuguese 
 this means empresarial which is corporated just like Java.

 I like just:
 Web2py - the web framework to get things done!

 Enviado via iPhone

 Em 14/03/2011, s 22:06, pbreit pbreitenb...@gmail.com escreveu:

  Agreed. enterprise is it bit odd here.


Re: [web2py] Re: Another jerk!

2011-03-15 Thread Albert Abril
I like the 'Getting Things Done' proposal since I'm a bit obsesive with
productivity.

On Wed, Mar 16, 2011 at 12:48 AM, b00m_chef r...@devshell.org wrote:

 Web2py: the framework for everyone!

 or

 Web2py: for realists with deadlines!

 or

 Web2py: best thing since django/ruby!






 On Mar 14, 10:04 pm, VP vtp2...@gmail.com wrote:
  Another vote for dropping the word Enterprise.  I don't think the
  word will make it any more convincing for enterprise people when
  they shop around for frameworks.  On the other hand, it's a source of
  criticisms (justified or not).
 
  Web2py's merits should be based on substance and good documentations
  that show people how to do things.  These words don't do anything; and
  if they bring troubles, they should be dropped like a rock.
 
  On Mar 14, 10:30 pm, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:
 
 
 
 
 
 
 
   we will change the tagline. Let'open a thread for proposals
 
   On Mar 14, 9:50 pm, villas villa...@gmail.com wrote:
 
Well,  my own (limited) experience suggests that most 'enterprise'
clients have some proper IT guys who would know what they are doing
and have already made a few strategic commitments, which,  if they do
not include Python, then you are flogging a dead horse (I mean
snake!). I do not see any benefit for web2py to particularly target
those guys, they are just too entrenched.
 
The big growth in new users will come from small 'agile' firms, non-
profits and web start-ups.  Why not target that 'real' market with
something attractive to them instead of going after the people who
have already made their choices.
 
On Mar 15, 1:53 am, G. Clifford Williams g...@notadiscussion.com
wrote:
 
 As someone who's developed several web2py appications for
 'enterprise' clients, I can only say that the managers who don't know any
 better do actually notice the presence of that particular adjective. It
 helps get web2py past the buzz-word filter.
 
 I've had a client tell me that my application ...felt more
 stable... when they had me rewrite it from ... that shell script
 thing.. to Java. All I'd done was redeploy from Python to Jython and
 connected it to their Oracle DBMS instead of using SQLite. To some, any type
 of 'scripting' is not 'business class'.
 
 On Mon, Mar 14, 2011 at 10:17:03PM -0300, rochacbruno spake:
 
  I would like to drop the enterprise, because translated to
 portuguese this means empresarial which is corporated just like Java.
 
  I like just:
  Web2py - the web framework to get things done!
 
  Enviado via iPhone
 
  Em 14/03/2011, s 22:06, pbreit pbreitenb...@gmail.com
 escreveu:
 
   Agreed. enterprise is it bit odd here.



[web2py] Re: Another jerk!

2011-03-15 Thread villas
Hi bOOm_chef and Albert,

Please note there is a new thread asking for proposals for the new
tagline.

http://groups.google.com/group/web2py/browse_thread/thread/5d4b6e38eac2260f/bf34c5abc1800c9d#bf34c5abc1800c9d


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Robert Kooij

   
   -  Try to avoid vagueness or bad marketing terms. Be factual.
   
   - Would not try to use more than three properties. (secure, scalabale, 
   fast, easy to learn, productive, great community etc.) Pick the three that 
   are most important.
   
   - Let's not forget the obvious, explain the name a bit more, it's mainly 
   to lure in people who see it for the first time. Previous poster said 
   speed, security and scalability. But of what? Mention web development! 
   That's what we are all here for! And as rapid as we can! :)


web2py: secure  scalable python framework for rapid web development





[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Robert Kooij
If it's all too boring, we could spice things up! :)

web2py: making web development sexy since 2007.




[web2py] Re: tabular form

2011-03-15 Thread DenesL
Something like this:

def names30():
  import copy
  n=db.person.name
  ff=[]
  for i in range(0,30):
nn=copy.copy(n)
nn.name='%s%02i' %(nn.name,i)
ff.append(nn)
  form=SQLFORM.factory(*ff)
  if form.accepts(request.vars, session, dbio=False):
for v in form.vars.values():
  if v: # db insert goes here
db.person.insert(name=v)
  elif form.errors:
 response.flash='oops'
  return dict(form=form)

On Mar 15, 7:26 pm, JmiXIII sylvn.p...@gmail.com wrote:
 Hello,

 I need to key around 30 value for a single field at regular times.
 Using a loop form in a view doesn't fit this purpose as I will have to
 submit every form.
 I'd prefer a kind a tabular and a single submit button that would save
 the 30 values in the database.

 Can somebody give me a clue on the way to achive this ?


[web2py] Re: Another jerk!

2011-03-15 Thread Massimo Di Pierro
For pragmatists who get things done

On Mar 15, 6:48 pm, b00m_chef r...@devshell.org wrote:
 Web2py: the framework for everyone!

 or

 Web2py: for realists with deadlines!

 or

 Web2py: best thing since django/ruby!

 On Mar 14, 10:04 pm, VP vtp2...@gmail.com wrote:







  Another vote for dropping the word Enterprise.  I don't think the
  word will make it any more convincing for enterprise people when
  they shop around for frameworks.  On the other hand, it's a source of
  criticisms (justified or not).

  Web2py's merits should be based on substance and good documentations
  that show people how to do things.  These words don't do anything; and
  if they bring troubles, they should be dropped like a rock.

  On Mar 14, 10:30 pm, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

   we will change the tagline. Let'open a thread for proposals

   On Mar 14, 9:50 pm, villas villa...@gmail.com wrote:

Well,  my own (limited) experience suggests that most 'enterprise'
clients have some proper IT guys who would know what they are doing
and have already made a few strategic commitments, which,  if they do
not include Python, then you are flogging a dead horse (I mean
snake!). I do not see any benefit for web2py to particularly target
those guys, they are just too entrenched.

The big growth in new users will come from small 'agile' firms, non-
profits and web start-ups.  Why not target that 'real' market with
something attractive to them instead of going after the people who
have already made their choices.

On Mar 15, 1:53 am, G. Clifford Williams g...@notadiscussion.com
wrote:

 As someone who's developed several web2py appications for 
 'enterprise' clients, I can only say that the managers who don't know 
 any better do actually notice the presence of that particular 
 adjective. It helps get web2py past the buzz-word filter.

 I've had a client tell me that my application ...felt more 
 stable... when they had me rewrite it from ... that shell script 
 thing.. to Java. All I'd done was redeploy from Python to Jython and 
 connected it to their Oracle DBMS instead of using SQLite. To some, 
 any type of 'scripting' is not 'business class'.

 On Mon, Mar 14, 2011 at 10:17:03PM -0300, rochacbruno spake:

  I would like to drop the enterprise, because translated to 
  portuguese this means empresarial which is corporated just like 
  Java.

  I like just:
  Web2py - the web framework to get things done!

  Enviado via iPhone

  Em 14/03/2011, s 22:06, pbreit pbreitenb...@gmail.com escreveu:

   Agreed. enterprise is it bit odd here.


Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread rochacbruno
We were in the same issue to choose the new logo. Had a votation and from a 
list with 94 logos we ended with the most simple and compact. 

Today, I think everyone agrees that the logo is good enought. 

I really think we need to drop enterprise so what about just dropping it?

As simple enought as web2py is. 

I mean: lets drop it and leave just:
Web2py web framework. 

When a new phrase for tagline come up here naturally. It can be included. 

[web2py] return xml list

2011-03-15 Thread Adnan S.
I used the code that Massimo posted for returning the xml, which works
perfectly fine when exporting from a single table, but when selecting
fields from two tables it gets stuck, due to table names propagated in
the resultset. Being a newbie w web2py and python I'm not finding an
elegant solution around it, but I know it must be there.

Here is a code snippet:

def export_orders_xml():
...
orders = db(db.order_items.item_id==int(request.args(0)))\
   (db.order_items.order_id==db.order1.id)\
   .select(
   db.order_items.order_id, \
   db.order1.first_name, \
   db.order1.last_name, \
   )

return xml_list(orders)


#xml tags
def export_xml(rows, fields):
users=[]
for row in rows: users.append(TAG.user(*[TAG[f](row[f]) for f in
fields]))
return TAG.users(*users).xml()

#xml view
def xml_list(rows):
response.headers['Content-Type']='application/xml'
return export_xml(rows,['order_items','order1'])
# would prefer to use it this way: return export_xml(rows,
['first_name','last_name'])

I think TAG should go around something like this:
row['table_name'].field, but not sure how to get to it :)

Rendered output:
- users
  - user
 order_itemsRow {'order_id': 123}/order_items
- order1
Row {'first_name': 'John', 'order_items': gluon.dal.Set object at
0x1176689d0, 'last_name': 'Test', 'update_record': function lambda
at 0x117644050, 'delete_record': function lambda at 0x117644a28}
  /order1
/user


Re: [web2py] Re: Cron doesn't work for me...

2011-03-15 Thread Tito Garrido
Thanks!

On Tue, Mar 15, 2011 at 1:06 PM, VP vtp2...@gmail.com wrote:

 I answered your email.   Briefly (on Linux/Unix):

 + Use crontab -l to see your cron entries.

 + Use crontab -e to create/edit cron entries.

 + Google / wikipedia for cron syntax.  To execute a URL (e.g. web2py
 controller, you can either use wget or curl).




 On Mar 15, 8:05 am, Tito Garrido titogarr...@gmail.com wrote:
  Hi VP!
 
  How did you use the system cron? I'm wondering how can I specify the
  function that I want to execute...
 
  Regards,
 
  Tito
 
  On Tue, Mar 15, 2011 at 1:53 AM, VP vtp2...@gmail.com wrote:
   Cron didn't work for me either, so I used the system cron.
 
   One question I have though is why root when web2py is run as www-
   data?
 
  --
 
  Linux User #387870
  .
   _/_õ|__|
  ..º[ .-.___.-._| . . . .
  .__( o)__( o).:___




-- 

Linux User #387870
.
 _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___


Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Anthony
I suppose we don't need a tagline at all. I think it only appears near the 
top of the home page and on the book cover, so it's not exactly ubiquitous. 
Not all frameworks have a tagline. We could just stick with a descriptive 
summary sentence on the home page, which is currently:

Free open source full-stack framework for rapid development of fast, 
scalable, secure http://www.web2py.com/book/default/chapter/01#securityand 
portable database-driven web-based applications. Written and 
programmable in Python http://www.python.org.

I suppose we could tweak that a bit, but it's not bad.
 
Of course, if we come up with a great tagline, we should use it -- but no 
tagline is probably better than a mediocre (or controversial) one.
 
Anthony
 

On Tuesday, March 15, 2011 10:14:51 PM UTC-4, rochacbruno wrote:

 We were in the same issue to choose the new logo. Had a votation and from a 
 list with 94 logos we ended with the most simple and compact. 

 Today, I think everyone agrees that the logo is good enought. 

 I really think we need to drop enterprise so what about just dropping it? 


 As simple enought as web2py is. 

 I mean: lets drop it and leave just:
 Web2py web framework. 

 When a new phrase for tagline come up here naturally. It can be included. 

  

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Massimo Di Pierro
I agree. I will remove it with the next commit.

On Mar 15, 9:50 pm, Anthony abasta...@gmail.com wrote:
 I suppose we don't need a tagline at all. I think it only appears near the
 top of the home page and on the book cover, so it's not exactly ubiquitous.
 Not all frameworks have a tagline. We could just stick with a descriptive
 summary sentence on the home page, which is currently:

 Free open source full-stack framework for rapid development of fast,
 scalable, secure http://www.web2py.com/book/default/chapter/01#securityand 
 portable database-driven web-based applications. Written and
 programmable in Python http://www.python.org.

 I suppose we could tweak that a bit, but it's not bad.

 Of course, if we come up with a great tagline, we should use it -- but no
 tagline is probably better than a mediocre (or controversial) one.

 Anthony







 On Tuesday, March 15, 2011 10:14:51 PM UTC-4, rochacbruno wrote:
  We were in the same issue to choose the new logo. Had a votation and from a
  list with 94 logos we ended with the most simple and compact.

  Today, I think everyone agrees that the logo is good enought.

  I really think we need to drop enterprise so what about just dropping it?

  As simple enought as web2py is.

  I mean: lets drop it and leave just:
  Web2py web framework.

  When a new phrase for tagline come up here naturally. It can be included.


[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Anthony
Note, it also appears as the title in the HTML head and vertically on 
the side of the page in the online book: http://www.web2py.com/book/.

On Tuesday, March 15, 2011 11:03:14 PM UTC-4, Massimo Di Pierro wrote:

 I agree. I will remove it with the next commit. 

 On Mar 15, 9:50 pm, Anthony abas...@gmail.com wrote: 
  I suppose we don't need a tagline at all. I think it only appears near 
 the 
  top of the home page and on the book cover, so it's not exactly 
 ubiquitous. 
  Not all frameworks have a tagline. We could just stick with a descriptive 

  summary sentence on the home page, which is currently: 
  
  Free open source full-stack framework for rapid development of fast, 
  scalable, secure 
  http://www.web2py.com/book/default/chapter/01#securityand 
 portable database-driven web-based applications. Written and 
  programmable in Python http://www.python.org. 
  
  I suppose we could tweak that a bit, but it's not bad. 
  
  Of course, if we come up with a great tagline, we should use it -- but no 

  tagline is probably better than a mediocre (or controversial) one. 
  
  Anthony 
  
  
  
  
  
  
  
  On Tuesday, March 15, 2011 10:14:51 PM UTC-4, rochacbruno wrote: 
   We were in the same issue to choose the new logo. Had a votation and 
 from a 
   list with 94 logos we ended with the most simple and compact. 
  
   Today, I think everyone agrees that the logo is good enought. 
  
   I really think we need to drop enterprise so what about just dropping 
 it? 
  
   As simple enought as web2py is. 
  
   I mean: lets drop it and leave just: 
   Web2py web framework. 
  
   When a new phrase for tagline come up here naturally. It can be 
 included.



[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Luther Goh Lu Feng
'Elegance through simplicity'

On Mar 16, 4:12 am, mikech mp.ch...@gmail.com wrote:
 I like the idea of rotating taglines.  

 Instant gratification   comes to mind.


Re: [web2py] Re: Paypal slice question

2011-03-15 Thread Andrew Evans
Makes sense I wanted them in a table also. But the site settings table is
already in existance, with that code you provided how does that work? Or am
I totally missing something?

*cheers

On Tue, Mar 15, 2011 at 1:50 PM, howesc how...@umich.edu wrote:

 yes, you should be putting your paypal values in there.  i abstracted them
 to a site-settings table so an admin could update them (and we could switch
 them easily between test and production values).

 make sense?

 cfh



Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Jason (spot) Brower
I wanted it to mean as much as possible. It was intended to mean you can be
productive and it was thought out with experienced hands when created.
On 15 Mar 2011 22:13, Anthony abasta...@gmail.com wrote:

 I like Productivity by Design because it sounds catchy and includes the
word Productivity, but I'm sort of wondering what we mean with by
design. Does that imply we didn't accidentally create a productive
framework but have done so with forethought by design? Or perhaps that
web2py achieves productivity by promoting a particular design to its web
apps? I want it to be meaningful because it sounds cool, but it seems a
little murky to me.

 Anthony

 On Tuesday, March 15, 2011 3:49:47 PM UTC-4, mwolfe02 wrote:

 +1 Productivity by design

 On Mar 15, 2:13 pm, danto web2p...@gmail.com wrote:
  2011/3/15 mart msene...@gmail.com
 
 
 
 
 
 
 
 
 
   Just throwing in my 2 cents worth,
 
   Personally, I kind of like the that it says Enterprise, but as
   mentioned here, depends on who's reading it. This is my first try in
   world if open source so the experience may speak to me differently
   than let's say the younger crowed who may be growing up with it. So
my
   take on it as well as the enthousiasme I may have for it is in fact
   telling of previous experiences. When I have to get up in front of
   folks (usually at a much higher pay grade ;) ) and talk about where I

   want to take my projects and how I want to handle the releases of
   their software, I tend to speak about what's exciting about web2py
   and much less about how it will help us be more productive.
   Somethings tend to be the same (at least that how I see it), I never
   would have sold the idea or even have gotten as far  with convincing
   my current employer to dump  and trash all current processes and
   associated resources  tools without  showing conviction and
   excitement. I sold them on this because i relied on what I liked
about
   web2py and what could inspire me, which is something I never would
   have been able to to do any other way.
 
   Personally, i find I care a lot less abut being productive and MUCH
   more about being excited about being productive. I like web2py, and I

   like python, I like that i can start something and quickly see things

   happen and I really like that I can take time to think about changing

   things around, scaling other things upwards, etc, and I can do this
   because web2py has a community where one can login post a question
and
   get quick answers (as well as good exchanges that make me think).
 
   Given the choice, that's what I would rely on to tag web2py... i
would
   choose something that sounds exciting, has community and something
   that inspires... (all the great technical details are without a doubt

   impressive and great, but that would put me in shopping mode as
   opposed relying on impression. so I would ask a question instead...
 
   what inspires you?
 
   Who wouldn't look twice at a t-shirt with a big red tree on it that
   aks a question like that?
 
   anyways,
 
   That's it,
   Mart :)
 
   On Mar 15, 12:56 pm, Anthony abas...@gmail.com wrote:
I haven't come up with any great tagline ideas of my own yet, but
as we
generate ideas, it might be useful to first think about some of the

distinctive attributes and goals of web2py and its community. Here
are
   some
things I think about when I think of web2py:
 
   - Easy (to set up, learn, use, distribute, and deploy)
   - Rapid development, productive, efficient, compact, concise
   - Feature-packed, comprehensive
   - Secure
   - Stable (backwards compatible)
   - User-focused
   - Innovative
   - Well integrated
   - Actively developed, constantly improving, frequent releases,
fast
   bug
   fixes, responsive to user needs
   - Friendly, open, welcoming, helpful, supportive
   - Professional, mature, serious
   - It's for everyone, from beginner (wizard, plugin_wiki) to
expert
 
The book preface also provides some good inspiration:
  http://www.web2py.com/book/default/chapter/00
 
We should also be mindful of different potential audiences we may
want to
target, which may include small or solo web dev companies; internal
web
developers within larger organizations; web-based businesses;
non-Python
professional developers (e.g., coming from PHP, Java); beginners
who are
   new
to web dev and/or Python; entrepreneurs; managers within
organizations or
external clients who have to approve the use of the framework;
   instructors
who are teaching web dev; etc. Different types of users will care
more
   about
different sets of attributes.
 
I think one challenge that web2py has in terms of communication is
that
   it
is appealing both to beginners and to professionals/experts. The
problem
   is,
when you advertise how easy and simple something is for beginners,
   experts
might assume it is going to 

Re: [web2py] Re: Proposals for New Tagline

2011-03-15 Thread Anthony
OK, that makes sense. :)

On Tuesday, March 15, 2011 11:56:17 PM UTC-4, encompass wrote:

 I wanted it to mean as much as possible. It was intended to mean you can be 
 productive and it was thought out with experienced hands when created.
 On 15 Mar 2011 22:13, Anthony abas...@gmail.com wrote:
 
  I like Productivity by Design because it sounds catchy and includes the 
 word Productivity, but I'm sort of wondering what we mean with by 
 design. Does that imply we didn't accidentally create a productive 
 framework but have done so with forethought by design? Or perhaps that 
 web2py achieves productivity by promoting a particular design to its web 
 apps? I want it to be meaningful because it sounds cool, but it seems a 
 little murky to me.
   
  Anthony
 
  On Tuesday, March 15, 2011 3:49:47 PM UTC-4, mwolfe02 wrote:
 
  +1 Productivity by design 
 
  On Mar 15, 2:13 pm, danto web2...@gmail.com wrote: 
   2011/3/15 mart msen...@gmail.com 
   
   
   
   
   
   
   
   
   
Just throwing in my 2 cents worth, 
   
Personally, I kind of like the that it says Enterprise, but as 
mentioned here, depends on who's reading it. This is my first try in 

world if open source so the experience may speak to me differently 
than let's say the younger crowed who may be growing up with it. So 
 my 
take on it as well as the enthousiasme I may have for it is in fact 
telling of previous experiences. When I have to get up in front of 
folks (usually at a much higher pay grade ;) ) and talk about where 
 I 
want to take my projects and how I want to handle the releases of 
their software, I tend to speak about what's exciting about web2py 

and much less about how it will help us be more productive. 
Somethings tend to be the same (at least that how I see it), I never 

would have sold the idea or even have gotten as far  with convincing 

my current employer to dump  and trash all current processes and 
associated resources  tools without  showing conviction and 
excitement. I sold them on this because i relied on what I liked 
 about 
web2py and what could inspire me, which is something I never would 
have been able to to do any other way. 
   
Personally, i find I care a lot less abut being productive and MUCH 
more about being excited about being productive. I like web2py, and 
 I 
like python, I like that i can start something and quickly see 
 things 
happen and I really like that I can take time to think about 
 changing 
things around, scaling other things upwards, etc, and I can do this 
because web2py has a community where one can login post a question 
 and 
get quick answers (as well as good exchanges that make me think). 
   
Given the choice, that's what I would rely on to tag web2py... i 
 would 
choose something that sounds exciting, has community and something 
that inspires... (all the great technical details are without a 
 doubt 
impressive and great, but that would put me in shopping mode as 
opposed relying on impression. so I would ask a question instead... 
   
what inspires you? 
   
Who wouldn't look twice at a t-shirt with a big red tree on it that 
aks a question like that? 
   
anyways, 
   
That's it, 
Mart :) 
   
On Mar 15, 12:56 pm, Anthony aba...@gmail.com wrote: 
 I haven't come up with any great tagline ideas of my own yet, but 
 as we 
 generate ideas, it might be useful to first think about some of 
 the 
 distinctive attributes and goals of web2py and its community. Here 
 are 
some 
 things I think about when I think of web2py: 
   
- Easy (to set up, learn, use, distribute, and deploy) 
- Rapid development, productive, efficient, compact, concise 
- Feature-packed, comprehensive 
- Secure 
- Stable (backwards compatible) 
- User-focused 
- Innovative 
- Well integrated 
- Actively developed, constantly improving, frequent releases, 
 fast 
bug 
fixes, responsive to user needs 
- Friendly, open, welcoming, helpful, supportive 
- Professional, mature, serious 
- It's for everyone, from beginner (wizard, plugin_wiki) to 
 expert 
   
 The book preface also provides some good inspiration: 
   http://www.web2py.com/book/default/chapter/00 
   
 We should also be mindful of different potential audiences we may 
 want to 
 target, which may include small or solo web dev companies; 
 internal web 
 developers within larger organizations; web-based businesses; 
 non-Python 
 professional developers (e.g., coming from PHP, Java); beginners 
 who are 
new 
 to web dev and/or Python; entrepreneurs; managers within 
 organizations or 
 external clients who have to approve the use of the framework; 
instructors 
 who are teaching web dev; etc. Different types of users will care 
 

[web2py] Re: Proposals for New Tagline

2011-03-15 Thread Nik
Here's my tounge in cheek proposal:
Web2py: puts the fun back in coding -- and extra time for playing with
taglines ...



On Mar 15, 7:04 pm, villas villa...@gmail.com wrote:
 The web2py tagline is currently: 'Enterprise Web Framework'.

 Massimo agrees that this might be improved and this thread is to
 solicit suggestions.  Ideally suggestions would encapsulate the
 'spirit' of web2py or stress a feature(s) and simply make it seem more
 attractive to new users.

 As an idea,  here is one suggestion (inspired by Bruno) stressing the
 productivity of web2py:

 ** Web2py - the Framework that gets things done! **