Re: [web2py] why not PHP?

2011-01-05 Thread Branko Vukelić
On Wed, Jan 5, 2011 at 2:00 AM, Kuba Kucharski kuba.kuchar...@gmail.com wrote:
 Comments below the original post for full explanation.

 ok, I thought there is smth more there that I missed ;)

Well, I just thought some have missed the fact that this bug is
platform-specific. What I absolutely hate about PHP is that the
default tools for database handling don't take advantage of 64-bit
platforms (they always return string regardless of the data type in
the database columns).

PHP is a really good platform though. Not at all as bad as most Python
and Ruby coders claim.




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] web2py permissions

2011-01-05 Thread Branko Vukelić
If you want 644 perms on the directory, the owner should be the user
that starts web2py. If webserver starts it, then the webserver user
(nobody, http, www, etc) should own the directory (or have permissions
to write to it anyway). If you start it manually, then the user you
used to start web2py owns it.

On Wed, Jan 5, 2011 at 1:07 PM, walter wdv...@gmail.com wrote:
 I want to ask what folders should be accessible for writing?
 Which folders should be set to permissions 644?
 Who must to be owner all folders and files?




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] why not PHP?

2011-01-04 Thread Branko Vukelić
Look at the comments below the post.

On Tue, Jan 4, 2011 at 5:46 PM, Martín Mulone mulone.mar...@gmail.com wrote:
 Nice bug

 2011/1/4 Jason (spot) Brower encomp...@gmail.com

 Wow, I like that one. :P

 On Tue, Jan 4, 2011 at 6:35 PM, mdipierro mdipie...@cs.depaul.edu wrote:

 among other reasons because you can bring down the server just by
 typing

   2.2250738585072011e-308

 in a web form integer value. (exploit requires 32bits machine).

 Source:

 http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/



 --
 My blog: http://martin.tecnodoc.com.ar
 My portfolio *spanish*: http://www.tecnodoc.com.ar
 Checkout my last proyect instant-press: http://www.instant2press.com
 Expert4Solution Profile:
 http://www.experts4solutions.com/e4s/default/expert/6






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] why not PHP?

2011-01-04 Thread Branko Vukelić
On Tue, Jan 4, 2011 at 10:08 PM, Kuba Kucharski
kuba.kuchar...@gmail.com wrote:
 2011/1/4 Branko Vukelić stu...@brankovukelic.com:
 Look at the comments below the post.

 ?

Comments below the original post for full explanation.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] jQuery - need help !

2011-01-03 Thread Branko Vukelić
They are all called .custom, though.

I think it doesn't run with jQuery in compatibility mode. For testing
purposes try this _before_ loading the jQuery UI scripts:

script
$ = jQuery;
/script

On Mon, Jan 3, 2011 at 3:50 PM, David J da...@styleflare.com wrote:
 I think you don't have the full jquery ui  package. I see you have custom

 On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com wrote:
 Hi,
 I want to use jQuery UI. I have tried a lot of things during the last two
 days, but nothing worked.
 I have read http://jqueryui.com/docs/Getting_Started and I have done the
 following steps:

 (1) Download jquery-ui-1.8.7.custom.zip from http://jqueryui.com/download

 (2) Unzip this file

 (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
 web2py: js/jquery_ui_1.8.7.custom.min.js

 (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
 web2py: css/smoothness/jquery_ui_1.8.7.custom.css

 (5) Add the following lines in web2py_ajax.html after
 response.files.insert(2,URL('static','js/calendar.js'))



 response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

 (6) Change default/index.html to:

 {{extend 'layout.html'}}
 Date: input type=text name=date id=date
 div class=one id=aHello/div
 div class=two id=bWorld/div


 script
 jQuery('.one').click(function(){jQuery('.two').slideToggle()});
 jQuery('#date').datepicker();
 /script


 (7) This is the new website:

 Date:
 Hello
 World


 A click on Hello makes World disappear, so this jQuery function works. But
 the other jQueery-function datepicker does not show any reaction. I have
 tried some other functions: neither of these functions did work.

 Maybe there is only a very small error - but I cannot find it.
 Any ideas?

 Regards, Martin




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] jQuery - need help !

2011-01-03 Thread Branko Vukelić
Ah I see now, you are using the response object. First remove this:

response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))

And then, after the web2py_ajax.html include line in layout.html:

script
$ = jQuery;
/script

And then load the jquery-ui:

script 
src={{=%URL('static','js/jquery-ui-1.8.7.custom.min.js')}}/script

Please check the {{= syntax. It's been a while since I used web2py so
I don't remember the correct syntax.


On Mon, Jan 3, 2011 at 4:59 PM, Martin Weissenboeck mweis...@gmail.com wrote:
 Sorry - where shall I put these lines?
 Into default/index.html, before {{extend 'layout.html')}} ?


 2011/1/3 Branko Vukelić stu...@brankovukelic.com

 They are all called .custom, though.

 I think it doesn't run with jQuery in compatibility mode. For testing
 purposes try this _before_ loading the jQuery UI scripts:

    script
    $ = jQuery;
    /script

 On Mon, Jan 3, 2011 at 3:50 PM, David J da...@styleflare.com wrote:
  I think you don't have the full jquery ui  package. I see you have
  custom
 
  On Jan 3, 2011 9:45 AM, Martin Weissenboeck mweis...@gmail.com
  wrote:
  Hi,
  I want to use jQuery UI. I have tried a lot of things during the last
  two
  days, but nothing worked.
  I have read http://jqueryui.com/docs/Getting_Started and I have done
  the
  following steps:
 
  (1) Download jquery-ui-1.8.7.custom.zip from
  http://jqueryui.com/download
 
  (2) Unzip this file
 
  (3) Copy download\...\js\jquery_ui_1.8.7.custom.min.js to
  web2py: js/jquery_ui_1.8.7.custom.min.js
 
  (4) Copy download\...\css\smoothness\jquery_ui_1.8.7.custom.css to
  web2py: css/smoothness/jquery_ui_1.8.7.custom.css
 
  (5) Add the following lines in web2py_ajax.html after
  response.files.insert(2,URL('static','js/calendar.js'))
 
 
 
 
  response.files.insert(3,URL('static','css/smoothness/jquery-ui-1.8.7.custom.css'))
 
  response.files.insert(4,URL('static','js/jquery-ui-1.8.7.custom.min.js'))
 
  (6) Change default/index.html to:
 
  {{extend 'layout.html'}}
  Date: input type=text name=date id=date
  div class=one id=aHello/div
  div class=two id=bWorld/div
 
 
  script
  jQuery('.one').click(function(){jQuery('.two').slideToggle()});
  jQuery('#date').datepicker();
  /script
 
 
  (7) This is the new website:
 
  Date:
  Hello
  World
 
 
  A click on Hello makes World disappear, so this jQuery function works.
  But
  the other jQueery-function datepicker does not show any reaction. I
  have
  tried some other functions: neither of these functions did work.
 
  Maybe there is only a very small error - but I cannot find it.
  Any ideas?
 
  Regards, Martin
 



 --
 Branko Vukelic

 stu...@brankovukelic.com
 http://www.brankovukelic.com/






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


[web2py] Happy New Year in 2011

2010-12-31 Thread Branko Vukelić
Well, here it's already 1AM, so:

Happy New Year in 2011 to all of you guys. I wish you a productive and
satisfying year!

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Problems in web2py 1.83.2

2010-12-29 Thread Branko Vukelić
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com:
 If I remember correctly there was something about this on the list.

 I think you use the URL the wrong way and until version 1.83.2 the helper
 worked wrongly. In your case it worked but it has been corrected and it
 doesn´t work anymore.

Hm. Isn't that technically a case of breaking backwards compatibility?

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Problems in web2py 1.83.2

2010-12-29 Thread Branko Vukelić
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com:
 If your are using a bug and somebody repairs that bug your application stops
 working.

I agree completely. However, it's a tricky situation if you insist on
ever-backwards-compatible. You only insist on that because you don't
want to break people's apps. Yet a bug fix may sometimes do just that.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Problems in web2py 1.83.2

2010-12-29 Thread Branko Vukelić
2010/12/29 Kenneth Lundström kenneth.t.lundst...@gmail.com:
 I guess not even web2py is perfect. Maybe some day.

Sure. I don't mind the bugs getting fixed. I just wanted to say that
in a perfect world, you cannot expect backwards-compatibility-forever.
:)

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] customize json output

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 3:38 PM, bova povetki...@gmail.com wrote:
 Hello!

 I'm using web2py with jquery and jquery.flot plugin

 Tell me please how can I get json output like following:
  [ { label: Foo, data: [ [10, 1], [17, -14], [30, 5] ] },
    { label: Bar, data: [ [11, 13], [19, 11], [30, -7] ] } ]


Try returning the exact same thing as JSON, and see if it works.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: customize json output

2010-12-29 Thread Branko Vukelić
I think the dictionaries should work the same, though. Never tried,
but they are the same string form as JSON objects.

On Wed, Dec 29, 2010 at 6:05 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 I found that for list and dict

 repr(L)

 works as good as

 gluon.contrib.simplejson.dumps(L)

 and it is much faster. What am I missing?

 On Dec 29, 10:26 am, DenesL denes1...@yahoo.ca wrote:
 def jsonlist():
   import gluon.contrib.simplejson
   L = [ { 'label': Foo, 'data': [ [10, 1], [17, -14], [30, 5] ] },
     { 'label': Bar, 'data': [ [11, 13], [19, 11], [30, -7] ] } ]
   response.headers['Content-Type']='text/json'
   return gluon.contrib.simplejson.dumps(L)

 On Dec 29, 9:38 am, bova povetki...@gmail.com wrote:

  Hello!

  I'm using web2py with jquery and jquery.flot plugin

  Tell me please how can I get json output like following:
    [ { label: Foo, data: [ [10, 1], [17, -14], [30, 5] ] },
      { label: Bar, data: [ [11, 13], [19, 11], [30, -7] ] } ]






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 6:04 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 I will amend my will to release the book under an open source license.

 You guys really think my heirs even know what I do in front of the
 computer all day?

I dunno, but could you ask them if they'd sue people who would dare
continue the web2py legacy if you ever die (that is, if you're not
immortal or anything like that). ;)

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 7:08 PM, Bruno Rocha rochacbr...@gmail.com wrote:

 This thread can be historical like that
 one: http://www.python.org/search/hypermail/python-1994q2/1040.html which
 was the start of PSF

Why are Westerners so obsessed with death? That's quite amazing.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
2010/12/30 mdipierro mdipie...@cs.depaul.edu:
 It is more that people in US are obsessed with lawsuits. ;-)

Lawsuits and death. Very nice. :)

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread Branko Vukelić
Btw, in case you're new to these things, the main point of URL helpers
(called URL generators in some frameworks) is to generate the URL
based on the information about the internal structure of the
application. This is done to avoid hard-coding the paths. If you
merely use the URL helper function to pass a full relative path, it
sort of beats the purpose (that's what others meant by 'not supposed
to work that way').

On Thu, Dec 30, 2010 at 1:15 AM, Maurice Ling mauricel...@gmail.com wrote:
 Thanks everyone.

 It worked.

 On Dec 29, 6:45 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 or

 URL('account', 'log_in')

 On Dec 29, 3:14 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
 wrote:

  If I remember correctly there was something about this on the list.

  I think you use the URL the wrong way and until version 1.83.2 the
  helper worked wrongly. In your case it worked but it has been
  corrected and it doesn t work anymore.

  Try something like URL(c='account', f='log_in')

  Kenneth

   Hi

   I have a problem since version 1.83.2. It gives me this error:

   Traceback (most recent call last):
      File D:\web2py\gluon\restricted.py, line 186, in restricted
        exec ccode in environment
      File D:/web2py/applications/init/controllers/default.py, line 91,
   inmodule
      File D:\web2py\gluon\globals.py, line 96, inlambda
        self._caller = lambda f: f()
      File D:/web2py/applications/init/controllers/default.py, line 55,
   in index
        name = check_login()
      File D:/web2py/applications/init/controllers/default.py, line 38,
   in check_login
        redirect(URL(r=request, f='../account/log_in'))
      File D:\web2py\gluon\html.py, line 226, in _URL
        return URL(*args, **kwargs)
      File D:\web2py\gluon\html.py, line 186, in URL
        raise SyntaxError, 'not enough information to build the url'
   SyntaxError: not enough information to build the url

   My codes worked up to version 1.82.1.

   I am using my own authorization/login codes which is in controllers/
   account.py. The offending code (check_login function) is as follows:

   def check_login(session=session):
        if session.login_time == None:
            session.login_time = 0
        if session.username == None or \
            session.login_time + login_expiry * 3600  int(time.time()):
            redirect(URL(r=request, f='../account/log_in'))
        else:
            return session.username

   In version 1.82.1, check_login (called byhttp://localhost:8000/init)
   redirects tohttp://localhost:8000/init/account/login. But from
   version 1.83.2, it seems to redirect 
   tohttp://localhost:8000/init/default/init/account/login
   which is non-existent.

   Any ideas what might be happening?

   Thanks
   Maurice Ling






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: try web2py with cherrypy, diesel, eventlet, fapws,flup, gnuicorn, paste, rocket, tornado, twisted, wsgiref

2010-12-28 Thread Branko Vukelić
Toranado used to be much faster (non-blocking), but it's been
stagnating lately because of the ever-increasing overhead. They've
been alrted, and will hopefully work on the performance.

Have you tried bjoern, btw?

On Tue, Dec 28, 2010 at 7:44 AM, mdipierro mdipie...@cs.depaul.edu wrote:
 Anyway... I have now try a few of these servers, specifically for
 comet via HTML5 WebSocket. I am impressed by Tornado for both the ease
 of use and performance.

 http://thomas.pelletier.im/2010/08/websocket-tornado-redis/

 Massimo



 On Dec 28, 12:31 am, mdipierro mdipie...@cs.depaul.edu wrote:
 Look at the code. It is trivial to add it.

 On Dec 27, 8:00 pm, Bruno Rocha rochacbr...@gmail.com wrote:

  Just tried Cyclone -https://github.com/fiorix/cyclone-It is based on
   twisted then I thought that would run

  *cyclone*
  rochacbr...@macubuntu:~/projects/web2py$ python anyserver.py -s cyclone -p
  8081
  starting cyclone on 127.0.0.1:8081...
  Traceback (most recent call last):
    File anyserver.py, line 171, in module
      main()
    File anyserver.py, line 168, in main

   run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)
    File anyserver.py, line 129, in run
      getattr(Servers,servername)(application,(ip,int(port)))
  AttributeError: class Servers has no attribute 'cyclone'
  /*cyclone*

  --

  Bruno Rochahttp://about.me/rochacbruno/bio






-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread Branko Vukelić
On Tue, Dec 28, 2010 at 6:28 PM, mdipierro mdipie...@cs.depaul.edu wrote:
  http://www.google.com/trends?q=django?

FTR, the graph is for the 'keyword' Django, which can be many things,
and doesn't reflect the popularity of either the keyword or the Django
project. The overall volume of searches for the keyword includes also
items like Django Reinhardt, etc.

Here is a bit more realistic trend graph:

http://trends.google.com/websites?q=www.djangoproject.comsa=N

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: experts4solution: please update your profile

2010-12-28 Thread Branko Vukelić
I think Massimo said you cannot endorse users with incomplete profiles.

On Tue, Dec 28, 2010 at 8:44 PM, Michele Comitini
michele.comit...@gmail.com wrote:
 Who is that? ;-)
 Well I endorsed him anyway :-)



 2010/12/28 mdipierro mdipie...@cs.depaul.edu:
 Ouch!

 On Dec 28, 1:27 pm, Bruno Rocha rochacbr...@gmail.com wrote:
 Is there a profile who needs to be updated 
 -http://experts4solutions.com/e4s/default/expert/1

 http://experts4solutions.com/e4s/default/expert/1LOL :o)

 2010/12/28 mdipierro mdipie...@cs.depaul.edu

  ... and after you have done so, email me personally.

 --

 Bruno Rochahttp://about.me/rochacbruno/bio




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread Branko Vukelić
On Tue, Dec 28, 2010 at 11:21 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 benevolent?

What? Prefer malevolent? :)

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread Branko Vukelić
 It is an open question whether distribution of such modified copies are
 legally allowed to still be called web2py if Massimo has sole legal rights
 on the name. Thus, you may be able to do that, but you likely would have to
 call it something other than web2py.

Well, uneless dead people can sue you in court, it's probably as legal
as written permission.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] autocomplete - style: widht hard coded ??

2010-12-27 Thread Branko Vukelić
Better modify the code.

On Mon, Dec 27, 2010 at 11:28 AM, Ole Martin Maeland
olemael...@gmail.com wrote:
 Hi,

 I have a autocomplete field in a form, and I would like it to be wider.
 Looking at the code it looks like it is hard coded - width: 200px, how do I
 overriede that in CSS ??



 jQuery('#_autocomplete_paper_div').fadeOut('slow'); type=textinput
 id=_autocomplete_paper_auto name=paper value= type=hiddendiv
 id=_autocomplete_paper_div style=position: absolute; display:
 none;select style=width: 200px; class=autocomplete


 Regards,
 Martin




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: CSS probleme

2010-12-27 Thread Branko Vukelić
On Mon, Dec 27, 2010 at 11:30 AM, Martin.Mulone mulone.mar...@gmail.com wrote:
  See http://www.quirksmode.org/dom/inputfile.html if you want to do that,
 any easy solution is welcome.

I don't think there's a good solution for that that doesn't involve
javascript. And even the best-looking solutions I've seen simply
cripple the basic functionality. I think it's better to just unstyle
form controls entirely, and manipulate only things like font-family,
font-size, padding, margin, width, and height to make layout easier.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-27 Thread Branko Vukelić
In other words, you want commit access to the master repository?

On Mon, Dec 27, 2010 at 11:15 PM, Thadeus Burgess thade...@thadeusb.com wrote:
 Also an issue when only one person has access to said clones.

 --
 Thadeus




 On Mon, Dec 27, 2010 at 11:04 AM, mdipierro mdipie...@cs.depaul.edu wrote:

 Yarko created it and used to maintain it. That is is the problem with
 having too many clones in different places. Venetually they get out of
 sync.

 Massimo

 On Dec 27, 9:50 am, Bruno Rocha rochacbr...@gmail.com wrote:
  Is there a web2py clone in bitbucket (updated 16 months ago)
 
  https://bitbucket.org/mdipierro/web2py/overview
 
  https://bitbucket.org/mdipierro/web2py/overviewJust needs to update
  this
  repository
 
  2010/12/27 R. Strusberg strusb...@gmail.com
 
 
 
   +1
 
   2010/12/24 ron_m ron.mco...@gmail.com:
I for one am happy with the current release cycle. It is a good
balance
between new features and the ultimate stability of release 1.XX.N
 where
   N
is the last version before XX+1 for example. The nightly build is a
bit
   of a
misnomer, many projects (C or C++ mostly) have some automated
process
   that
takes trunk and compiles it to produce a .tar.gz labelled nightly
which
might work. For web2py we should just hg pull; hg update to
achieve
   that
result. The nightly for web2py is more like a beta because Massimo
hand
picks code from trunk that will or will not be in the nightly which
could
really be a weekly.
 
I am currently developing the application I am working on and
testing is
easy enough that I test trunk at least daily. The web2py server is
quite
easy to use but the code in some places is complicated and has many
   possible
use cases. It is only through exposure out to the user base that a
large
number of use cases of the code get tested. I have even seen
problems
reported where something was fixed but used by maybe one person in a
way
that should not have worked resulting in the dreaded bug that worked
and
became a useful feature for someone.
 
Once I go to production I will probably move the releases a lot
slower
through the installed base. In fact I have 2 beta production systems
up
   now
and only push a new web2py when I push a new version of the
application
   to
the stakeholders to look at.
 
Massimo provides a fantastic service with the web2py project and I
would
   not
like to see him stifled by a load of process. Anyone that has time
to
   test
will definitely help the quality, if you don't have time, that is
okay
   too.
I personally don't mind doing some release management between where
   Massimo
is burning the midnight oil and what I let out into the production
   systems I
have/will manage. The product is alive with new features and bug
fixes
sometimes occur in minutes once reported. That is worth a lot.
 
Ron
 
  --
 
  Bruno Rochahttp://about.me/rochacbruno/bio





-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Default Values.

2010-12-26 Thread Branko Vukelić
Have you tried ``str(field.type[:10])``? Just a wild guess. I think
just saying ``field.type[:10]`` would actually return a class
instance, not a string.

On Mon, Dec 27, 2010 at 2:05 AM, David J. da...@styleflare.com wrote:
 Thanks for the Tips;

 Does this have sqlite have some sort of limitations?

 I seem to get this exception;

 Traceback (most recent call last):
   File /Users/book/Desktop/python-projects/web2py/gluon/restricted.py,
 line 188, in restricted
     exec ccode in environment
   File
 /Users/book/Desktop/python-projects/web2py/applications/app/models/db.py,
 line 97, in module
     Field('updated_at','datetime',default=request.now,update=request.now),)
   File /Users/book/Desktop/python-projects/web2py/gluon/dal.py, line 3321,
 in define_table
     polymodel=polymodel)
   File /Users/book/Desktop/python-projects/web2py/gluon/dal.py, line 410,
 in create_table
     elif field.type[:10] == 'reference ':
 TypeError: 'NoneType' object is unsubscriptable

 ERROR SNAPSHOT
 type 'exceptions.TypeError'('NoneType' object is unsubscriptable)



 On 12/26/10 6:19 PM, Bruno Rocha wrote:

 db.auth_user, default=auth.user_id




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Default Values.

2010-12-26 Thread Branko Vukelić
Oops. Correction:

str(field.type)[:10]

2010/12/27 Branko Vukelić stu...@brankovukelic.com:
 Have you tried ``str(field.type[:10])``? Just a wild guess. I think
 just saying ``field.type[:10]`` would actually return a class
 instance, not a string.

 On Mon, Dec 27, 2010 at 2:05 AM, David J. da...@styleflare.com wrote:
 Thanks for the Tips;

 Does this have sqlite have some sort of limitations?

 I seem to get this exception;

 Traceback (most recent call last):
   File /Users/book/Desktop/python-projects/web2py/gluon/restricted.py,
 line 188, in restricted
     exec ccode in environment
   File
 /Users/book/Desktop/python-projects/web2py/applications/app/models/db.py,
 line 97, in module
     Field('updated_at','datetime',default=request.now,update=request.now),)
   File /Users/book/Desktop/python-projects/web2py/gluon/dal.py, line 3321,
 in define_table
     polymodel=polymodel)
   File /Users/book/Desktop/python-projects/web2py/gluon/dal.py, line 410,
 in create_table
     elif field.type[:10] == 'reference ':
 TypeError: 'NoneType' object is unsubscriptable

 ERROR SNAPSHOT
 type 'exceptions.TypeError'('NoneType' object is unsubscriptable)



 On 12/26/10 6:19 PM, Bruno Rocha wrote:

 db.auth_user, default=auth.user_id




 --
 Branko Vukelic

 stu...@brankovukelic.com
 http://www.brankovukelic.com/




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: please explain this

2010-12-25 Thread Branko Vukelić
Take a look at this for the explanation of _why_ you use escaping:

http://en.wikipedia.org/wiki/Cross-site_scripting

On Sat, Dec 25, 2010 at 8:02 AM, Sahil Arora sahilarora...@gmail.com wrote:
 thanks

 On Sat, Dec 25, 2010 at 12:09 PM, Thadeus Burgess thade...@thadeusb.com
 wrote:

 Escape will convert the text to html entities. For example,

  x = A 'quote' is bbold/b
  print response.write(x, escape=True)
 A 'quote' is lt;bgt;boldlt;/bgt;

 This protects your page from html injection hacks. If you need to display
 html from a variable and you know absolutely sure that it is safe, use

 {{=XML(x)}}

 Which also provides some helper methods to allow you to select safe tags
 without allowing everything.

 --
 Thadeus




 On Fri, Dec 24, 2010 at 11:39 PM, Sahil Arora sahilarora...@gmail.com
 wrote:

 I am asking what does escape=true does

 On Sat, Dec 25, 2010 at 11:02 AM, mdipierro mdipie...@cs.depaul.edu
 wrote:

 {{=x}}

 is equivalent to

 {{response.write(x,escape=True)}}

 Did I answer the question?


 On Dec 24, 10:04 pm, Sahil Arora sahilarora...@gmail.com wrote:
  what do you mean by word 'escape' when we say escape = False
 
  or
  in
  {{=x}}
  Variables injected into the HTML in this way are escaped by default.
  The
  escaping is ignored if x is an XML object, even if escape is set to
  True.
 
  --
  Sahil Arora
  B.Tech 2nd year
  Computer Science and Engineering
  IIT Delhi
  Contact No: +91 9871491046


 --
 Sahil Arora
 B.Tech 2nd year
 Computer Science and Engineering
 IIT Delhi
 Contact No: +91 9871491046




 --
 Sahil Arora
 B.Tech 2nd year
 Computer Science and Engineering
 IIT Delhi
 Contact No: +91 9871491046




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-25 Thread Branko Vukelić
On Sat, Dec 25, 2010 at 4:08 PM, weheh richard_gor...@verizon.net wrote:
 I'm not keen on the 2 button approach -- can you imagine a 2 button
 release for python? Nevertheless, it does potentially simplify the

Yes, I can certainly imagine a 2 button Python release[1]:


--

For the MD5 checksums and OpenPGP signatures, look at the detailed
Python 2.7.1 page:

* Python 2.7.1 Windows installer (Windows binary -- does not include source)
* Python 2.7.1 Windows X86-64 installer (Windows AMD64 / Intel 64
/ X86-64 binary [1] -- does not include source)

* Python 2.7.1 compressed source tarball (for Linux, Unix or OS X)
* Python 2.7.1 bzipped source tarball (for Linux, Unix or OS X,
more compressed)

Also look at the detailed Python 3.1.3 page:

* Python 3.1.3 Windows x86 MSI Installer (Windows binary -- does
not include source)
* Python 3.1.3 Windows X86-64 MSI Installer (Windows AMD64 / Intel
64 / X86-64 binary [1] -- does not include source)

* Python 3.1.3 compressed source tarball (for Linux, Unix or OS X)
* Python 3.1.3 bzipped source tarball (for Linux, Unix or OS X,
more compressed)

--

[1] http://python.org/download/


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] I just discovered this

2010-12-24 Thread Branko Vukelić
On Fri, Dec 24, 2010 at 8:41 AM, mdipierro mdipie...@cs.depaul.edu wrote:
 http://reia-lang.org/

Sweet!


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-24 Thread Branko Vukelić
+1

On Fri, Dec 24, 2010 at 8:20 AM, Luis Díaz diazluis2...@gmail.com wrote:
 +1

 2010/12/24 ron_m ron.mco...@gmail.com

 I for one am happy with the current release cycle. It is a good balance
 between new features and the ultimate stability of release 1.XX.N  where N
 is the last version before XX+1 for example. The nightly build is a bit of a
 misnomer, many projects (C or C++ mostly) have some automated process that
 takes trunk and compiles it to produce a .tar.gz labelled nightly which
 might work. For web2py we should just hg pull; hg update to achieve that
 result. The nightly for web2py is more like a beta because Massimo hand
 picks code from trunk that will or will not be in the nightly which could
 really be a weekly.

 I am currently developing the application I am working on and testing is
 easy enough that I test trunk at least daily. The web2py server is quite
 easy to use but the code in some places is complicated and has many possible
 use cases. It is only through exposure out to the user base that a large
 number of use cases of the code get tested. I have even seen problems
 reported where something was fixed but used by maybe one person in a way
 that should not have worked resulting in the dreaded bug that worked and
 became a useful feature for someone.

 Once I go to production I will probably move the releases a lot slower
 through the installed base. In fact I have 2 beta production systems up now
 and only push a new web2py when I push a new version of the application to
 the stakeholders to look at.

 Massimo provides a fantastic service with the web2py project and I would
 not like to see him stifled by a load of process. Anyone that has time to
 test will definitely help the quality, if you don't have time, that is okay
 too. I personally don't mind doing some release management between where
 Massimo is burning the midnight oil and what I let out into the production
 systems I have/will manage. The product is alive with new features and bug
 fixes sometimes occur in minutes once reported. That is worth a lot.

 Ron





 --
 Díaz Luis
 TSU Analisis de Sistemas
 Universidad de Carabobo
 http://web2pyfacil.blogspot.com/
 Facultad de Odontología




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-24 Thread Branko Vukelić
2010/12/24 Kenneth Lundström kenneth.t.lundst...@gmail.com:
 Is there instructions how to use the hg stuff to use the trunk. Could not
 find the hg command in the book?

Look here:

http://code.google.com/p/web2py/source/checkout

I think the double-update button is a good idea. I was going to
suggest/implement the same thing. I haven't looked yet at how the
update works server-side. Will look as soon as I have more time.

@Massimo, what do you think about cloning the project to Bitbucket?

https://bitbucket.org/


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Is this broken?

2010-12-24 Thread Branko Vukelić
search_form = FORM(LABEL('Search a word: ', _for='word',
_id='word_label', _name='word_label'),
INPUT(_id='word', _name='word', requires=IS_NOT_EMPTY()),
SELECT(_name='languages', _id='languages',
requires=IS_IN_DB(db,'languages.id'), *options_added),
INPUT(_type=submit,_value=SEARCH),
 _name='search_form')

That better? Looks like a book example, though.

On Fri, Dec 24, 2010 at 7:35 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 Nothing changed in this respect. Probably the values of the indices [2]
 [3] is wrong.
 I will try if you post your code without links in it. ;-)


 On Dec 24, 11:21 am, Arun K.Rajeevan the1.a...@gmail.com wrote:
 See following form

 search_form = FORM http://127.0.0.1:8000/examples/global/vars/FORM(LABEL 
 http://127.0.0.1:8000/examples/global/vars/LABEL('Search a word: ', 
 _for='word', _id='word_label', _name='word_label'),
                     INPUT 
 http://127.0.0.1:8000/examples/global/vars/INPUT(_id='word', _name='word', 
 requires=IS_NOT_EMPTY 
 http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY()),
                     SELECT 
 http://127.0.0.1:8000/examples/global/vars/SELECT(_name='languages', 
 _id='languages', requires=IS_IN_DB 
 http://127.0.0.1:8000/examples/global/vars/IS_IN_DB(db,'languages.id'), 
 *options_added),
                     INPUT 
 http://127.0.0.1:8000/examples/global/vars/INPUT(_type=submit,_value=SEARCH),
                      _name='search_form')

  I used to do something like search_form[2][3]['_selected']=True

 But now with 1.91.x this shows an error (Assignment with NoneType or 
 something similar)

 What happened?




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-24 Thread Branko Vukelić
On Fri, Dec 24, 2010 at 10:18 PM, VP vtp2...@gmail.com wrote:
 For one thing, I don't think the 2-button suggestion is a good idea;
 it's just another indirect layer of information that might not be
 meaningful if the underlying mechanism is meaningful.  Conversely, if
 the underlying mechanism is meaningful, there's no need for the 2-
 button solution.   For example, if the release mechanism follows
 strictly Massimo's rule that 1.x.0 is likely a feature-introducing
 big release with potential big bugs, where as 1.x.9 is likely a bug-
 fixing release, then users can make intelligent decision to upgrade or
 not; so there's no need for 2 buttons.  If this rule is not adhered as
 intended, however, then 2 buttons do not help.

2-button solution doesn't solve the issue of making informed
decisions. It solves the issue of having an option between upgrading
to the next stable release, versus upgrading to the next release
candidate. The use-case is valid, and was outlined by Kenneth.
Inclusion of changelog is a good idea as well. The best place would be
the confirmation page for the upgrade action. It may also be
worthwhile to consider a single-button upgrade with a drop-down on the
confirmation page.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Great summary of web2py

2010-12-23 Thread Branko Vukelić
On Thu, Dec 23, 2010 at 4:16 AM, VP vtp2...@gmail.com wrote:
 I've supported web2py for a long time.  But I think it's time to
 rethink about PR. Frankly, I think this Flask/Django business is a
 distraction.  I think Massimo should completely ignore and do not say
 anything about Flask or Django.

Where did THIS come from? Django is mentioned once by an asker Is
this a good framework to start with? Was looking at web.py, but this
looks more complex yet not as django does., and once in a response
Web2py is much easier to learn than Django and offers much more
productivity than web.py.. Flask isn't mentioned at all. Or am I
missing something?

In the summary, also no mention of Django or Flask.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-23 Thread Branko Vukelić
On Thu, Dec 23, 2010 at 5:37 PM, Jonathan Lundell jlund...@pobox.com wrote:
 On Dec 23, 2010, at 1:04 AM, cjrh wrote:

 On Dec 22, 6:05 pm, Thadeus Burgess thade...@thadeusb.com wrote:
 What I do is if my app works with a certain version, I don't ever upgrade
 the web2py unless I need a brand new feature or bugfix that effects me.

 +1.  If you don't need anything new, no point in upgrading.

 The problem is that if you *do* need a bugfix, you ordinarily can't get it 
 without adopting all the changes since the version you're currently using 
 (unless you do your own patching).

That's another reason why you want to help test the 'release
candidate', right? :)

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-23 Thread Branko Vukelić
On Thu, Dec 23, 2010 at 6:19 PM, Jonathan Lundell jlund...@pobox.com wrote:
 Seriously: no.

Seriously: yes. Why? Because it's YOUR work that is going to suffer if
you don't. Why WOULDN'T you test something you are going to deploy?
I've just tested dozen frameworks and even PHP before starting a
project, and I'm a hobbyist. Are you telling me professional
developers aren't expected to make an informed choice about their
platform? If that's the case, professional developers are people I
would NEVER trust to do their job right.

 That is, if I'm using a release from six months ago, and all I need is a 
 point fix,

Then you can dig around the commits and make yourself a patch. At
least that's what I'd do.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Unable to detect your browser

2010-12-23 Thread Branko Vukelić
On Thu, Dec 23, 2010 at 10:22 PM, greenpoise danel.sega...@gmail.com wrote:
 when I issue echo $BROWSER I get firefox. I have not used web2py in a
 long time, since I have ArchLinux because of this problem. Is there a
 way to change web2py as to where it does not launches any browser
 I have no plans of changing my system distribution.

Arch is defaulting to Py3k. Just run into this minutes ago. :D

Try this:

$ export PYTHON='/usr/bin/python2'; python2 ./web2py

You can add an alias for this in your ~/.bashrc


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-23 Thread Branko Vukelić
On Thu, Dec 23, 2010 at 10:40 PM, pbreit pbreitenb...@gmail.com wrote:
 Part of the value of a framework is being able to count on its stability.
 For now, we can upgrade more slowly and pay attention to stability reports
 of new releases.

Yes, yes. Sit around and wait. For what reports again? Based on what
bug reports again? Everyone was sitting and waiting for Massimo to
actually label it as stable release. How wonderful. I'm sure that's
the BEST strategy to ensure web2py is bug free in future releases. Oh,
and what happens if Massimo's stable release turns out to be not that
stable after all? Well, this thread happens.

Last I've heard, Massimo was a single person. I don't know if he can
multiply like amoebae, but I'm sure it'd help if we all just dug into
release candidates or even trunk and _at least_ poked around. Even
better, why not deploy your latest awesome project on the new release
and give it a spin?

All in all, some of you guys are just... I dunno. Irrational. (Or
retarded, but I hope not.) You take far too many things for granted.
FAR too many things. And you fight any notion that doesn't match that
vision. So you don't see the beauty of free software, fine. But what's
this?! Even free as in beer isn't enough for you! You want it ALL. And
what IS the 'all'? Even you don't know. I'll tell you what you want.
You want open-source projects to submit to YOUR selfish and
self-centered vision. Instead of talking about contribution (of your
valuable time to the project that SAVES your valuable time), you
demand, and demand, and demand.

You keep babbling about your selfish needs, not even considering that
there are actual people who have THEIR OWN needs and yet make time to
listen to you, and implement shit in record time. And again, it has to
be said, that saves you your valuable time. Is that not enough for
you? Doesn't that make you happy? Is that ENOUGH?

Well, you know what. You should all be ashamed. You have absolutely NO
RIGHT to demand anything from Massimo or any other contributor. And
don't tell me about how you love web2py but you just wanted X or Y.
You OWE web2py X and Y, so if you want it, just do it yourself. YOU
label releases as stable, and YOU implement stuff. If Massimo does
that for you, it's a BIG FAT favor, and you should keep that in mind.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Unable to detect your browser

2010-12-23 Thread Branko Vukelić
2010/12/23 greenpoise danel.sega...@gmail.com:
 brilliant!! THANKS SO MUCH!

You're welcome. It also helps if you build a virtual environment for
developing your apps. Keeps things clean.

First you get virtualenv package with:

$ easy_install-2.7 virtualenv

Then you just run this:

$ virtualenv --no-site-packages /path/to/my/env
$ cd /path/to/my/env
$ source bin/activate
(env) $ python

You'll notice that the interpreter version is now 2.7.x within the
env, and that '(env)' is printed before your prompt. As far as I know,
you cannot exit the environment other than by exiting the shell
altogether.

The environment is sealed off from your local Python install, so
anything that you install within your environment is available only
within the environment and if you use the ``--no-site-packages`` flag,
no packages installed in your local Python path will not be accessible
within the environment. Now, to develop with web2py within the
virtualenv, you just copy web2py dir into the virtualenv dir, and
that's it. Now you can run ``./web2py.py`` normally and web2py will
use the interpreter installed in the env.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: Great summary of web2py

2010-12-23 Thread Branko Vukelić
2010/12/23 VP vtp2...@gmail.com:
 People who think that Django/Flask are superior to web2py, and/or
 web2py is deeply flawed, aren't changing their minds.  There's no
 point to debate, justify, etc.

True.

Off-topic

I've recently tested Flask briefly. I didn't like it's way of routing.
But then I realized something (and Flask docs confirm that as well).
Flask and web2py are not even in the same league. Flask was developed
to handle small stuff, where having routing stuff dispersed around the
code base is acceptable, because the codebase itself tends to be small
in such projects. But that sucks for larger projects. In contrast,
web2py is geared towards far more organized code, and therefore larger
projects. At least to some extent. I'm not sure about globals, but I
don't develop large projects myself, so it's fine for me.

So I don't even understand how Flask can be compared to web2py at all.
Two different things, with two different design goals.

/Off-topic

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 9:17 AM, Michele Comitini
michele.comit...@gmail.com wrote:
 should we have a stable and beta (latest) release?  Many people do not
 use trunk, because changes too fast I guess.
 Having a beta period before stable could help attract more beta
 testers, but I think it would add a burden for version control...

Why not just label new releases as edge or something, and leave a
copy of an old release labeled stable? That way, release model is
unchanged, but people do get some idea about the expected stability.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Apache quits Java governance group in protest of Oracle abuses

2010-12-22 Thread Branko Vukelić
We all saw it coming. :)

On Wed, Dec 22, 2010 at 10:45 AM, Michele michele.comit...@gmail.com wrote:

 Just to keep u update on the Oracle takeover




 Sent to you by Michele via Google Reader:




 Apache quits Java governance group in protest of Oracle abuses

 via Open Ended by segpha...@arstechnica.com (Ryan Paul) on 12/9/10

 The Apache Software Foundation (ASF) announced today that it is resigning 
 from the executive committee of the Java Community Process (JCP), the 
 governance body responsible for managing standards related to the Java 
 programming language. The move is a response to Oracle's ongoing failure to 
 comply with the intellectual property policies established by the JCP.

 The heart of the issue is that Apache can't certify that its open source Java 
 implementation—called Harmony—conforms with the Java language standards 
 because Oracle refuses to supply the necessary test suites under a suitably 
 open license. Oracle's position on the issue falls afoul of JCP policies, 
 which stipulate that standards and other relevant materials must be freely 
 redistributable and made available under terms that are conducive to enabling 
 third-party open source implementations.

 Read the comments on this post




 Things you can do from here:

 Subscribe to Open Ended using Google Reader
 Get started using Google Reader to easily keep up with all your favorite sites





--
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] web2py 1.91.1 is OUT (LGPLv3)

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 1:49 PM, Tom Atkins minkto...@gmail.com wrote:
 It's amazing how much has been added and fixed in 12 months since I've been

Are you kidding? Only the last two MONTHS were insane! :D

= Massimo Quick-Fingers DiPierro, the sheriff of Web2pyville.



-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 3:44 PM, appydev appy...@gmail.com wrote:
 I think there should be a version, not to call it ... ,
 Something likeUbuntu LTS (Long Term Support). and that
 this version receiveimmediate bug fixes. and other critical updates that do
 notprovide new features mean, for a considerable time until thestable
 version and has been sufficiently tested.

LTS is a completely different ting. It means a lot of backporting of
stuff that's fixed in later releases, and keeping it supported for 3
years. I don't think any framework does it. It's sufficient that we
have a stable and unstable (or edge, or whatever) versions. The latter
would be a _released_ version, but is not considered thoroughly
tested. It's like Debian's unstable-testing-stable cycle.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
2010/12/22 Luis Díaz diazluis2...@gmail.com:

 in particular whenever new versions come out ... I always say ... have
 to wait 1 week or 2 to becomestable ...

Not become stable, but be proven stable. You release, wait for
everyone to give it a go. If everyone is happy, then it's considered
stable, and move to stable box on the downloads page. If someone
complains, it stays in unstable indefinitely, and a new release is
made fixing the bugs.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] web2py 1.91.1 is OUT (LGPLv3)

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 4:19 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
 I have been hacking a bit with Django yesterday and realize how much simpler

Django is a humongous monster (call it feature-rich, I call it bloat).
You really have to spend a lot of time before you can do anything with
it. And even then, parts of Django will fight you (like content types
framework) until you go mad, or submit to its weird ways.


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 5:05 PM, Thadeus Burgess thade...@thadeusb.com wrote:
 Nobody has time to work on certain things like this since most of us have
 full time jobs that may or may not be related to web2py.

What do you mean? No time to develop a system of labeling releases or
no time to upgrade, test, etc?

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 5:57 PM, Thadeus Burgess thade...@thadeusb.com wrote:
 The latter.

 No time to test aside from upgrading in production.

Oh, but that's a bit upside down. web2py comes with no warranties, you
should at least test it a bit before going live. And as a double-win,
you also help judging the quality of web2py release. Just updating the
live site would be plain irresponsible, I think, even if Massimo had a
clean bug-free record. Of course, you can do it anyway if it's not a
mission-critical site (not too many users, or very forgiving users,
etc), but for an important site, it's just not a good practice in
general, regardless of web2py's release scheme.

 No time to develop a test application which can handle all of web2py
 features (including all DAL databases)

That's why I suggested the unstable-stable scheme in the first place.
Test unstable. If it's good for you, shoot a message to mailing list
(if you want), and deploy it. If it's not good, then shoot a bug
report to the mailing list, and Massimo can roll out the bugfix
release soon after that. Rinse, repeat.

 No time to set up and maintain a server just for said tests.

See above about the said tests. On the other hand, I don't think it
would be too crazy to make a test server (or even a test virtual host)
just for testing the potential candidate for live deployment.

-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 8:29 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 The idea was to have stable and nightly-build. The problem is that
 very few people check the nightly build.

Well, yeah, it's because it's sounds like a nightly TRUNK dump. :)
It's better to make a 'incubation release' or something like that, so
it's obvious that it's a release. And when it's hatched, you can label
it safe-for-production. I don't know if people would use them, though.
They might still go yuck and decide it's just like nightly, with a
fancy name. :D


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 8:47 PM, Anthony abasta...@gmail.com wrote:
 Oh, also, I noticed a typo on the website -- it says Nightly Built instead
 of Nightly Build. Maybe that's the problem. ;-)

Is there a typo on this planet that can evade Anthony? :D


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 9:38 PM, Michele Comitini
michele.comit...@gmail.com wrote:
 Web2py supports unit testing.  Why not have an app with controller(s)
 that can be tested for each solved bug?
  this would reduce at least regressions.  Kinda continuos integration system

That also requires time and discipline, if I'm not mistaken. :)

The current way of testing (open-compaint system) is totally cool.
What I mean is, it works. People get stuck, they complain, Massimo
fixes. It's about how to get people to test-deploy apps with unstable
releases instead of going WTF?! when deploying a new release. I
think that would be less time-consuming, and less frustrating for end
users as well.



-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread Branko Vukelić
Shoot Massimo an e-mail. I'm sure he'd be happy to hear from you.

On Wed, Dec 22, 2010 at 11:37 PM, Michael McGinnis
ish...@biographiks.com wrote:
 I'd like to help fix those typos. Let me know how I can get started.

 Michael McGinnis
 michael.d.mcgin...@gmail.com

 On Dec 22, 4:01 pm, Stefaan Himpe stefaan.hi...@gmail.com wrote:
  Is there a typo on this planet that can evade Anthony? :D

 While we're on the subject... *cough*experts4solutions.com*cough*
 Its typos still make my eyes bleed :p




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] When to use lambda?

2010-12-21 Thread Branko Vukelić
On Tue, Dec 21, 2010 at 9:36 PM, pbreit pbreitenb...@gmail.com wrote:
 I see lambda used quite a bit and don't totally understand the concept. Is
 there a simple rule to follow to know when it is necessary to use?

You can get away with NEVER using lambda. But it's cool to know it.
Lambda is basically a function that acts as an object. So, for
example, you can say this:

def myfunction(a):
a('this')!

myfunction(lambda x: print 'Eat %s!' % x)

and that would print 'Eat this!'.

There's nothing to it, really. Just knowing this, you'll know when you
need to use it. It's one of 3 features I love about Python.

http://docs.python.org/reference/expressions.html#lambda


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: it case you missed it...

2010-12-21 Thread Branko Vukelić
On Tue, Dec 21, 2010 at 11:08 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 Perhaps I should add a new exception: you loose the license to use
 web2py if you complain about web2py or its license. ;-)

for 1000 years or life, whichever comes last ;)


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] look ma, no flash!

2010-12-21 Thread Branko Vukelić
Damn, that's nice.

On Tue, Dec 21, 2010 at 11:31 PM, Michele Comitini
michele.comit...@gmail.com wrote:
 http://spritely.net/




-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] look ma, no flash!

2010-12-21 Thread Branko Vukelić
Yup. It's great. I've looked at the demos, though, and they all sort
of work the same way. Not very versatile if demo is all there is to
it.

On Tue, Dec 21, 2010 at 11:46 PM, Michele Comitini
michele.comit...@gmail.com wrote:
 Branko,

 did you try to click on those fat black birds and then click somewhere
 else on the window?


 2010/12/21 Branko Vukelić stu...@brankovukelic.com:
 Damn, that's nice.

 On Tue, Dec 21, 2010 at 11:31 PM, Michele Comitini
 michele.comit...@gmail.com wrote:
 http://spritely.net/




 --
 Branko Vukelic

 stu...@brankovukelic.com
 http://www.brankovukelic.com/





-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] Re: When to use lambda?

2010-12-21 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 12:13 AM, Stefaan Himpe stefaan.hi...@gmail.com wrote:
 myfunction(lambda x: print 'Eat %s!' % x)

 and that would print 'Eat this!'.

 Ahm... :)
 You can't use print in lambda as it is a statement, not an expression (in
 python 2.x at least)

Yah, I know. I've corrected myself. But I guess it's worth repeating. :)


-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/


Re: [web2py] It is done GPL2 - LGPL3

2010-12-21 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 1:30 AM, Bruno Rocha rochacbr...@gmail.com wrote:

 LGPL3 + 1
 Merry Christmas + 1

[i + 1 for i in [LGPL3, MerryChristmas]] ;)



-- 
Branko Vukelic

stu...@brankovukelic.com
http://www.brankovukelic.com/