[web2py] Re: BUG? db.mytable.id.represent with Crud

2010-12-16 Thread hcvst
Loked at the source for SQLTABLE.
Setting linkto to None fixed it.

def index2():
" List all blog posts "
db.blog_posts.title.represent = lambda _: 'replace title'
db.blog_posts.id.represent = lambda _: 'replace id'
posts = crud.select(
db.blog_posts,
fields=['blog_posts.id', 'blog_posts.title'],
linkto=None)
return dict(posts=posts)

On Dec 16, 6:08 pm, hcvst  wrote:
> Hi,
>
> I'm struggling to change a table's records ID representation when
> using Crud.
> (w2p Version 1.89.5 (2010-11-21 22:12:54))
>
> def index1():
>     " List all blog posts "
>     db.blog_posts.title.represent = lambda _: 'replace title'
>     db.blog_posts.id.represent = lambda _: 'replace id'
>     posts = crud.select(
>         db.blog_posts,
>         fields=['id', 'title'])
>     return dict(posts=posts)
>
> def index2():
>     " List all blog posts "
>     db.blog_posts.title.represent = lambda _: 'replace title'
>     db.blog_posts.id.represent = lambda _: 'replace id'
>     posts = crud.select(
>         db.blog_posts,
>         fields=['blog_posts.id', 'blog_posts.title'])   # !!! field
> names prefixed by tablename
>     return dict(posts=posts)
>
> index1() doesn't change the representation at all. With index2() only
> the title's representation is changed.
> In both cases the id column displays the numeric id - However! with
> index2() the id is a link whereas with index1() it is not.
>
> I had the same problem a while back when crud.create still had a
> 'columns' parameter according to the w2p book (was it renamed to
> 'fields' recently?) but got it to work when I prefixed the field names
> by the table name as I did here in index2().
>
> Regards,
> HC


[web2py] Alternative Auth Fields (not additional ones)?

2010-12-16 Thread Greg
Hello,

When my users register I won't have any need for them to enter First
name or Last name. I really only need username, email address and
password. I can change the label for first_name to 'Username', but
they are still required to enter something in the Last Name field.
I've tried setting last_name.readable, writeable, and required to
False, but it still requires the field.

I realize they are largely hard-coded, but is there any way around the
built-in auth table requirements without breaking things?

Thanks,

greg


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: Anthony
> Sent: 12/17/10 04:22 AM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...

> So, at least one advantage of BSD is it doesn't require all this
> "clearing up". ;)

How nice...


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Anthony
On Dec 16, 9:45 pm, "Branko Vukelic"  wrote:
> > I guess it seems odd to say if you build an app using the entire
> > web2py framework, then you can close source your app, but if you build
>
> Entire _unmodified_ web2py framework.

Well, it's not clear that your app can be closed sourced only when
using the unmodified framework. The exception simply states, "You can
distribute web2py app under any license you like as long they do not
contain web2py code." The problem is, "web2py app" is not well-
defined. I assume that even if you modify the framework, your app is
still a "web2py app" and therefore not subject to the license. Though
it may depend on the nature of the modification (e.g., tweaking the
web2py code vs. swapping out some components, such as the DAL vs.
using only some components, such as the DAL). I think this really
needs to be cleared up.

> > your app using only part of the web2py framework, you must share your
> > app. For example, suppose someone plugs the DAL into Flask and builds
>
> Ideally yes. But there's one catch. The keyword is _distribute_ not _build_. 
> I hope it
> clears things up a bit. Someone has also cleverly noted tha if you build your 
> app for
> your client using whatever GPL tools you stumbled upon, you are only required 
> to share
> the source code with the client because you're distributing it to your client 
> only. You
> don't actually have to put it some place where everyone can see. That's 
> allowed. So,
> it's not like you have to share it with the rest of the world.

So, at least one advantage of BSD is it doesn't require all this
"clearing up". ;)

As evidenced by this discussion, even some long-time users and
contributors aren't quite sure exactly what the web2py license allows
(e.g., [1]). That's not a good sign.

[1] http://groups.google.com/group/web2py-developers/msg/3cbb6720dadadd83


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: Anthony
> Sent: 12/17/10 03:33 AM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...

> I guess it seems odd to say if you build an app using the entire
> web2py framework, then you can close source your app, but if you build

Entire _unmodified_ web2py framework. Also, it's not 'build', but 'distribute'. 
Big difference. If you are not sharing it with anyone, you can do whatever you 
want.

> your app using only part of the web2py framework, you must share your
> app. For example, suppose someone plugs the DAL into Flask and builds

Ideally yes. But there's one catch. The keyword is _distribute_ not _build_. I 
hope it clears things up a bit. Someone has also cleverly noted tha if you 
build your app for your client using whatever GPL tools you stumbled upon, you 
are only required to share the source code with the client because you're 
distributing it to your client only. You don't actually have to put it some 
place where everyone can see. That's allowed. So, it's not like you have to 
share it with the rest of the world.

In case of web2py as a whole, with GPLv2 + commercial exception, you don't even 
have to do that, unless you've modified web2py somehow, or used pieces of it in 
your application code (where 'pieces of it' excludes the welcome app).



--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Bruno Rocha
I made this example (for teaching)
https://bitbucket.org/rochacbruno/dal_on_flask/src

I've been pointed to include this line:

#  NOTE: web2py is licensed under GPL2 and Flask is licensed under
BSD#  So, any derivative using both ['Flask','DAL'] should be GPL (not
BSD)


*https://bitbucket.org/rochacbruno/dal_on_flask/src/3131e4d261ea/dalFlask.py*


2010/12/17 Anthony 

> On Dec 16, 8:47 pm, "Branko Vukelic"  wrote:
> > > Now that there's a truly standalone DAL, what if someone wants to use
> > > that in an application? What about some of the other contrib modules,
> > > like markmin?
> >
> > This is a question only Massimo can give a qualified answer to. The
> following is merely
> > my opinion:
> >
> > Yes, they should share the code. They wouldn't be _required_ (if you ask
> me), but they
> > should. If they modify it in any way, or source the code from it, they
> should share both
> > DAL _and_ their app.
>
> I guess it seems odd to say if you build an app using the entire
> web2py framework, then you can close source your app, but if you build
> your app using only part of the web2py framework, you must share your
> app. For example, suppose someone plugs the DAL into Flask and builds
> an app, should they be required to make the app itself (not the DAL
> part of it) open source? Doesn't seem consistent with the logic of the
> general exception for applications.




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


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

2010-12-16 Thread Anthony
On Dec 16, 8:47 pm, "Branko Vukelic"  wrote:
> > Now that there's a truly standalone DAL, what if someone wants to use
> > that in an application? What about some of the other contrib modules,
> > like markmin?
>
> This is a question only Massimo can give a qualified answer to. The following 
> is merely
> my opinion:
>
> Yes, they should share the code. They wouldn't be _required_ (if you ask me), 
> but they
> should. If they modify it in any way, or source the code from it, they should 
> share both
> DAL _and_ their app.

I guess it seems odd to say if you build an app using the entire
web2py framework, then you can close source your app, but if you build
your app using only part of the web2py framework, you must share your
app. For example, suppose someone plugs the DAL into Flask and builds
an app, should they be required to make the app itself (not the DAL
part of it) open source? Doesn't seem consistent with the logic of the
general exception for applications.


Re: [web2py] Rounding time

2010-12-16 Thread Jonathan Lundell
On Dec 16, 2010, at 5:10 PM, Lorin Rivers wrote:
> 
> I have  a function that I use to round time increments. I just realized it 
> fails when the time rolls over the 24 hour period.
> 
> I also found myself needing to make a second version for rounding to hours. 
> Anyone care to take a stab at fixing it to handle the rollover AND hours?
> 
> def round_off(mins, secs, to_nearest=1):
>div_result, remainder = divmod(mins, to_nearest)
> 
>if remainder < 7:   
>return to_nearest * div_result
>elif remainder > 7:
>return to_nearest * (div_result + 1)
>else:#remainder == 7 
>if secs < 30:
>return to_nearest * div_result
>else:
>return to_nearest * (div_result + 1)
> 
> If the the time is 2010, 12, 16, 23, 54 and the to_nearest is 5 (round to 
> nearest 5 minutes), it works. 
> If the time is 2010, 12, 16, 23, 55
> 
> it errors with the message "minutes must be 0..59"
> 
> I use it like this:
> finishtime = lasttime.replace(minute=round_off(lasttime.minute, 
> lasttime.second, to_nearest=5), second=0)
> 
> I'm too tired & ignorant to figure it out.


It's just trying (correctly) to overflow into the hour. Notice that at the 
right time, it can overflow all the way to the year. And if you're rounding 
local time at the boundary of standard/daylight time, it's even tricker.

The easiest way to do something like this is to convert the date-time to 
seconds since the epoch, round it there, and then convert back to 
year-month-etc.

[web2py] Requires login decorator error

2010-12-16 Thread NuclearDragon
I was getting an error when attempting to go to a page that requires
you be logged in, if I was not logged in.
Traceback:

Traceback (most recent call last):
  File "/xxx/app/gluon/restricted.py", line 188, in restricted
exec ccode in environment
  File "/xxx/app/applications/init/controllers/x.py", line 2712,
in 
  File "/xxx/app/gluon/globals.py", line 96, in 
self._caller = lambda f: f()
  File "/xxx/app/gluon/tools.py", line 2271, in f
'?_next='+urllib.quote(next)
  File "/xxx/app/gluon/tools.py", line 65, in call_or_redirect
redirect(f)
  File "/xxx/app/gluon/http.py", line 101, in redirect
location = location.replace('\r', '%0D').replace('\n', '%0A')
AttributeError: 'NoneType' object has no attribute 'replace'


So I changed:
 return call_or_redirect(self.settings.on_failed_authentication,
self.settings.login_url +
\
'?
_next='+urllib.quote(next)
)
to:
if self.settings.on_failed_authentication:
return
call_or_redirect(self.settings.on_failed_authentication,
self.settings.login_url +
\
'?
_next='+urllib.quote(next)
)
else:
return
call_or_redirect(self.settings.login_url + \
'?
_next='+urllib.quote(next)
   )


Does anyone have any thoughts as to why that was happening? A print
statement of self.settings.on_failed_authentication at that point
displays None, which affects the workings of the call_or_redirect
function.


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: Anthony
> Sent: 12/17/10 02:30 AM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...
> 
> On Dec 16, 6:14 pm, "Branko Vukelic"  wrote:
> > Reading the full text of the Apache license, I think dual-licensing web2py 
> > under GPLv2
> > and Apache License 2.0 would solve all of the problems except 1: reuse of 
> > web2py
> > components and libraries for building closed-source software. For me, 
> > personally, that
> > would not be fair game. If you are taking apart web2py and building 
> > something useful,
> > you should share.
> 
> Now that there's a truly standalone DAL, what if someone wants to use
> that in an application? What about some of the other contrib modules,
> like markmin?

This is a question only Massimo can give a qualified answer to. The following 
is merely my opinion:

Yes, they should share the code. They wouldn't be _required_ (if you ask me), 
but they should. If they modify it in any way, or source the code from it, they 
should share both DAL _and_ their app.


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Anthony
On Dec 16, 6:14 pm, "Branko Vukelic"  wrote:
> Reading the full text of the Apache license, I think dual-licensing web2py 
> under GPLv2
> and Apache License 2.0 would solve all of the problems except 1: reuse of 
> web2py
> components and libraries for building closed-source software. For me, 
> personally, that
> would not be fair game. If you are taking apart web2py and building something 
> useful,
> you should share.

Now that there's a truly standalone DAL, what if someone wants to use
that in an application? What about some of the other contrib modules,
like markmin?


Re: [web2py] delicious is closing

2010-12-16 Thread Albert Abril
I'm importing from delicious.
I had created and account right now.
Actually seems good!

Thanks Bruno!

On Fri, Dec 17, 2010 at 2:11 AM, Branko Vukelic wrote:

> Hah, cool. It can import delicious bookmarks! Bruno, you saved the day! :D
>
> > - Original Message -
> > From: Bruno Rocha
> > Sent: 12/17/10 01:44 AM
> > To: web2py@googlegroups.com
> > Subject: Re: [web2py] delicious is closing
> >
> > What would happen if OUND & Delicious had a baby: Zootool«
> >
> > 2010/12/16 Bruno Rocha 
> >
> > > Zoo Tool has tags, friends and plugins for firefox and chrome. it also
> can
> > > tag individual images, videos, audio etc from web. I really like it.
> > >
> > > 2010/12/16 Branko Vukelic 
> > >
> > >> Let's not forget the awesome AND supported firefox plugin. <3
> > >>
> > >> > - Original Message -
> > >> > From: Albert Abril
> > >> > Sent: 12/17/10 12:52 AM
> > >> > To: web2py@googlegroups.com
> > >> > Subject: Re: [web2py] delicious is closing
> > >> >
> > >> > tags, public/private , friends, and usability (bookmarklet, nice
> ui).
> > >> >
> > >> > this *was* the success of delicious IMHO.
> > >> >
> > >> > On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic <
> > >> branko.vuke...@gmx.com>wrote:
> > >> >
> > >> > > Does it do tagging? I really liked the way delicious bmarks can be
> > >> tagged
> > >> > > and all...
> > >> > >
> > >> > > > - Original Message -
> > >> > > > From: Bruno Rocha
> > >> > > > Sent: 12/17/10 12:43 AM
> > >> > > > To: web2py@googlegroups.com
> > >> > > > Subject: Re: [web2py] delicious is closing
> > >> > > >
> > >> > > > I always prefer to use zootool for bookmarking
> > >> > > > http://zootool.com/user/rochacbruno/
> > >> > > >
> > >> > > > 2010/12/16 Branko Vukelic 
> > >> > > >
> > >> > > > > Damn! I have a shitload of bookmarks there... :(
> > >> > > > >
> > >> > > > > Anyway, yeah, go for it! You can advertise as "The next
> > >> Delicious"
> > >> > > > >
> > >> > > > > > - Original Message -
> > >> > > > > > From: Albert Abril
> > >> > > > > > Sent: 12/17/10 12:22 AM
> > >> > > > > > To: web2py@googlegroups.com
> > >> > > > > > Subject: [web2py] delicious is closing
> > >> > > > > >
> > >> > > > > > I'm using delicious from long time ago.
> > >> > > > > > Today I read that yahoo will close delicious soon.
> > >> > > > > > It's time to migrate to my own bookmark app, question is..
> > >> there's a
> > >> > > > > > bookmark application wrote in web2py, should I start one? :D
> > >> > > > > >
> > >> > > > > > Kind regards!
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > --
> > >> > > > > > Albert Abril,
> > >> > > > > > @desmondo
> > >> > > > > > http://bressol.org
> > >> > > > >
> > >> > > > >
> > >> > > > > --
> > >> > > > > Branko Vukelic
> > >> > > > >
> > >> > > > > branko.vuke...@gmx.com
> > >> > > > >
> > >> > > > > http://www.brankovukelic.com/
> > >> > > > > http://flickr.com/photos/foxbunny
> > >> > > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > --
> > >> > > >
> > >> > > > Bruno Rocha
> > >> > > > http://about.me/rochacbruno/bio
> > >> > >
> > >> > >
> > >> > > --
> > >> > > Branko Vukelic
> > >> > >
> > >> > > branko.vuke...@gmx.com
> > >> > >
> > >> > > http://www.brankovukelic.com/
> > >> > > http://flickr.com/photos/foxbunny
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Albert Abril,
> > >> > @desmondo
> > >> > http://bressol.org
> > >>
> > >>
> > >> --
> > >> Branko Vukelic
> > >>
> > >> branko.vuke...@gmx.com
> > >>
> > >> http://www.brankovukelic.com/
> > >> http://flickr.com/photos/foxbunny
> > >>
> > >
> > >
> > >
> > > --
> > >
> > > Bruno Rocha
> > > http://about.me/rochacbruno/bio
> > >
> >
> >
> >
> > --
> >
> > Bruno Rocha
> > http://about.me/rochacbruno/bio
>
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/
> http://flickr.com/photos/foxbunny
>



-- 
Albert Abril,
@desmondo
http://bressol.org


Re: [web2py] delicious is closing

2010-12-16 Thread Branko Vukelic
Hah, cool. It can import delicious bookmarks! Bruno, you saved the day! :D

> - Original Message -
> From: Bruno Rocha
> Sent: 12/17/10 01:44 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] delicious is closing
> 
> What would happen if OUND & Delicious had a baby: Zootool«
> 
> 2010/12/16 Bruno Rocha 
> 
> > Zoo Tool has tags, friends and plugins for firefox and chrome. it also can
> > tag individual images, videos, audio etc from web. I really like it.
> >
> > 2010/12/16 Branko Vukelic 
> >
> >> Let's not forget the awesome AND supported firefox plugin. <3
> >>
> >> > - Original Message -
> >> > From: Albert Abril
> >> > Sent: 12/17/10 12:52 AM
> >> > To: web2py@googlegroups.com
> >> > Subject: Re: [web2py] delicious is closing
> >> >
> >> > tags, public/private , friends, and usability (bookmarklet, nice ui).
> >> >
> >> > this *was* the success of delicious IMHO.
> >> >
> >> > On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic <
> >> branko.vuke...@gmx.com>wrote:
> >> >
> >> > > Does it do tagging? I really liked the way delicious bmarks can be
> >> tagged
> >> > > and all...
> >> > >
> >> > > > - Original Message -
> >> > > > From: Bruno Rocha
> >> > > > Sent: 12/17/10 12:43 AM
> >> > > > To: web2py@googlegroups.com
> >> > > > Subject: Re: [web2py] delicious is closing
> >> > > >
> >> > > > I always prefer to use zootool for bookmarking
> >> > > > http://zootool.com/user/rochacbruno/
> >> > > >
> >> > > > 2010/12/16 Branko Vukelic 
> >> > > >
> >> > > > > Damn! I have a shitload of bookmarks there... :(
> >> > > > >
> >> > > > > Anyway, yeah, go for it! You can advertise as "The next
> >> Delicious"
> >> > > > >
> >> > > > > > - Original Message -
> >> > > > > > From: Albert Abril
> >> > > > > > Sent: 12/17/10 12:22 AM
> >> > > > > > To: web2py@googlegroups.com
> >> > > > > > Subject: [web2py] delicious is closing
> >> > > > > >
> >> > > > > > I'm using delicious from long time ago.
> >> > > > > > Today I read that yahoo will close delicious soon.
> >> > > > > > It's time to migrate to my own bookmark app, question is..
> >> there's a
> >> > > > > > bookmark application wrote in web2py, should I start one? :D
> >> > > > > >
> >> > > > > > Kind regards!
> >> > > > > >
> >> > > > > >
> >> > > > > > --
> >> > > > > > Albert Abril,
> >> > > > > > @desmondo
> >> > > > > > http://bressol.org
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > Branko Vukelic
> >> > > > >
> >> > > > > branko.vuke...@gmx.com
> >> > > > >
> >> > > > > http://www.brankovukelic.com/
> >> > > > > http://flickr.com/photos/foxbunny
> >> > > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > >
> >> > > > Bruno Rocha
> >> > > > http://about.me/rochacbruno/bio
> >> > >
> >> > >
> >> > > --
> >> > > Branko Vukelic
> >> > >
> >> > > branko.vuke...@gmx.com
> >> > >
> >> > > http://www.brankovukelic.com/
> >> > > http://flickr.com/photos/foxbunny
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Albert Abril,
> >> > @desmondo
> >> > http://bressol.org
> >>
> >>
> >> --
> >> Branko Vukelic
> >>
> >> branko.vuke...@gmx.com
> >>
> >> http://www.brankovukelic.com/
> >> http://flickr.com/photos/foxbunny
> >>
> >
> >
> >
> > --
> >
> > Bruno Rocha
> > http://about.me/rochacbruno/bio
> >
> 
> 
> 
> -- 
> 
> Bruno Rocha
> http://about.me/rochacbruno/bio


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


[web2py] Rounding time

2010-12-16 Thread Lorin Rivers
I have  a function that I use to round time increments. I just realized it 
fails when the time rolls over the 24 hour period.

I also found myself needing to make a second version for rounding to hours. 
Anyone care to take a stab at fixing it to handle the rollover AND hours?

def round_off(mins, secs, to_nearest=1):
div_result, remainder = divmod(mins, to_nearest)

if remainder < 7:   
return to_nearest * div_result
elif remainder > 7:
return to_nearest * (div_result + 1)
else:#remainder == 7 
if secs < 30:
return to_nearest * div_result
else:
return to_nearest * (div_result + 1)

If the the time is 2010, 12, 16, 23, 54 and the to_nearest is 5 (round to 
nearest 5 minutes), it works. 
If the time is 2010, 12, 16, 23, 55

it errors with the message "minutes must be 0..59"

I use it like this:
finishtime = lasttime.replace(minute=round_off(lasttime.minute, 
lasttime.second, to_nearest=5), second=0)

I'm too tired & ignorant to figure it out.

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing 

512/203.3198 (m)




Re: [web2py] logging.conf for debugging

2010-12-16 Thread Jonathan Lundell
On Dec 16, 2010, at 5:01 PM, Lorin Rivers wrote:
> 
> [loggers]
> keys=root,rocket,markdown,web2py,rewrite,app,welcome,cron
> 
> # the default configuration is console-based (stdout) for backward 
> compatibility
> #
> # note that file-based handlers are thread-safe but not mp-safe;
> # for mp-safe logging, configure the appropriate syslog handler
> 
> [handlers]
> #keys=consoleHandler
> keys=consoleHandler,rotatingFileHandler
> #keys=osxSysLogHandler
> 
> [formatters]
> keys=simpleFormatter
> 
> [logger_root]
> level=INFO
> handlers=consoleHandler
> 
> [logger_web2py]
> level=INFO
> handlers=consoleHandler
> qualname=web2py
> propagate=0

I believe that it's not enough to change the keys= line; you also have to 
change the handlers= lines; notice that they're all just saying consoleHandler.

logging.conf is not a very friendly file format. I understand that some newer 
Python versions (maybe just in the recent 3.x releases; I don't recall) support 
better logging configuration syntax.

Re: [web2py] logging.conf for debugging

2010-12-16 Thread Lorin Rivers
[loggers]
keys=root,rocket,markdown,web2py,rewrite,app,welcome,cron

# the default configuration is console-based (stdout) for backward compatibility
#
# note that file-based handlers are thread-safe but not mp-safe;
# for mp-safe logging, configure the appropriate syslog handler

[handlers]
#keys=consoleHandler
keys=consoleHandler,rotatingFileHandler
#keys=osxSysLogHandler

[formatters]
keys=simpleFormatter

[logger_root]
level=INFO
handlers=consoleHandler

[logger_web2py]
level=INFO
handlers=consoleHandler
qualname=web2py
propagate=0

[logger_cron]
level=INFO
handlers=consoleHandler
qualname=web2py.cron
propagate=0

[logger_rewrite]
level=INFO
qualname=web2py.rewrite
handlers=consoleHandler
propagate=0

# generic app handler
[logger_app]
level=INFO
qualname=web2py.app
handlers=consoleHandler
propagate=0

# welcome app handler
[logger_welcome]
level=WARNING
qualname=web2py.app.welcome
handlers=consoleHandler
propagate=0

# loggers for legacy getLogger calls: Rocket and markdown
[logger_rocket]
level=INFO
handlers=consoleHandler
qualname=Rocket
propagate=0

[logger_markdown]
level=WARNING
handlers=consoleHandler
qualname=markdown
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=INFO
formatter=simpleFormatter
args=(sys.stdout,)

# Rotating file handler
#   mkdir logs in the web2py base directory if not already present
#   args: (filename[, mode[, maxBytes[, backupCount[, encoding[, delay])
#
[handler_rotatingFileHandler]
class=handlers.RotatingFileHandler
level=INFO
formatter=simpleFormatter
args=("logs/web2py.log", "a", 100, 5)

[handler_osxSysLogHandler]
class=handlers.SysLogHandler
level=INFO
formatter=simpleFormatter
args=("/var/run/syslog", handlers.SysLogHandler.LOG_DAEMON)

[handler_linuxSysLogHandler]
class=handlers.SysLogHandler
level=INFO
formatter=simpleFormatter
args=("/dev/log", handlers.SysLogHandler.LOG_DAEMON)

[handler_remoteSysLogHandler]
class=handlers.SysLogHandler
level=INFO
formatter=simpleFormatter
args=(('sysloghost.domain.com', handlers.SYSLOG_UDP_PORT), 
handlers.SysLogHandler.LOG_DAEMON)

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=

On Dec 16, 2010, at 16:47 , Jonathan Lundell wrote:

> On Dec 16, 2010, at 11:00 AM, Lorin Rivers wrote:
>> 
>> I have logging writing to the console, but not to the log file.
>> 
>> Starting with the example, I changed WARNING to DEBUG (everywhere--as
>> soon as I get it working, I'll be more selective), I set [keys] to
>> keys=consoleHandler,rotatingFileHandler.
>> 
>> logs/web2py.log gets created on startup, but never gets any data
>> written to it, despite the copious log events in the console.
>> 
>> What am I missing?
> 
> Please post your logging.conf.

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing 

512/203.3198 (m)




Re: [web2py] delicious is closing

2010-12-16 Thread Branko Vukelic
I'm sold! Thanks for the tip, btw. :)

> - Original Message -
> From: Bruno Rocha
> Sent: 12/17/10 01:37 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] delicious is closing
> 
> Zoo Tool has tags, friends and plugins for firefox and chrome. it also can
> tag individual images, videos, audio etc from web. I really like it.
> 
> 2010/12/16 Branko Vukelic 
> 
> > Let's not forget the awesome AND supported firefox plugin. <3
> >
> > > - Original Message -
> > > From: Albert Abril
> > > Sent: 12/17/10 12:52 AM
> > > To: web2py@googlegroups.com
> > > Subject: Re: [web2py] delicious is closing
> > >
> > > tags, public/private , friends, and usability (bookmarklet, nice ui).
> > >
> > > this *was* the success of delicious IMHO.
> > >
> > > On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic  > >wrote:
> > >
> > > > Does it do tagging? I really liked the way delicious bmarks can be
> > tagged
> > > > and all...
> > > >
> > > > > - Original Message -
> > > > > From: Bruno Rocha
> > > > > Sent: 12/17/10 12:43 AM
> > > > > To: web2py@googlegroups.com
> > > > > Subject: Re: [web2py] delicious is closing
> > > > >
> > > > > I always prefer to use zootool for bookmarking
> > > > > http://zootool.com/user/rochacbruno/
> > > > >
> > > > > 2010/12/16 Branko Vukelic 
> > > > >
> > > > > > Damn! I have a shitload of bookmarks there... :(
> > > > > >
> > > > > > Anyway, yeah, go for it! You can advertise as "The next
> > Delicious"
> > > > > >
> > > > > > > - Original Message -
> > > > > > > From: Albert Abril
> > > > > > > Sent: 12/17/10 12:22 AM
> > > > > > > To: web2py@googlegroups.com
> > > > > > > Subject: [web2py] delicious is closing
> > > > > > >
> > > > > > > I'm using delicious from long time ago.
> > > > > > > Today I read that yahoo will close delicious soon.
> > > > > > > It's time to migrate to my own bookmark app, question is..
> > there's a
> > > > > > > bookmark application wrote in web2py, should I start one? :D
> > > > > > >
> > > > > > > Kind regards!
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Albert Abril,
> > > > > > > @desmondo
> > > > > > > http://bressol.org
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Branko Vukelic
> > > > > >
> > > > > > branko.vuke...@gmx.com
> > > > > >
> > > > > > http://www.brankovukelic.com/
> > > > > > http://flickr.com/photos/foxbunny
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Bruno Rocha
> > > > > http://about.me/rochacbruno/bio
> > > >
> > > >
> > > > --
> > > > Branko Vukelic
> > > >
> > > > branko.vuke...@gmx.com
> > > >
> > > > http://www.brankovukelic.com/
> > > > http://flickr.com/photos/foxbunny
> > > >
> > >
> > >
> > >
> > > --
> > > Albert Abril,
> > > @desmondo
> > > http://bressol.org
> >
> >
> > --
> > Branko Vukelic
> >
> > branko.vuke...@gmx.com
> >
> > http://www.brankovukelic.com/
> > http://flickr.com/photos/foxbunny
> >
> 
> 
> 
> -- 
> 
> Bruno Rocha
> http://about.me/rochacbruno/bio


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: pbreit
> Sent: 12/17/10 01:40 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] Re: it case you missed it...
> 
> Fair enough, I respect that. Massimo has done a wonderful job of adding 
> really good features while keeping web2py lean. As it gets more popular is 
> there a concern that more people will lean on Massimo to add bloat? That 
> would definitely be unfortunate.

At that point, I'd just conclude it's become too popular for its own good. But 
I doubt Massimo would just add in any kind of crap that flies in.

--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


Re: [web2py] delicious is closing

2010-12-16 Thread Bruno Rocha
What would happen if OUND & Delicious had a baby: Zootool«

2010/12/16 Bruno Rocha 

> Zoo Tool has tags, friends and plugins for firefox and chrome. it also can
> tag individual images, videos, audio etc from web. I really like it.
>
> 2010/12/16 Branko Vukelic 
>
>> Let's not forget the awesome AND supported firefox plugin. <3
>>
>> > - Original Message -
>> > From: Albert Abril
>> > Sent: 12/17/10 12:52 AM
>> > To: web2py@googlegroups.com
>> > Subject: Re: [web2py] delicious is closing
>> >
>> > tags, public/private , friends, and usability (bookmarklet, nice ui).
>> >
>> > this *was* the success of delicious IMHO.
>> >
>> > On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic <
>> branko.vuke...@gmx.com>wrote:
>> >
>> > > Does it do tagging? I really liked the way delicious bmarks can be
>> tagged
>> > > and all...
>> > >
>> > > > - Original Message -
>> > > > From: Bruno Rocha
>> > > > Sent: 12/17/10 12:43 AM
>> > > > To: web2py@googlegroups.com
>> > > > Subject: Re: [web2py] delicious is closing
>> > > >
>> > > > I always prefer to use zootool for bookmarking
>> > > > http://zootool.com/user/rochacbruno/
>> > > >
>> > > > 2010/12/16 Branko Vukelic 
>> > > >
>> > > > > Damn! I have a shitload of bookmarks there... :(
>> > > > >
>> > > > > Anyway, yeah, go for it! You can advertise as "The next
>> Delicious"
>> > > > >
>> > > > > > - Original Message -
>> > > > > > From: Albert Abril
>> > > > > > Sent: 12/17/10 12:22 AM
>> > > > > > To: web2py@googlegroups.com
>> > > > > > Subject: [web2py] delicious is closing
>> > > > > >
>> > > > > > I'm using delicious from long time ago.
>> > > > > > Today I read that yahoo will close delicious soon.
>> > > > > > It's time to migrate to my own bookmark app, question is..
>> there's a
>> > > > > > bookmark application wrote in web2py, should I start one? :D
>> > > > > >
>> > > > > > Kind regards!
>> > > > > >
>> > > > > >
>> > > > > > --
>> > > > > > Albert Abril,
>> > > > > > @desmondo
>> > > > > > http://bressol.org
>> > > > >
>> > > > >
>> > > > > --
>> > > > > Branko Vukelic
>> > > > >
>> > > > > branko.vuke...@gmx.com
>> > > > >
>> > > > > http://www.brankovukelic.com/
>> > > > > http://flickr.com/photos/foxbunny
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > >
>> > > > Bruno Rocha
>> > > > http://about.me/rochacbruno/bio
>> > >
>> > >
>> > > --
>> > > Branko Vukelic
>> > >
>> > > branko.vuke...@gmx.com
>> > >
>> > > http://www.brankovukelic.com/
>> > > http://flickr.com/photos/foxbunny
>> > >
>> >
>> >
>> >
>> > --
>> > Albert Abril,
>> > @desmondo
>> > http://bressol.org
>>
>>
>> --
>> Branko Vukelic
>>
>> branko.vuke...@gmx.com
>>
>> http://www.brankovukelic.com/
>> http://flickr.com/photos/foxbunny
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio


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

2010-12-16 Thread pbreit
Fair enough, I respect that. Massimo has done a wonderful job of adding 
really good features while keeping web2py lean. As it gets more popular is 
there a concern that more people will lean on Massimo to add bloat? That 
would definitely be unfortunate.

[web2py] Re: Web2py Application Exhibition ( Final Day! )

2010-12-16 Thread Anthony
Yes, works for me now. :)

On Dec 16, 5:33 pm, Bruno Rocha  wrote:
> Problem solved! ->http://powertable.blouweb.com/category
>
> 2010/12/16 Bruno Rocha 
>
>
>
>
>
> > i just found that I.E 6.7.8 breaks if nested table has more than 5 rows. (I
> > dont know why)
> > I am going to datatables forum to discover it.
>
> > 2010/12/16 Bruno Rocha 
>
> >> Anthony, can you test if it works in I.E 8 ->
> >>http://www.datatables.net/examples/server_side/row_details.html
>
> >> Thanks
>
> >> --
>
> >> Bruno Rocha
> >>http://about.me/rochacbruno/bio
>
> > --
>
> > Bruno Rocha
> >http://about.me/rochacbruno/bio
>
> --
>
> Bruno Rochahttp://about.me/rochacbruno/bio- Hide quoted text -
>
> - Show quoted text -


Re: [web2py] delicious is closing

2010-12-16 Thread Bruno Rocha
Zoo Tool has tags, friends and plugins for firefox and chrome. it also can
tag individual images, videos, audio etc from web. I really like it.

2010/12/16 Branko Vukelic 

> Let's not forget the awesome AND supported firefox plugin. <3
>
> > - Original Message -
> > From: Albert Abril
> > Sent: 12/17/10 12:52 AM
> > To: web2py@googlegroups.com
> > Subject: Re: [web2py] delicious is closing
> >
> > tags, public/private , friends, and usability (bookmarklet, nice ui).
> >
> > this *was* the success of delicious IMHO.
> >
> > On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic  >wrote:
> >
> > > Does it do tagging? I really liked the way delicious bmarks can be
> tagged
> > > and all...
> > >
> > > > - Original Message -
> > > > From: Bruno Rocha
> > > > Sent: 12/17/10 12:43 AM
> > > > To: web2py@googlegroups.com
> > > > Subject: Re: [web2py] delicious is closing
> > > >
> > > > I always prefer to use zootool for bookmarking
> > > > http://zootool.com/user/rochacbruno/
> > > >
> > > > 2010/12/16 Branko Vukelic 
> > > >
> > > > > Damn! I have a shitload of bookmarks there... :(
> > > > >
> > > > > Anyway, yeah, go for it! You can advertise as "The next
> Delicious"
> > > > >
> > > > > > - Original Message -
> > > > > > From: Albert Abril
> > > > > > Sent: 12/17/10 12:22 AM
> > > > > > To: web2py@googlegroups.com
> > > > > > Subject: [web2py] delicious is closing
> > > > > >
> > > > > > I'm using delicious from long time ago.
> > > > > > Today I read that yahoo will close delicious soon.
> > > > > > It's time to migrate to my own bookmark app, question is..
> there's a
> > > > > > bookmark application wrote in web2py, should I start one? :D
> > > > > >
> > > > > > Kind regards!
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Albert Abril,
> > > > > > @desmondo
> > > > > > http://bressol.org
> > > > >
> > > > >
> > > > > --
> > > > > Branko Vukelic
> > > > >
> > > > > branko.vuke...@gmx.com
> > > > >
> > > > > http://www.brankovukelic.com/
> > > > > http://flickr.com/photos/foxbunny
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Bruno Rocha
> > > > http://about.me/rochacbruno/bio
> > >
> > >
> > > --
> > > Branko Vukelic
> > >
> > > branko.vuke...@gmx.com
> > >
> > > http://www.brankovukelic.com/
> > > http://flickr.com/photos/foxbunny
> > >
> >
> >
> >
> > --
> > Albert Abril,
> > @desmondo
> > http://bressol.org
>
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/
> http://flickr.com/photos/foxbunny
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] delicious is closing

2010-12-16 Thread Branko Vukelic
Let's not forget the awesome AND supported firefox plugin. <3

> - Original Message -
> From: Albert Abril
> Sent: 12/17/10 12:52 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] delicious is closing
> 
> tags, public/private , friends, and usability (bookmarklet, nice ui).
> 
> this *was* the success of delicious IMHO.
> 
> On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic 
> wrote:
> 
> > Does it do tagging? I really liked the way delicious bmarks can be tagged
> > and all...
> >
> > > - Original Message -
> > > From: Bruno Rocha
> > > Sent: 12/17/10 12:43 AM
> > > To: web2py@googlegroups.com
> > > Subject: Re: [web2py] delicious is closing
> > >
> > > I always prefer to use zootool for bookmarking
> > > http://zootool.com/user/rochacbruno/
> > >
> > > 2010/12/16 Branko Vukelic 
> > >
> > > > Damn! I have a shitload of bookmarks there... :(
> > > >
> > > > Anyway, yeah, go for it! You can advertise as "The next Delicious"
> > > >
> > > > > - Original Message -
> > > > > From: Albert Abril
> > > > > Sent: 12/17/10 12:22 AM
> > > > > To: web2py@googlegroups.com
> > > > > Subject: [web2py] delicious is closing
> > > > >
> > > > > I'm using delicious from long time ago.
> > > > > Today I read that yahoo will close delicious soon.
> > > > > It's time to migrate to my own bookmark app, question is.. there's a
> > > > > bookmark application wrote in web2py, should I start one? :D
> > > > >
> > > > > Kind regards!
> > > > >
> > > > >
> > > > > --
> > > > > Albert Abril,
> > > > > @desmondo
> > > > > http://bressol.org
> > > >
> > > >
> > > > --
> > > > Branko Vukelic
> > > >
> > > > branko.vuke...@gmx.com
> > > >
> > > > http://www.brankovukelic.com/
> > > > http://flickr.com/photos/foxbunny
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Bruno Rocha
> > > http://about.me/rochacbruno/bio
> >
> >
> > --
> > Branko Vukelic
> >
> > branko.vuke...@gmx.com
> >
> > http://www.brankovukelic.com/
> > http://flickr.com/photos/foxbunny
> >
> 
> 
> 
> -- 
> Albert Abril,
> @desmondo
> http://bressol.org


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: pbreit
> Sent: 12/17/10 12:52 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] Re: it case you missed it...
> 
> branko, I'm curious why permissive licensing is a problem for you. is it a 
> philosophical thing? what's the downside? wouldn't it be cool if your code 
> was widely used? cake, django & rails are permissively licensed (as are most 
> frameworks) and it doesn't seem to be a problem. people still seem excited 
> to develop for those platforms.

Yes, it's a philosophical thing. I have participated in open-source projects 
before, always feeling inferior for not being able to code like a pro (since 
I'm a designer). I still managed to find a way to contribute (editing Wikis, 
contributing artwork, etc). Then I started programming (Ruby and Python), and I 
came to learn how great it is for developers to be able to share code freely.

Even though FSF was established just a few years after I was born, I learned 
about the history of the movement that kicked it off, because I respected and 
loved the kind of spirit I was discovering. And I believe that if it weren't 
for FSF and their stubborn insistence on free software, there would be no 
open-source the kind we know today. Today, people are starting to take it all 
for granted and say shit like BSD is better than GPL, etc, and FSF hardliners 
scares them. Why? Just to win the popularity award? But think about it: if it 
weren't for those hardliners, BSD would be worth precisly bollocks, too.

The only point where I possibly differ from FSF is that there should be a 
difference between normal usage (usage as intended including 
sharing/distribution) and modification. Modification should result in new free 
software, distribution should result merely in notification that the base 
software is free software. Free software should never become closed, that's my 
bottom line.

That fact that a bunch of people like something says precisely fuckall. Just 
count how many people get off using Windows. Does that tell you something about 
how great Windows is? I hope not. That's hardly a valid point. 

On the frameworks side, look at Django. So many bug-fix releases lately. And 
their TRUNK used to be awesome. Now you can't even trust the releases. And it's 
growing fatter by day, and loose coupling song is starting to get a different 
tune. At one time I wrote permanent redirection middleware for both Django and 
web.py. What took me a day to write on web.py took me a week on Django, and it 
was never as simple as I liked it to be, the main reason being that it involved 
at least 3 core components and the (then) nasty polymorphism framework called 
content type or something like that. Soon it'll be too bloated to support its 
own weight, and people will start looking for lightweight frameworks like 
werkzeug and node.js. But that has nothing to do with BSD. It's the price of 
having too many hands involved in the process without an adequate system to 
ensure quality.



--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


[web2py] Re: DAL select cache, and update

2010-12-16 Thread mdipierro
The problem is how to determine which selects are affected by which
update. That is a knowledge that is in database, not in cache. We can
have an option of update that removes ALL select caches for each
update but that you can already do now manually.

On Dec 15, 7:42 pm, Dragonfyre13  wrote:
> I see some discussion from back in 2008 on the subject, but hoping
> something might have changed.
>
> Is there any way that I can cache a select, and then on update,
> automatically remove any cached selects on this table/field?
>
> I see that I can remove cache for a specific query like this:
> cache.ram(db._uri+'/'+db()._select(),None,0)
> or clear all cached selects like this: cache.ram.clear(db._uri + '/
> SELECT')
> but I'm doing updates to a particular row, and all sorts of selects on
> that table that have many types of different select statements (and
> return data in that row). Is there a way that I can cache the select,
> and then either remove the cache for any select statements that target
> that row, or even (more intensive, but possibly doable) remove all
> selects that are cached for that table?
>
> Seems (from the outside looking in) that this should somehow be part
> of the update statement. Something like:
>
> db(...).update(..., cache=(cache.ram, 3600))
>
> of course this should also work on:
>
> db(...).select(..., cache=(cache.ram,
> 3600)).first().update_record(...)
>
> but I don't find any info on that in slices, book, or this mailing
> list.
>
> Feedback? Questions? Flames? Answers? All accepted.


[web2py] Re: DAL select cache, and update

2010-12-16 Thread Dragonfyre13
If this is still the same answer as in 2008, has any thought been
given to modifying/adding the behavior mentioned?

On Dec 15, 7:42 pm, Dragonfyre13  wrote:
> I see some discussion from back in 2008 on the subject, but hoping
> something might have changed.
>
> Is there any way that I can cache a select, and then on update,
> automatically remove any cached selects on this table/field?
>
> I see that I can remove cache for a specific query like this:
> cache.ram(db._uri+'/'+db()._select(),None,0)
> or clear all cached selects like this: cache.ram.clear(db._uri + '/
> SELECT')
> but I'm doing updates to a particular row, and all sorts of selects on
> that table that have many types of different select statements (and
> return data in that row). Is there a way that I can cache the select,
> and then either remove the cache for any select statements that target
> that row, or even (more intensive, but possibly doable) remove all
> selects that are cached for that table?
>
> Seems (from the outside looking in) that this should somehow be part
> of the update statement. Something like:
>
> db(...).update(..., cache=(cache.ram, 3600))
>
> of course this should also work on:
>
> db(...).select(..., cache=(cache.ram,
> 3600)).first().update_record(...)
>
> but I don't find any info on that in slices, book, or this mailing
> list.
>
> Feedback? Questions? Flames? Answers? All accepted.


Re: [web2py] delicious is closing

2010-12-16 Thread Albert Abril
tags, public/private , friends, and usability (bookmarklet, nice ui).

this *was* the success of delicious IMHO.

On Fri, Dec 17, 2010 at 12:50 AM, Branko Vukelic wrote:

> Does it do tagging? I really liked the way delicious bmarks can be tagged
> and all...
>
> > - Original Message -
> > From: Bruno Rocha
> > Sent: 12/17/10 12:43 AM
> > To: web2py@googlegroups.com
> > Subject: Re: [web2py] delicious is closing
> >
> > I always prefer to use zootool for bookmarking
> > http://zootool.com/user/rochacbruno/
> >
> > 2010/12/16 Branko Vukelic 
> >
> > > Damn! I have a shitload of bookmarks there... :(
> > >
> > > Anyway, yeah, go for it! You can advertise as "The next Delicious"
> > >
> > > > - Original Message -
> > > > From: Albert Abril
> > > > Sent: 12/17/10 12:22 AM
> > > > To: web2py@googlegroups.com
> > > > Subject: [web2py] delicious is closing
> > > >
> > > > I'm using delicious from long time ago.
> > > > Today I read that yahoo will close delicious soon.
> > > > It's time to migrate to my own bookmark app, question is.. there's a
> > > > bookmark application wrote in web2py, should I start one? :D
> > > >
> > > > Kind regards!
> > > >
> > > >
> > > > --
> > > > Albert Abril,
> > > > @desmondo
> > > > http://bressol.org
> > >
> > >
> > > --
> > > Branko Vukelic
> > >
> > > branko.vuke...@gmx.com
> > >
> > > http://www.brankovukelic.com/
> > > http://flickr.com/photos/foxbunny
> > >
> >
> >
> >
> > --
> >
> > Bruno Rocha
> > http://about.me/rochacbruno/bio
>
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/
> http://flickr.com/photos/foxbunny
>



-- 
Albert Abril,
@desmondo
http://bressol.org


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

2010-12-16 Thread pbreit
branko, I'm curious why permissive licensing is a problem for you. is it a 
philosophical thing? what's the downside? wouldn't it be cool if your code 
was widely used? cake, django & rails are permissively licensed (as are most 
frameworks) and it doesn't seem to be a problem. people still seem excited 
to develop for those platforms.

Re: [web2py] delicious is closing

2010-12-16 Thread Branko Vukelic
Does it do tagging? I really liked the way delicious bmarks can be tagged and 
all...

> - Original Message -
> From: Bruno Rocha
> Sent: 12/17/10 12:43 AM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] delicious is closing
> 
> I always prefer to use zootool for bookmarking
> http://zootool.com/user/rochacbruno/
> 
> 2010/12/16 Branko Vukelic 
> 
> > Damn! I have a shitload of bookmarks there... :(
> >
> > Anyway, yeah, go for it! You can advertise as "The next Delicious"
> >
> > > - Original Message -
> > > From: Albert Abril
> > > Sent: 12/17/10 12:22 AM
> > > To: web2py@googlegroups.com
> > > Subject: [web2py] delicious is closing
> > >
> > > I'm using delicious from long time ago.
> > > Today I read that yahoo will close delicious soon.
> > > It's time to migrate to my own bookmark app, question is.. there's a
> > > bookmark application wrote in web2py, should I start one? :D
> > >
> > > Kind regards!
> > >
> > >
> > > --
> > > Albert Abril,
> > > @desmondo
> > > http://bressol.org
> >
> >
> > --
> > Branko Vukelic
> >
> > branko.vuke...@gmx.com
> >
> > http://www.brankovukelic.com/
> > http://flickr.com/photos/foxbunny
> >
> 
> 
> 
> -- 
> 
> Bruno Rocha
> http://about.me/rochacbruno/bio


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread pbreit
+1 for permissive.

Seems unlikely anyone would want to close up the source of a framework and 
even if it happened, it shouldn't affect the project. And who would want to 
use closed source framework?

But it should eliminate one of the adoption hurdles which is a good thing.

Don't you all want to work on something that gets big!!


Re: [web2py] delicious is closing

2010-12-16 Thread Bruno Rocha
I always prefer to use zootool for bookmarking
http://zootool.com/user/rochacbruno/

2010/12/16 Branko Vukelic 

> Damn! I have a shitload of bookmarks there... :(
>
> Anyway, yeah, go for it! You can advertise as "The next Delicious"
>
> > - Original Message -
> > From: Albert Abril
> > Sent: 12/17/10 12:22 AM
> > To: web2py@googlegroups.com
> > Subject: [web2py] delicious is closing
> >
> > I'm using delicious from long time ago.
> > Today I read that yahoo will close delicious soon.
> > It's time to migrate to my own bookmark app, question is.. there's a
> > bookmark application wrote in web2py, should I start one? :D
> >
> > Kind regards!
> >
> >
> > --
> > Albert Abril,
> > @desmondo
> > http://bressol.org
>
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/
> http://flickr.com/photos/foxbunny
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] delicious is closing

2010-12-16 Thread Branko Vukelic
Damn! I have a shitload of bookmarks there... :(

Anyway, yeah, go for it! You can advertise as "The next Delicious"

> - Original Message -
> From: Albert Abril
> Sent: 12/17/10 12:22 AM
> To: web2py@googlegroups.com
> Subject: [web2py] delicious is closing
> 
> I'm using delicious from long time ago.
> Today I read that yahoo will close delicious soon.
> It's time to migrate to my own bookmark app, question is.. there's a
> bookmark application wrote in web2py, should I start one? :D
> 
> Kind regards!
> 
> 
> -- 
> Albert Abril,
> @desmondo
> http://bressol.org


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


Re: [web2py] delicious is closing

2010-12-16 Thread Bruno Rocha
Nice idea, host it on GAE.

2010/12/16 Albert Abril 

> I'm using delicious from long time ago.
> Today I read that yahoo will close delicious soon.
> It's time to migrate to my own bookmark app, question is.. there's a
> bookmark application wrote in web2py, should I start one? :D
>
> Kind regards!
>
>
> --
> Albert Abril,
> @desmondo
> http://bressol.org
>
>


-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] delicious is closing

2010-12-16 Thread Albert Abril
I'm using delicious from long time ago.
Today I read that yahoo will close delicious soon.
It's time to migrate to my own bookmark app, question is.. there's a
bookmark application wrote in web2py, should I start one? :D

Kind regards!


-- 
Albert Abril,
@desmondo
http://bressol.org


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

2010-12-16 Thread Branko Vukelic
Here's an excerpt from Apache License 2.0:

``"Derivative Works" shall mean any work, whether in Source or Object form, 
that is based on (or derived from) the Work and for which the editorial 
revisions, annotations, elaborations, or other modifications represent, as a 
whole, an original work of authorship. For the purposes of this License, 
Derivative Works shall not include works that remain separable from, or merely 
link (or bind by name) to the interfaces of, the Work and Derivative Works 
thereof.``

This sounds like a hint for the exception we needed (unless you are serious 
about moving to BSD or MIT). Full text can be found here:

http://www.apache.org/licenses/LICENSE-2.0

so you can see the context. Reading the full text of the Apache license, I 
think dual-licensing web2py under GPLv2 and Apache License 2.0 would solve all 
of the problems except 1: reuse of web2py components and libraries for building 
closed-source software. For me, personally, that would not be fair game. If you 
are taking apart web2py and building something useful, you should share.



> - Original Message -
> From: mdipierro
> Sent: 12/16/10 11:33 PM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...
> 
> GPL2 creates the loophole. The AGPL closes the loophole. The GPL3 was
> supposed to incorporate language from AGPL and close the loophole but
> did not. It is not clear to me whether GPL3 closes the loophole or
> not. If it does not (like GPL2 does not).
> 
> I have no objection to move to GPL3.
> 
> Yet that does not help in clarifying the web2py license.
> 
> As a hypothetical question. Who here would oppose to moving to BSD or
> MIT or other more permissive license?
> 
> Massimo
> 
> On Dec 16, 2:54 pm, "Branko Vukelic"  wrote:
> > > - Original Message -
> > > From: mdipierro
> > > Sent: 12/16/10 07:56 PM
> > > To: web2py-users
> > > Subject: [web2py] Re: it case you missed it...
> > > If we were to move from GPL2 to GPL3 people would not be allowed to
> > > modify web2py running on their servers without making available the
> > > source code of their changes. I do not see any reason for requiring
> > > this.
> >
> > What's AGPL for then? Wasn't _AGPL_ supposed to prevent that? Anyway, I 
> > think GPLv3 makes i possible to use code licensed under licenses like MIT 
> > and BSD in a GPLv3 project, which is otherwise a bit incompatible. Or did I 
> > miss something?
> >
> > --
> > Branko Vukelic
> >
> > branko.vuke...@gmx.com
> >
> > http://www.brankovukelic.com/http://flickr.com/photos/foxbunny


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Michael McGinnis
No opposition here. Like others, I was originally confused whether
using the web2py framework would force my web app to be open source.
I would welcome a change in license.

On Dec 16, 4:33 pm, mdipierro  wrote:
> GPL2 creates the loophole. The AGPL closes the loophole. The GPL3 was
> supposed to incorporate language from AGPL and close the loophole but
> did not. It is not clear to me whether GPL3 closes the loophole or
> not. If it does not (like GPL2 does not).
>
> I have no objection to move to GPL3.
>
> Yet that does not help in clarifying the web2py license.
>
> As a hypothetical question. Who here would oppose to moving to BSD or
> MIT or other more permissive license?
>
> Massimo
>
> On Dec 16, 2:54 pm, "Branko Vukelic"  wrote:
>
>
>
>
>
>
>
> > > - Original Message -
> > > From: mdipierro
> > > Sent: 12/16/10 07:56 PM
> > > To: web2py-users
> > > Subject: [web2py] Re: it case you missed it...
> > > If we were to move from GPL2 to GPL3 people would not be allowed to
> > > modify web2py running on their servers without making available the
> > > source code of their changes. I do not see any reason for requiring
> > > this.
>
> > What's AGPL for then? Wasn't _AGPL_ supposed to prevent that? Anyway, I 
> > think GPLv3 makes i possible to use code licensed under licenses like MIT 
> > and BSD in a GPLv3 project, which is otherwise a bit incompatible. Or did I 
> > miss something?
>
> > --
> > Branko Vukelic
>
> > branko.vuke...@gmx.com
>
> >http://www.brankovukelic.com/http://flickr.com/photos/foxbunny


Re: [web2py] logging.conf for debugging

2010-12-16 Thread Jonathan Lundell
On Dec 16, 2010, at 11:00 AM, Lorin Rivers wrote:
> 
> I have logging writing to the console, but not to the log file.
> 
> Starting with the example, I changed WARNING to DEBUG (everywhere--as
> soon as I get it working, I'll be more selective), I set [keys] to
> keys=consoleHandler,rotatingFileHandler.
> 
> logs/web2py.log gets created on startup, but never gets any data
> written to it, despite the copious log events in the console.
> 
> What am I missing?

Please post your logging.conf.


Re: [web2py] Re: Web2py Application Exhibition ( Final Day! )

2010-12-16 Thread Bruno Rocha
Problem solved! -> http://powertable.blouweb.com/category

2010/12/16 Bruno Rocha 

> i just found that I.E 6.7.8 breaks if nested table has more than 5 rows. (I
> dont know why)
> I am going to datatables forum to discover it.
>
> 2010/12/16 Bruno Rocha 
>
>
>> Anthony, can you test if it works in I.E 8 ->
>> http://www.datatables.net/examples/server_side/row_details.html
>>
>> Thanks
>>
>>
>> --
>>
>> Bruno Rocha
>> http://about.me/rochacbruno/bio
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio


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

2010-12-16 Thread mdipierro
GPL2 creates the loophole. The AGPL closes the loophole. The GPL3 was
supposed to incorporate language from AGPL and close the loophole but
did not. It is not clear to me whether GPL3 closes the loophole or
not. If it does not (like GPL2 does not).

I have no objection to move to GPL3.

Yet that does not help in clarifying the web2py license.

As a hypothetical question. Who here would oppose to moving to BSD or
MIT or other more permissive license?

Massimo

On Dec 16, 2:54 pm, "Branko Vukelic"  wrote:
> > - Original Message -
> > From: mdipierro
> > Sent: 12/16/10 07:56 PM
> > To: web2py-users
> > Subject: [web2py] Re: it case you missed it...
> > If we were to move from GPL2 to GPL3 people would not be allowed to
> > modify web2py running on their servers without making available the
> > source code of their changes. I do not see any reason for requiring
> > this.
>
> What's AGPL for then? Wasn't _AGPL_ supposed to prevent that? Anyway, I think 
> GPLv3 makes i possible to use code licensed under licenses like MIT and BSD 
> in a GPLv3 project, which is otherwise a bit incompatible. Or did I miss 
> something?
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: mdipierro
> Sent: 12/16/10 07:56 PM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...

> If we were to move from GPL2 to GPL3 people would not be allowed to
> modify web2py running on their servers without making available the
> source code of their changes. I do not see any reason for requiring
> this.

What's AGPL for then? Wasn't _AGPL_ supposed to prevent that? Anyway, I think 
GPLv3 makes i possible to use code licensed under licenses like MIT and BSD in 
a GPLv3 project, which is otherwise a bit incompatible. Or did I miss something?

--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


[web2py] Re: bug? - "list:string" widget changes from multiple select to separate option list

2010-12-16 Thread Carlos
Hi,

I just installed the latest version (1.89.5), and it seems this has
been solved.

Thanks!,

   Carlos


On Dec 16, 10:10 am, Carlos  wrote:
> Hi Massimo,
>
> I'm using web2py 1.89.1.
>
> Is this fixed in the latest version?.
>
> Thanks,
>
>    Carlos
>
> On Dec 16, 1:22 am, mdipierro  wrote:
>
>
>
>
>
>
>
> > which version? I remember fixing this bug some time ago.
>
> > On Dec 15, 11:04 pm, Carlos  wrote:
>
> > > Hi weheh,
>
> > > No, I'm not changing the requires statement.
>
> > > It's weird because it only changes widget when I select at least one
> > > option.
>
> > > If I don't select any option and the submit fails with validation
> > > errors, then the widget stays the same (without changing to the
> > > separate options list).
>
> > > Thanks,
>
> > >    Carlos
>
> > > On Dec 15, 9:52 pm, weheh  wrote:
>
> > > > I've seen the list:string present as the separate options list widget
> > > > if multiple=True is missing from the requires. Could it be that after
> > > > a failed submit you are somehow changing the requires statement?
>
> > > > On Dec 15, 9:41 pm, Carlos  wrote:
>
> > > > > Hi,
>
> > > > > I've noticed that a "list:string" field, after a failed submit (with
> > > > > validation errors) and when at least one value is selected, changes
> > > > > from multiple select widget to the separate options list widget.
>
> > > > >    Field('test', 'list:string', requires=IS_IN_SET(['a','b','c'],
> > > > > multiple=True))
>
> > > > > This occurs with new (create) and existing (update) records.
>
> > > > > Is this a bug?.
>
> > > > > Thanks,
>
> > > > >    Carlos


Re: [web2py] Re: Web2py Application Exhibition ( Final Day! )

2010-12-16 Thread Bruno Rocha
i just found that I.E 6.7.8 breaks if nested table has more than 5 rows. (I
dont know why)
I am going to datatables forum to discover it.

2010/12/16 Bruno Rocha 

>
> Anthony, can you test if it works in I.E 8 ->
> http://www.datatables.net/examples/server_side/row_details.html
>
> Thanks
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] logging.conf for debugging

2010-12-16 Thread Lorin Rivers
I have logging writing to the console, but not to the log file.

Starting with the example, I changed WARNING to DEBUG (everywhere--as
soon as I get it working, I'll be more selective), I set [keys] to
keys=consoleHandler,rotatingFileHandler.

logs/web2py.log gets created on startup, but never gets any data
written to it, despite the copious log events in the console.

What am I missing?


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

2010-12-16 Thread mdipierro
There is a reason I did not choose GPL3 and that it is that GPL3 tries
to close the "SAAS loophole" explained here:
http://ross.typepad.com/blog/2007/07/open-source-lic.html

I want the loophole to apply to web2py.

Let me explain.

GPL2 predates SAAS therefore running a web service based on GPL2
software is not considered distribution and not subject to the GPL2
limitations. I am fine with this. I do not want to put any limitation
on people running web2py as a service, not even modified/forked/closed
source versions of web2py. I just want to put limitations on people
trying to make forks of web2py and distribute them (in the most
conventional term) closed source.

If we were to move from GPL2 to GPL3 people would not be allowed to
modify web2py running on their servers without making available the
source code of their changes. I do not see any reason for requiring
this.

Massimo



On Dec 16, 12:30 pm, "Branko Vukelic"  wrote:
> > - Original Message -
> > From: =?ANSI_X3.4-1968?Q?Jos=3F_L=2E?=
> > Sent: 12/16/10 07:23 PM
> > To: web2py@googlegroups.com
> > Subject: [web2py] Re: it case you missed it...
> > Also, is there any reason to stay in gpl v2 instead of moving to v3?
>
> I think someone already pointed out that GPLv3 could be an improvement over 
> GPLv2. It closed many of the loopholes, and also became more compatible with 
> other licenses such as MIT and BSD 3-clause. That's, I think, important since 
> some libs do have code from those two licenses.
>
> --
> Branko Vukelic
>
> branko.vuke...@gmx.com
>
> http://www.brankovukelic.com/http://flickr.com/photos/foxbunny


[web2py] Re: How to fetch already exiting table data with out defining new table

2010-12-16 Thread pbreit
Here's one:
https://groups.google.com/d/topic/web2py/mH5Toup0vwk/discussion


Re: [web2py] Off Topic - For amusement only...

2010-12-16 Thread Bruno Rocha
Very nice!

2010/12/16 villas 

> If you feel like a 3 mins break,  just reflect on how Christmas might
> have developed today, in this digital age...
>
> http://www.youtube.com/watch_popup?v=GkHNNPM7pJA&vq=medium




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


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

2010-12-16 Thread Branko Vukelic


> - Original Message -
> From: =?ANSI_X3.4-1968?Q?Jos=3F_L=2E?=
> Sent: 12/16/10 07:23 PM
> To: web2py@googlegroups.com
> Subject: [web2py] Re: it case you missed it...

> Also, is there any reason to stay in gpl v2 instead of moving to v3?

I think someone already pointed out that GPLv3 could be an improvement over 
GPLv2. It closed many of the loopholes, and also became more compatible with 
other licenses such as MIT and BSD 3-clause. That's, I think, important since 
some libs do have code from those two licenses.


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


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

2010-12-16 Thread Jos? L.


On Sunday, December 12, 2010 7:21:52 PM UTC+1, mdipierro wrote:
>
> I think we should close this discussion. It is not going anywhere. The 
> license of web2py is not up for discussion. I say (and said) that the GPL 
> license applies to derivative work only. Applications built with web2py and 
> distributed with web2py (compiled or not) are not derivative work therefore 
> the license does not apply. My statement has a legal validity because I have 
> complete copyright on web2py. Having as many users as possible is not a 
> goal. The goal is to have the best web2py framework and not fragment the 
> community. The GPL license, in my view, helps to keep the community 
> together.


+1

Just a latest question: There are some files in gluon/contrib directory 
don't have a license header , some others have a mit license, so there is a 
little mess in this files that are distributed with web2py.

Also, is there any reason to stay in gpl v2 instead of moving to v3?

Regards.
José L. 


[web2py] Re: Creating database tables tutorial?

2010-12-16 Thread selecta
> Placing that in the controller, and letting it go free.
Did you try to place the code into a model? I guess you cannot create
table in a controller.
Another thing that you could try out is the table wizard that comes
with pyMantis, an app that I just entered into the web2py application
exibition.
You can use it to create tables using a HTML form and directly view
the web2py source-code of the table.
http://w2pexhibition.appspot.com/exhibition/default/index/311002
Downloadable packages are linked in the comments


[web2py] Off Topic - For amusement only...

2010-12-16 Thread villas
If you feel like a 3 mins break,  just reflect on how Christmas might
have developed today, in this digital age...

http://www.youtube.com/watch_popup?v=GkHNNPM7pJA&vq=medium


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

2010-12-16 Thread pbreit
We are discussing the license because it hinders adoption...hardly a 
pointless topic. Anthony at least acknowledges this.

I posted the question on Quora and it got a reasonable first response:
http://www.quora.com/What-is-the-best-license-for-a-web-framework-ex-Cake-Rails-Django-GPL-BSD-or-MIT


[web2py] Re: How to fetch already exiting table data with out defining new table

2010-12-16 Thread mdipierro
The reason you MUST define it in the model is that without the model,
web2py does not know how to map SQL types into web2py types (for a
varchar can be a string, a password, a upload, or a list: type).

On Dec 15, 9:37 pm, sushanth  wrote:
> Hi,
>
> I already have few tables with data in mysql.i want to fetch that with
> out defining in model.py.
> can you please help me.
>
> Thanks in advance
>
> Regards,
> sushanth


[web2py] Re: How to fetch already exiting table data with out defining new table

2010-12-16 Thread villas
Hi,
FYI there is also a script which can 'read' an existing MySQL DB and
create a web2py model file from it.
I am not sure where that script is stored at the moment but, if you
would like it, please search this group initially.  If you still
cannot find it, ask again here and I'm sure that I or someone else
will be able to eventually post a link to it.

Regards,
David

On Dec 16, 3:37 am, sushanth  wrote:
> Hi,
>
> I already have few tables with data in mysql.i want to fetch that with
> out defining in model.py.
> can you please help me.
>
> Thanks in advance
>
> Regards,
> sushanth


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

2010-12-16 Thread Anthony
On Dec 16, 11:11 am, "Branko Vukelic"  wrote:
> > I don't _think_ I'm missing the main point, as I agree with what you
> > state above.
>
> Then why are we discussing the license? If you understand that GPL is there 
> to protect
> the freeness of the software, and that's why web2py uses it, then this 
> discussion is
> pointless.

Must just be some misunderstanding across the last few posts, probably
not worth dissecting. I think we're good now.

Cheers,
Anthony


[web2py] how to make ajax callbacks invisible to redirection?

2010-12-16 Thread weheh
Controller has ajax callback:

def dummy_ajax_callback():
  return 'jQuery("debug").html("hello world")';

We all know that this can be accessed improperly by redirection:
  http://www.mydomain.com/myapp/mycontroller/dummy_ajax_callback

Of course, this produces garbage results.

In the past, I thought I had read that the way to defeat this was to
do give the callback a dummy argument:

def dummy_ajax_callback(dummy=False):

or something like that. I thought it used to work, but id definitely
doesn't work, now. I get an "invalid request" from ajax and an
"invalid controller" message in firebug.

Any thoughts about how to make my ajax callbacks invisible to URL
redirection?


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

2010-12-16 Thread Branko Vukelic
> - Original Message -
> From: Anthony
> Sent: 12/16/10 05:02 PM
> To: web2py-users
> Subject: [web2py] Re: it case you missed it...
> I don't _think_ I'm missing the main point, as I agree with what you
> state above.

Then why are we discussing the license? If you understand that GPL is there to 
protect the freeness of the software, and that's why web2py uses it, then this 
discussion is pointless.

--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


[web2py] Re: bug? - "list:string" widget changes from multiple select to separate option list

2010-12-16 Thread Carlos
Hi Massimo,

I'm using web2py 1.89.1.

Is this fixed in the latest version?.

Thanks,

   Carlos

On Dec 16, 1:22 am, mdipierro  wrote:
> which version? I remember fixing this bug some time ago.
>
> On Dec 15, 11:04 pm, Carlos  wrote:
>
>
>
>
>
>
>
> > Hi weheh,
>
> > No, I'm not changing the requires statement.
>
> > It's weird because it only changes widget when I select at least one
> > option.
>
> > If I don't select any option and the submit fails with validation
> > errors, then the widget stays the same (without changing to the
> > separate options list).
>
> > Thanks,
>
> >    Carlos
>
> > On Dec 15, 9:52 pm, weheh  wrote:
>
> > > I've seen the list:string present as the separate options list widget
> > > if multiple=True is missing from the requires. Could it be that after
> > > a failed submit you are somehow changing the requires statement?
>
> > > On Dec 15, 9:41 pm, Carlos  wrote:
>
> > > > Hi,
>
> > > > I've noticed that a "list:string" field, after a failed submit (with
> > > > validation errors) and when at least one value is selected, changes
> > > > from multiple select widget to the separate options list widget.
>
> > > >    Field('test', 'list:string', requires=IS_IN_SET(['a','b','c'],
> > > > multiple=True))
>
> > > > This occurs with new (create) and existing (update) records.
>
> > > > Is this a bug?.
>
> > > > Thanks,
>
> > > >    Carlos


[web2py] BUG? db.mytable.id.represent with Crud

2010-12-16 Thread hcvst
Hi,

I'm struggling to change a table's records ID representation when
using Crud.
(w2p Version 1.89.5 (2010-11-21 22:12:54))

def index1():
" List all blog posts "
db.blog_posts.title.represent = lambda _: 'replace title'
db.blog_posts.id.represent = lambda _: 'replace id'
posts = crud.select(
db.blog_posts,
fields=['id', 'title'])
return dict(posts=posts)

def index2():
" List all blog posts "
db.blog_posts.title.represent = lambda _: 'replace title'
db.blog_posts.id.represent = lambda _: 'replace id'
posts = crud.select(
db.blog_posts,
fields=['blog_posts.id', 'blog_posts.title'])   # !!! field
names prefixed by tablename
return dict(posts=posts)

index1() doesn't change the representation at all. With index2() only
the title's representation is changed.
In both cases the id column displays the numeric id - However! with
index2() the id is a link whereas with index1() it is not.

I had the same problem a while back when crud.create still had a
'columns' parameter according to the w2p book (was it renamed to
'fields' recently?) but got it to work when I prefixed the field names
by the table name as I did here in index2().

Regards,
HC



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

2010-12-16 Thread Anthony
On Dec 16, 2:09 am, "Branko Vukelic"  wrote:
> > Yes, I agree, but all I said was that the concerns are not invalid (I
> > also pointed out an issue that has not thus far been addressed --
> > standalone DAL). I think we can decide to stick with GPL while still
> > recognizing it may present a barrier for some (possibly simply due to
> > confusion or risk aversion rather than a real legal threat). This
> > issue is both complex and important, so a long discussion should not
> > be surprising. I, for one, have learned a lot, and assuming we follow
> > through, I believe the result of this long thread will be an
> > improvement in the license and therefore the comfort of prospective
> > users. Those uninterested in the topic can easily ignore the thread.
>
> You are missing the main point here, and that's software freedom and two 
> incompatible views regarding that. It's not by conincidence that there is a 
> commercial EXCEPTION to GPL in web2py. The reason it's called an exception is 
> that it is incompatible with the intent of GPL. Now consider that Massimo has 
> _chosen_ GPL with an intent, and that GPL aligns with that intent. Do I need 
> to go on?

I don't _think_ I'm missing the main point, as I agree with what you
state above.

Anthony


Re: [web2py] Vote in web2py for PyCon 2011 Tutorials

2010-12-16 Thread Branko Vukelic
voted

> - Original Message -
> From: appydev
> Sent: 12/16/10 03:27 PM
> To: web2py@googlegroups.com
> Subject: Re: [web2py] Vote in web2py for PyCon 2011 Tutorials
> 
> One more vote for web2py!
> 
> 2010/12/15 Bruno Rocha 
> 
> > PyCon is made up of a number of different parts, each with its own goals.
> > For the talks presented during the conference portion of PyCon, we go for
> > both breadth and quality. There are enough different sessions and different
> > tracks that each person can customize their PyCon experience according to
> > their interests. For tutorials, the goal is slightly different. We want to
> > present tutorials that help developers deal effectively with their most
> > common day-to-day challenges. Accordingly, the following topics have been
> > generally proposed for tutorials at PyCon 2011. Which of these topics would
> > be the most useful for you? If tutorials were held on all these topics,
> > which ones would you or your organization pay to attend?
> >
> >
> > https://spreadsheets0.google.com/viewform?formkey=dF9wdHV0SHhMLWVKV1MzX0hpYW9XZnc6MQ#gid=0
> >
> > --
> >
> > Bruno Rocha
> > http://about.me/rochacbruno/bio
> >


--
Branko Vukelic

branko.vuke...@gmx.com

http://www.brankovukelic.com/
http://flickr.com/photos/foxbunny


[web2py] Re: How to fetch already exiting table data with out defining new table

2010-12-16 Thread DenesL

Without models defined, I believe you can only access them using SQL
commands via executesql.
You obviously still need to define the db.

recs = db.executesql('select * from your_mysql_table_name;')


On Dec 15, 10:37 pm, sushanth  wrote:
> Hi,
>
> I already have few tables with data in mysql.i want to fetch that with
> out defining in model.py.
> can you please help me.
>
> Thanks in advance
>
> Regards,
> sushanth


Re: [web2py] Vote in web2py for PyCon 2011 Tutorials

2010-12-16 Thread appydev
One more vote for web2py!

2010/12/15 Bruno Rocha 

> PyCon is made up of a number of different parts, each with its own goals.
> For the talks presented during the conference portion of PyCon, we go for
> both breadth and quality. There are enough different sessions and different
> tracks that each person can customize their PyCon experience according to
> their interests. For tutorials, the goal is slightly different. We want to
> present tutorials that help developers deal effectively with their most
> common day-to-day challenges. Accordingly, the following topics have been
> generally proposed for tutorials at PyCon 2011. Which of these topics would
> be the most useful for you? If tutorials were held on all these topics,
> which ones would you or your organization pay to attend?
>
>
> https://spreadsheets0.google.com/viewform?formkey=dF9wdHV0SHhMLWVKV1MzX0hpYW9XZnc6MQ#gid=0
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>


[web2py] ajax form submit

2010-12-16 Thread aungsan
for example,

in default.py

def user():
  return dict(form=auth())


in view

{=form}}

How do I change it styl, i.e password input box appear next to
username not below.

And I put the following in the views/default/index.html


{{=A('linked page',_href=URL(c='default',f='user'),cid='myid')}}


But I could not submit the form. It does not work. Nothing happen :S




Re: [web2py] Re: Web2py Application Exhibition ( Final Day! )

2010-12-16 Thread Bruno Rocha
Martin, there is a problem. and I dont know if there is a way to solve.

When you are loggetOut, click in 'Like' the app redirects to login page, but
the vote is not computed.
the user thinks he voted, but still have to click in 'like' again.

I see you have _next=/default/ilike/329001, but jainrain redirects to /index
ignoring it.


-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] Re: Result: None and I cannot figure out why [Closed]

2010-12-16 Thread Johann Spies
>  data =
> plugin_wiki.widget('jqgrid',col_width=130,table=tabel.lower(),
>width=950)
>   return dict(data=data,tabel=tabel)
>
>
the last line was indented 1 tab too many.

Apologies for noise on the list.

Johann


-- 
 May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord!  His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a


[web2py] Re: Web2py Application Exhibition ( Final Day! )

2010-12-16 Thread Martin.Mulone
Thank you anthony. Sorry I was very busy yeasterday. I'll fix this today. 
And yes don't vote for app exhibition is going to be deleted.