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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 2:00:08 AM UTC-5, mdipierro wrote: > On
Sunday, December 12, 2010 11:46:38 PM UTC-5, mdipierro wrote: There
> are three cases:
> 1) you distribute your app open or closed source with web2py source
> (allowed by GPL)
>
> Doesn't the GPL by itself actually prohibit distributing a closed
> source web2py app because of the linking issue? I thought the
following
> explicit exception is what allows that, no?
>
> "You can distribute web2py app under any license you like as long they
> do not contain web2py code."

Not quite because importing is not the same as linking.


Maybe I'm misunderstanding something. Earlier you said importing
modules in an interpreted language (like Python):

"is equivalent to linking IF and only IF, the py or the pyc files of
the imported module are distributed with the compiled app (case 1). It
is not linking if the py or pyc modules are not distributed together
(case 2). In case 2 the GPL does not apply. Case 1 is not allowed by
the GPL and that is why have the commercial exception."

Above, you mentioned distributing your app "with web2py source", which
would appear to make the importing equivalent to linking, thereby
necessitating the exception to GPL. The exception is unnecessary only
if you distribute your app without including web2py at all (presumably
the user receiving the app woud have to obtain their own copy of web2py
in that case). Or am I missing something?

Anyway, let's take a poll. What if we do the following?

1) all web2py/*.py and web2py/gluon/*py files are LPGL
2) all web2py/gluon/contrib/* files are LGPL unless specified
otherwise (MIT or BSD are possible for third party contributions)
3) the official web2py binaries for Mac and Windows are freeware
4) the scaffolding app is public domain except for images/css/js files
which may have their own licenses.

Is this more or less confusing?
How can we make it more clear?
Would any of the major contributors strongly oppose?
If so, why?

At first glance this sounds pretty good, though we should probably
investigate the LGPL more to make sure it really does what we want.
Also, do we need a separate (possibly existing standard) freeware
license for the binaries? For that matter, what is the purpose of the
freeware exception for the binaries? I assume it's so applications can
be distributed along with the binaries for convenience. But I think the
GPL (and LGPL) already allow distributions of binaries (i.e.,
non-source code) as long as the source code is also made available
(even a written offer to provide it upon request satisfies the
license). So, if a developer wants to distribute the binaries, couldn't
they easily satisfy the license by also including the source in a zip
file along with the distribution (the end user doesn't ever have to
install or look at the source, but this would satisfy the license). If
that would be satisfactory for developers, then maybe all we really
need is the LGPL, with no exceptions, which would really make things
simple and clear.

Anyway, if we feel it is still helpful to have the freeware
alternative, maybe it would be more clear to describe it as a dual
license (LGPL for source and freeware for binaries) rather than "LGPL
with a commercial exception" (which could lead to confusion and
concern).

Anthony

Re: [web2py] grid

2010-12-13 Thread Anthony
Is this better than jqGrid? plugin_wiki has a jqGrid widget -- should
it also have a datatables widget?

Re: [web2py] grid

2010-12-13 Thread Bruno Rocha
You can easily extend plugin_wiki to include a new widget.

I dont know if it is better than jQgrid, because I never uses jQgrid, but I
am finding everything I need in datatables and its plugins.

It is good to have more options.

2010/12/13 Anthony 

> Is this better than jqGrid? plugin_wiki has a jqGrid widget -- should it
> also have a datatables widget?


-- 

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


[web2py] Re: newbie

2010-12-13 Thread Mirek Zvolský
To understand the basic behaviour of web2py, you can try following:

In the default controller default.py make a function, f.e.
allstorylines():

def allstorylines():
rsStorylines = db().select(db.storyline.ALL)
return dict(rsStorylines=rsStorylines)

In addition you need a view default/allstorylines.html:

{{extend 'layout.html'}}
{{=rsStorylines}}

Now, write into your browser the address:
localhost:8000/applicationname/default/allstorylines

and you should see  of storyline records.

If this works, you can improve it in 2 ways:

-- change the db().select() in the controller to receive just records
you want to see,

-- change the view, f.e. instead of {{}} you can try list records in
cycle:

{{for recStoryline in rsStorylines:}}

{{=recStoryline.fieldname or ''}}
{{=...}}

{{pass}}


 or use some compoment to display records, f.e. see:
   http://www.trirand.com/blog/jqgrid/jqgrid.html


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 8:00 AM, mdipierro  wrote:
> 1) all web2py/*.py and web2py/gluon/*py files are LPGL

+1

> 2) all web2py/gluon/contrib/* files are LGPL unless specified

+1

> otherwise (MIT or BSD are possible for third party contributions)

3rd party contributions that were released as MIT or BSD cannot be
licensed under LGPL because they're incompatible. e.g., BSD says
"shall not place any more limitations yada yada" or something like
that, and LGPL does just that: place limitations on what you can do by
telling you not to close-source, etc.

> 3) the official web2py binaries for Mac and Windows are freeware

There's no need. You just have to point to the source code and you can
still distrubite Win/Mac as binary-only even, under LGPL.

> 4) the scaffolding app is public domain except for images/css/js files
> which may have their own licenses.

I dunno about PD. It doesn't exist everywhere. :) A better solution
would be to offer unrestricted use provided intellectual property
(logos and web2py name) is removed etc etc.

> Is this more or less confusing?

Yes. It's the nature of the beast. :)

> How can we make it more clear?

A FAQ that explains what you can do with the stuff.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Create table without id field

2010-12-13 Thread demetrio
Hi everyone,

i've searched if there is any way to create a table without an id
field. I've tryed with: param "primarykey = None" but this doesn't
works.

There is any way to do it?

Thanks


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 9:11 AM, Anthony  wrote:
> source and freeware for binaries) rather than "LGPL with a commercial
> exception" (which could lead to confusion and concern).

LGPL _is_ the commercial exception. That's why they call it "lesser". :)


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: Create table without id field

2010-12-13 Thread mdipierro
You can only rename it, for example 'mykey'

db.define_table('person',Field('mykey','id'),...)



On Dec 13, 4:11 am, demetrio  wrote:
> Hi everyone,
>
> i've searched if there is any way to create a table without an id
> field. I've tryed with: param "primarykey = None" but this doesn't
> works.
>
> There is any way to do it?
>
> Thanks


[web2py] Re: newbie

2010-12-13 Thread Shel
That clears up a lot.  Thank you both.


[web2py] Re: newbie

2010-12-13 Thread Shel
That clears up a lot.  Thank you both.


[web2py] Re: "Unable to create application" on WebFaction

2010-12-13 Thread annet
Hi Dave,

I don't know what causes this problem either, I always use the
procedure you describe above, it works, that's why I didn't bother the
find out why the standard procedure doesn't work.

Annet


[web2py] Framework comparison not linked

2010-12-13 Thread Timmie
Hello,

the following file is not linked in the official website (at least I
couln't find it):
http://www.web2py.com/examples/static/web2py_vs_others.pdf

Best regards


Re: [web2py] Create table without id field

2010-12-13 Thread Ole Martin Maeland
Create a table in web2py, migrate=False

create table in db, no autincrement..

thats it.

regards
Martin


On Mon, Dec 13, 2010 at 11:11 AM, demetrio  wrote:

> Hi everyone,
>
> i've searched if there is any way to create a table without an id
> field. I've tryed with: param "primarykey = None" but this doesn't
> works.
>
> There is any way to do it?
>
> Thanks


Re: [web2py] Re: Create table without id field

2010-12-13 Thread Daniel Gonzalez
El lun, 13-12-2010 a las 02:19 -0800, mdipierro escribió:
> You can only rename it, for example 'mykey'
> 
> db.define_table('person',Field('mykey','id'),...)
> 

ok, i will try to make the functionality in another way :)

Thanks Massimo :)

> 
> 
> On Dec 13, 4:11 am, demetrio  wrote:
> > Hi everyone,
> >
> > i've searched if there is any way to create a table without an id
> > field. I've tryed with: param "primarykey = None" but this doesn't
> > works.
> >
> > There is any way to do it?
> >
> > Thanks




Re: [web2py] Create table without id field

2010-12-13 Thread Daniel Gonzalez
Thanks a lot :)

El lun, 13-12-2010 a las 14:05 +0100, Ole Martin Maeland escribió:
> Create a table in web2py, migrate=False
> 
> create table in db, no autincrement..
> 
> thats it.
> 
> 



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

2010-12-13 Thread Branko Vukelic
Ok, so I got word from GNU. What they say is that using "imports" the
way Python does is considered creating derivative work, and LGPL would
not, in their view, except the vendor from the obligation to release
their apps under the terms of (L)GPL (which is kinda surprising). As
solution to this they suggested two things:

1. make dual license, of which the commercial license would be for-pay
and would allow companies to make closed-source derivatives or
distribution of web2py and/or web2py apps
2. make an exeption clause under GPL for the apps (which is what
Massimo does and is perfectly ok)

I think it'd be best that the source version of web2py be covered by
the 2., and that the 'freeware' version be made 'shareware' (pay to
bundle the binary, that is) as an option 1. At any rate, the
conclusion is that the exception does cover the proprietary
distribution of web2py apps and does not violate GPL.

On Mon, Dec 13, 2010 at 11:12 AM, Branko Vukelic  wrote:
> On Mon, Dec 13, 2010 at 9:11 AM, Anthony  wrote:
>> source and freeware for binaries) rather than "LGPL with a commercial
>> exception" (which could lead to confusion and concern).
>
> LGPL _is_ the commercial exception. That's why they call it "lesser". :)
>
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog: http://www.brankovukelic.com/
> Check out my portfolio: http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca: http://identi.ca/foxbunny
>
> Gimp Brushmakers Guild
> http://bit.ly/gbg-group
>



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] embedded server gives broken chunks?

2010-12-13 Thread Leo
Using Python 2.5.4 and web2py 1.84.4, I call a function decorated with
@service.run from python using

robj = urllib2.urlopen(urllib2.Request(url,data))
robj.read()

The .read() call fails with the following exception:

...
  File "socket.pyc", line 304, in read
  File "httplib.pyc", line 509, in read
  File "httplib.pyc", line 548, in _read_chunked
ValueError: invalid literal for int() with base 16: ''

Searching the internet I found that this seems to be a reported issue
with httplib: http://bugs.python.org/issue7013.

It is not really a bug -- httplib is doing the right thing, but many
servers out there, including the one on which bing runs, seem to be
missing a 0 for the last chunk.

Is the server used in the guts of web2py doing the wrong thing and
returning a chunk missing the 0 size?

Thanks,
Leo.


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 5:12:51 AM UTC-5, Branko Vukelic wrote: On
Mon, Dec 13, 2010 at 9:11 AM, Anthony  wrote:
> source and freeware for binaries) rather than "LGPL with a commercial
> exception" (which could lead to confusion and concern).
LGPL _is_ the commercial exception. That's why they call it "lesser". :)


Yes, LGPL (I think) allows the exception to distribute the source along
with an application that links/imports the source. I was talking about
the other web2py exception, which allows distribution of the binaries
without the source at all (i.e., the freeware license for the
binaries). Currently, we describe the license as "GPL with a commercial
exception" (the "exception" referring to the binary distribution
option), but it may be more clear to refer to it as a dual license
instead (above, I wrote "LGPL with a commercial exception" because I
was assuming Massimo's new proposal, which switches to LGPL but still
includes the freeware exception).


[web2py] Bug report

2010-12-13 Thread dederocks
Hello,

When shutting down Web2py (trunk version on windows 7, python 2.7), I
get the following error:

starting browser...
Unhandled exception in thread started by >
Traceback (most recent call last):
  File "C:\Users\Andre\Documents\web2py\gluon\main.py", line 751, in
start
self.server.start()
  File "C:\Users\Andre\Documents\web2py\gluon\rocket.py", line 426, in
start
return self.stop()
  File "C:\Users\Andre\Documents\web2py\gluon\rocket.py", line 438, in
stop
self._threadpool.stop()
  File "C:\Users\Andre\Documents\web2py\gluon\rocket.py", line 673, in
stop
self.bring_out_your_dead()
  File "C:\Users\Andre\Documents\web2py\gluon\rocket.py", line 678, in
bring_out
_your_dead
dead_threads = [t for t in self.threads if not t.isAlive()]
RuntimeError: Set changed size during iteration

BR,
Andre


Re: [web2py] Framework comparison not linked

2010-12-13 Thread Bruno Rocha
It is here: http://web2py.com/examples/default/what
(second box)

2010/12/13 Timmie 

> Hello,
>
> the following file is not linked in the official website (at least I
> couln't find it):
> http://www.web2py.com/examples/static/web2py_vs_others.pdf
>
> Best regards
>



-- 

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


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 2:43 PM, Anthony  wrote:
> Yes, LGPL (I think) allows the exception to distribute the source along with
> an application that links/imports the source. I was talking about the other
> web2py exception, which allows distribution of the binaries without the
> source at all (i.e., the freeware license for the binaries). Currently, we

Why? I don't think it would be too much to ask companies to pay for
binary-only bundling. If you can distribute with the sources (meaning
either put sources in the bundle, or offer sources some other way,
mind you), why not? I have absolutely nothing against that. If a
company is not prepared to do that, they should use a closed-source
product that allows this.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: manual login-form

2010-12-13 Thread pk
can nobody help me?

On 12 Dez., 23:44, pk  wrote:
> hi,
> i hope somebody of you can help me very fast.
>
> how can i set the form-ID for the form (loginform)
>
> if i post the code {{=loginform}}
> i get this code automaticly:
>
> 
>  method="post"> class="w2p_fl"> id="auth_user_email__label">E-Mail:  class="w2p_fw"> type="text" value="" /> id="auth_user_password__row"> for="auth_user_password" id="auth_user_password__label">Passwort:  label> id="auth_user_password" name="password" type="password" value="" /> td> id="auth_user_remember__row">   td> name="remember" type="checkbox" value="on" /> for="auth_user_remember">Angemeldet bleiben td> class="w2p_fw"> class="w2p_fc"> name="_next" type="hidden" value="/NETAVATAR/default/index" /> name="_formkey" type="hidden"
> value="eeac5cfc-4eb8-4532-90b7-546bbf558f9e" /> type="hidden" value="login" />
>
> Passwort
> vergessen?
> 


Re: [web2py] Re: manual login-form

2010-12-13 Thread Bruno Rocha
You can try this:

{{loginform.attributes['_id'] = 'someidhere'}}
{{=loginform}}



2010/12/13 pk 

> can nobody help me?
>
> On 12 Dez., 23:44, pk  wrote:
> > hi,
> > i hope somebody of you can help me very fast.
> >
> > how can i set the form-ID for the form (loginform)
> >
> > if i post the code {{=loginform}}
> > i get this code automaticly:
> >
> > 
> >  > method="post"> > class="w2p_fl"> > id="auth_user_email__label">E-Mail:  > class="w2p_fw"> > type="text" value="" /> > id="auth_user_password__row"> > for="auth_user_password" id="auth_user_password__label">Passwort:  > label> > id="auth_user_password" name="password" type="password" value="" /> > td> > id="auth_user_remember__row">   > td> > name="remember" type="checkbox" value="on" /> > for="auth_user_remember">Angemeldet bleiben > td> > class="w2p_fw"> > class="w2p_fc"> > name="_next" type="hidden" value="/NETAVATAR/default/index" /> > name="_formkey" type="hidden"
> > value="eeac5cfc-4eb8-4532-90b7-546bbf558f9e" /> > type="hidden" value="login" />
> >
> > Passwort
> > vergessen?
> > 
>



-- 

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


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 5:07:52 AM UTC-5, Branko Vukelic wrote: On
Mon, Dec 13, 2010 at 8:00 AM, mdipierro  wrote:

> otherwise (MIT or BSD are possible for third party contributions)
3rd party contributions that were released as MIT or BSD cannot be
licensed under LGPL because they're incompatible. e.g., BSD says
"shall not place any more limitations yada yada" or something like
that, and LGPL does just that: place limitations on what you can do by
telling you not to close-source, etc.


Hmm, I thought it was just the opposite -- people like MIT/BSD because
they don't place any restrictions on how you license a modified/derived
work. So, you can take an MIT/BSD licensed program, modify/combine it,
and then release the modified/combined version as LGPL, GPL, or even
closed source. You can't go the other way, though (i.e., you can't
modify/combine a GPL/LGPL program and release it as MIT/BSD). The GNU
website lists both the modified BSD and the MIT (Expat) licenses as
GPL-compatible (http://www.gnu.org/licenses/license-list.html).

If this isn't the case, then web2py would already be in violation of
various contrib licenses, no?

> 3) the official web2py binaries for Mac and Windows are freeware
There's no need. You just have to point to the source code and you can
still distrubite Win/Mac as binary-only even, under LGPL.

Yes, I think that's right (if you just "point" to the source rather
than actually include it, you might have to make sure you point to the
originally distributed version, not just the current version at
web2py.com). We might simplify this by (a) including a link to the
appropriate source version right in the license document of the binary
version, or (b) including a zip file with the source right in the
binary version -- so any distribution of the binary version would
automatically satisfy the GPL/LGPL license without any further effort
by the developer/distributor.

> Is this more or less confusing?
Yes. It's the nature of the beast. :)

Are you saying yes, it's more confusing? Whether or not it's confusing,
I think it may be less confusing than the current license because it
removes one of the exceptions (for web2py applications) by switching to
the LGPL. If we can also remove the binary distribution exception (and
rely on the GPL/LGPL provision for binary distribution), it would
become simpler still. I guess the only issue is whether people would
readily understand that the LGPL wouldn't apply to web2py apps and
would allow binary distribution -- you have to read through the license
carefully to figure that out (unless you're already familiar with the
LGPL). So, if we switch to LGPL, it would probably be worth pointing
this out in a FAQ, and maybe even including an explanation with the
license, just so it's very clear what is permitted.

Anthony


Re: [web2py] Re: manual login-form

2010-12-13 Thread Bruno Rocha
form.elements()[0].attributes['_id'] and form.attributes['_id'] get/set the
same value.

2010/12/13 Bruno Rocha 

> You can try this:
>
> {{loginform.attributes['_id'] = 'someidhere'}}
> {{=loginform}}
>
>
>
> 2010/12/13 pk 
>
> can nobody help me?
>>
>> On 12 Dez., 23:44, pk  wrote:
>> > hi,
>> > i hope somebody of you can help me very fast.
>> >
>> > how can i set the form-ID for the form (loginform)
>> >
>> > if i post the code {{=loginform}}
>> > i get this code automaticly:
>> >
>> > 
>> > > > method="post">> > class="w2p_fl">> > id="auth_user_email__label">E-Mail: > > class="w2p_fw">> > type="text" value="" />> > id="auth_user_password__row">> > for="auth_user_password" id="auth_user_password__label">Passwort: > > label>> > id="auth_user_password" name="password" type="password" value="" />> > td>> > id="auth_user_remember__row">  > > td>> > name="remember" type="checkbox" value="on" />> > for="auth_user_remember">Angemeldet bleiben> > td>> > class="w2p_fw">> > class="w2p_fc">> > name="_next" type="hidden" value="/NETAVATAR/default/index" />> > name="_formkey" type="hidden"
>> > value="eeac5cfc-4eb8-4532-90b7-546bbf558f9e" />> > type="hidden" value="login" />
>> >
>> > Passwort
>> > vergessen?
>> > 
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>



-- 

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


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:13 PM, Anthony  wrote:
> Hmm, I thought it was just the opposite -- people like MIT/BSD because they
> don't place any restrictions on how you license a modified/derived work. So,
> you can take an MIT/BSD licensed program, modify/combine it, and then
> release the modified/combined version as LGPL, GPL, or even closed source.

MIT does not permit that, as far as I can tell. "to deal in the
Software without restriction", which invalidates your claim because
"The above copyright notice and this permission notice shall be
included in
all copies or substantial portions of the Software."

Closed-source means restriction, and so does GPL. So MIT is not
compatible. Afaik, GPL doesn't consider BSD as GPL-compatible, either.

> You can't go the other way, though (i.e., you can't modify/combine a
> GPL/LGPL program and release it as MIT/BSD). The GNU website lists both the
> modified BSD and the MIT (Expat) licenses as GPL-compatible
> (http://www.gnu.org/licenses/license-list.html).

Yes, in a way they are. MIT is even viral, like GPL.

> If this isn't the case, then web2py would already be in violation of various
> contrib licenses, no?

Yes.

> Yes, I think that's right (if you just "point" to the source rather than
> actually include it, you might have to make sure you point to the originally
> distributed version, not just the current version at web2py.com). We might
> simplify this by (a) including a link to the appropriate source version

That won't do. According to GNU, you have to host the sources
yourself, and ensure that it is available at least 3 years after
you've stopped distributing the binaries. I think there is a loophole
for this in v2, though, but v3 definitely plugged it. The Arch linux
community was forced to start hosting the entire corpus of sources
they were building on to get into compliance.

> right in the license document of the binary version, or (b) including a zip
> file with the source right in the binary version -- so any distribution of
> the binary version would automatically satisfy the GPL/LGPL license without
> any further effort by the developer/distributor.

That's reasonable, yeah.

> Are you saying yes, it's more confusing? Whether or not it's confusing, I
> think it may be less confusing than the current license because it removes
> one of the exceptions (for web2py applications) by switching to the LGPL. If

According to GNU, it does not. So an exception is the best solution. A
more hussle-free option could be offered as a second license, whether
for pay or free of charge, although I think for-pay would just be
being fair to the project.

> we can also remove the binary distribution exception (and rely on the
> GPL/LGPL provision for binary distribution), it would become simpler still.
> I guess the only issue is whether people would readily understand that the
> LGPL wouldn't apply to web2py apps and would allow binary distribution --
> you have to read through the license carefully to figure that out (unless
> you're already familiar with the LGPL). So, if we switch to LGPL, it would
> probably be worth pointing this out in a FAQ, and maybe even including an
> explanation with the license, just so it's very clear what is permitted.


I think there need not be any provisions for using or distributing
web2py itself except those that are offered by the GPL. In fact, I'd
go as far as to make web2py AGPL isntead. The problem was this forced
app developers to develop under GPL. And that's what the exception is
about. GPL does NOT prevent you from distributing binary-only web2py
with your proprietary binary-only app as long as you comply to GPL for
the web2py part. Your app is GPL-free anyway. I just don't understand
why you insist that closed-source web2py should be allowed. I don't
think it should be, and Massimo has also stated to that effect.



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:29 PM, Branko Vukelic  wrote:
>Your app is GPL-free anyway

Because of the exception, to be precise, not according to GPL.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: extra non-persistent fields in forms

2010-12-13 Thread Carlos
Thanks a lot !

On Dec 12, 11:34 pm, Bruno Rocha  wrote:
> Sorry, my fault, SQLFORM.factory generates forms based on tables, but this
> does not make the inserts automatically.
>
> if you want to use that to include extra fields in a form it is a good
> choice, but you'll need to implement the 'inserts' for the table.
>
> orm=SQLFORM 
> .factory(db.client,Field('extra_field'))
>     if form.accepts(request
> .vars):
>         id = db.client.insert(**db.client._filter_fields(form.vars))
>         form.vars.client=id
>         response
> .flash='Thanks for
> filling the form'
>     return dict(form=form)
>
> The advantage here is that you can set validators to the extra fields.
>
> *Look this example in a shell:*
>
> >>> form = SQLFORM.factory(db.category,Field('new_field'))
> >>> print form
>
>  id="no_table_name__row"> id="no_table_name__label">Name:  class="string" id="no_table_name" name="name" type="text" value=""
> /> class="w2p_fl"> id="no_table_new_field__label">New Field:  *nput class="string" id="no_table_new_field" name="new_field" type="text"
> value="" />* id="submit_record__row"> type="submit" value="Submit" /> class="w2p_fc">
>
>
>
> --
> Bruno Rochahttp://about.me/rochacbruno/bio


Re: [web2py] Re: manual login-form

2010-12-13 Thread Branko Vukelic
Bruno, is there something like {{=authform.children}} to render all
the interior without the  tags?

On Mon, Dec 13, 2010 at 4:15 PM, Bruno Rocha  wrote:
> form.elements()[0].attributes['_id'] and form.attributes['_id'] get/set the
> same value.
>
> 2010/12/13 Bruno Rocha 
>>
>> You can try this:
>> {{loginform.attributes['_id'] = 'someidhere'}}
>> {{=loginform}}
>>
>>
>> 2010/12/13 pk 
>>>
>>> can nobody help me?
>>>
>>> On 12 Dez., 23:44, pk  wrote:
>>> > hi,
>>> > i hope somebody of you can help me very fast.
>>> >
>>> > how can i set the form-ID for the form (loginform)
>>> >
>>> > if i post the code {{=loginform}}
>>> > i get this code automaticly:
>>> >
>>> > 
>>> > >> > method="post">>> > class="w2p_fl">>> > id="auth_user_email__label">E-Mail: >> > class="w2p_fw">>> > type="text" value="" />>> > id="auth_user_password__row">>> > for="auth_user_password" id="auth_user_password__label">Passwort: >> > label>>> > id="auth_user_password" name="password" type="password" value="" />>> > td>>> > id="auth_user_remember__row">  >> > td>>> > name="remember" type="checkbox" value="on" />>> > for="auth_user_remember">Angemeldet bleiben>> > td>>> > class="w2p_fw">>> > class="w2p_fc">>> > name="_next" type="hidden" value="/NETAVATAR/default/index" />>> > name="_formkey" type="hidden"
>>> > value="eeac5cfc-4eb8-4532-90b7-546bbf558f9e" />>> > type="hidden" value="login" />
>>> >
>>> > Passwort
>>> > vergessen?
>>> > 
>>
>>
>> --
>>
>> Bruno Rocha
>> http://about.me/rochacbruno/bio
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: Many to Many on GAE

2010-12-13 Thread howesc
where and how are the pictures stores? will you be adding them to the
blobstore or references pictures elsewhere?

[web2py] Re: login form with a popup

2010-12-13 Thread ma...@rockiger.com
Could you show you browser-source?




But actually I have to admit, Branko is right. You don't get the
redirect.
I used it in a situation where I didn't want a redirect.



@Branko


Coud you give an example of a partial form?




Marco

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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 10:29:00 AM UTC-5, Branko Vukelic wrote:
On Mon, Dec 13, 2010 at 4:13 PM, Anthony  wrote:
> Hmm, I thought it was just the opposite -- people like MIT/BSD
because they
> don't place any restrictions on how you license a modified/derived
work. So,
> you can take an MIT/BSD licensed program, modify/combine it, and then
> release the modified/combined version as LGPL, GPL, or even closed
source.
MIT does not permit that, as far as I can tell. "to deal in the
Software without restriction", which invalidates your claim because
"The above copyright notice and this permission notice shall be
included in
all copies or substantial portions of the Software."

I'm not sure you can release a modified MIT program as GPL or closed
source, but I believe you can include it in a GPL or closed source
program -- this is according to the Wikipedia entry
(http://en.wikipedia.org/wiki/MIT_License). In any case, this wouldn't
apply to BSD, as BSD only requires inclusion of the copyright notice
(not the permission notice).

Closed-source means restriction, and so does GPL. So MIT is not
compatible. Afaik, GPL doesn't consider BSD as GPL-compatible, either.

The GNU website disagrees with you -- it lists both the modified BSD
and the MIT (Expat) license as GPL-compatible
(http://www.gnu.org/licenses/license-list.html). So do the Wikipedia
entries for BSD and MIT.
> If this isn't the case, then web2py would already be in violation of
various
> contrib licenses, no?
Yes.

Based on the above, it would appear not -- MIT/BSD programs can even be
included in closed source/proprietary software.
> Yes, I think that's right (if you just "point" to the source rather
than
> actually include it, you might have to make sure you point to the
originally
> distributed version, not just the current version at web2py.com). We
might
> simplify this by (a) including a link to the appropriate source
version
That won't do. According to GNU, you have to host the sources
yourself, and ensure that it is available at least 3 years after
you've stopped distributing the binaries.

According to GPL, "the Corresponding Source may be on a different
server (operated by you or a third party)". You are obligated to make
sure it remains available, so relying on a third party may be risky,
but it appears to be allowed.

I just don't understand
why you insist that closed-source web2py should be allowed. I don't
think it should be, and Massimo has also stated to that effect.

I don't believe I have insisted nor even suggested that closed-source
web2py should be allowed. Massimo already allows it -- that's the
commercial exception. It says you can distribute the binary without the
source. I don't believe we should allow anyone to modify the web2py
framework itself and then make that closed source -- that's an entirely
different issue, and I'm not talking about that.

Anthony


Re: [web2py] Re: manual login-form

2010-12-13 Thread Bruno Rocha
2010/12/13 Branko Vukelic 

> Bruno, is there something like {{=authform.children}} to render all
> the interior without the  tags?


You can get this in this using jQuery notation, web2py has a DOM parser for
HTML tags:
http://web2py.com/book/default/chapter/05#Server-side-DOM-and-Parsing

Look:

create a form

>>> form = SQLFORM(db.auth_user)


get elements using css notation

>>> print form.elements('table')
[]

>>> print form.elements('table input')
[, , , , ]
>>>

>>> print form.elements('table input #auth_user_email')
[]
>>>



or more verbose using indexes:

create a form

>>> form = SQLFORM(db.auth_user)


*Print the whole form*

>>> print form
First name:

..
...


*print the Inner tags*

>>> print form.elements()[1]
First name:

.
.

>>>




-- 

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


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 9:36:37 AM UTC-5, Branko Vukelic wrote: On
Mon, Dec 13, 2010 at 2:43 PM, Anthony  wrote:
> Yes, LGPL (I think) allows the exception to distribute the source
along with
> an application that links/imports the source. I was talking about the
other
> web2py exception, which allows distribution of the binaries without
the
> source at all (i.e., the freeware license for the binaries).
Currently, we
Why? I don't think it would be too much to ask companies to pay for
binary-only bundling. If you can distribute with the sources (meaning
either put sources in the bundle, or offer sources some other way,
mind you), why not? I have absolutely nothing against that. If a
company is not prepared to do that, they should use a closed-source
product that allows this.

I'm not sure what you're asking about here. Thus far there has been
absolutely no mention of requiring payment for binary-only. Currently
the binary-only is free, and Massimo's suggested change keeps it free.
My comments merely assume the status quo (i.e., free binary). My point
was simply that if we want to offer the binaries as freeware, we should
probably describe that as a dual license rather than as a exception to
the GPL/LGPL license (simply for clarity).

Anthony


--
Branko Vukelić
bg.b...@gmail.com
stu...@brankovukelic.com
Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny
Gimp Brushmakers Guild
http://bit.ly/gbg-group

Re: [web2py] Re: manual login-form

2010-12-13 Thread Bruno Rocha
You can use regex.


>>> import re
>>> print form.elements('input',_id=re.compile('auth_\d?'))
[, , , ]


--

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


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 8:38:12 AM UTC-5, Branko Vukelic wrote:
Ok, so I got word from GNU. What they say is that using "imports" the
way Python does is considered creating derivative work, and LGPL would
not, in their view, except the vendor from the obligation to release
their apps under the terms of (L)GPL (which is kinda surprising). As
solution to this they suggested two things:

Sorry, I missed this post. Would you mind sending the exact question
you asked and the full response from GNU? I'm surprised because I would
think a web2py app would qualify as an "Application" or a "Combined
Work" under LGPL:

"An “Application” is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library."

"A “Combined Work” is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the “Linked
Version”.

Re: [web2py] Re: manual login-form

2010-12-13 Thread Bruno Rocha
One more thing:

You can search for elements in your HTML.


>>> print form.elements(find='mail')
[]


or list all elements


for item in form.components: print item


-- 

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


[web2py] Web2py Application Exhibition ( 2 days left! )

2010-12-13 Thread NetAdmin

 Hello All,

 We're in the home stretch!

 The deadline for submissions for the
 Web2py Application Exhibition is December 15th 2010

 You can start submitting and voting for the entries
 for the Web2py Application Exhibition Version 2.0

 To get started, go to the following link...
 http://w2pexhibition.appspot.com/

 There is a sample application entry by Martin Mulone
 that will give you an idea of how to use the
 voting application.

 Many thanks to Martin Mulone for coding the app
 to handle submission and voting!


Re: [web2py] Web2py Application Exhibition ( 2 days left! )

2010-12-13 Thread Bruno Rocha
I am working hard to finish the beta 0.0.0.1 version of my new_datatables
plugin.



2010/12/13 NetAdmin 

>
>  Hello All,
>
>  We're in the home stretch!
>
>  The deadline for submissions for the
>  Web2py Application Exhibition is December 15th 2010
>
>  You can start submitting and voting for the entries
>  for the Web2py Application Exhibition Version 2.0
>
>  To get started, go to the following link...
>  http://w2pexhibition.appspot.com/
>
>  There is a sample application entry by Martin Mulone
>  that will give you an idea of how to use the
>  voting application.
>
>  Many thanks to Martin Mulone for coding the app
>  to handle submission and voting!




-- 

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


[web2py] Re: Socket for bidirectional messaging

2010-12-13 Thread Luther Goh Lu Feng
>From the discussion here
http://groups.google.com/group/web2py/browse_thread/thread/f7e33ec65ae77d48/704e5ff4b6bcd3b3?lnk=gst&q=ape#704e5ff4b6bcd3b3

Someone suggested used oribited: http://orbited.org/

On Dec 13, 7:01 am, gopiballava  wrote:
> Hi,
>
> I'm interested in adding bidirectional messaging via sockets to a
> web2py app that I am developing. Clients will do standard web2py
> database stuff, and they will also be able to do instant messaging
> with other clients
>
> What is the best way to implement this within web2py? A separate sever
> process which does web2py requests to validate user/group membership
> is the first thing that comes to mind, but I'm hoping for something
> more tightly coupled within web2py.
>
> Any suggestions?
>
> Thanks,
>
> gopi.


[web2py] Re: administrator controller

2010-12-13 Thread Christopher Steel
it is literally the same plugin but with a menu item... I was going to
add some more features but had to move on to other projects...

On Dec 13, 2:01 am, mdipierro  wrote:
> can you tell us more? What does it do?
>
> Massimo
>
> On Dec 13, 12:20 am, Christopher Steel  wrote:> Here 
> is the same one, I added a menu item. but I have not touched it
> > in a while
>
> >http://code.google.com/p/uc-admin/
>
> > I would be interested in any updates etc. as well..
>
> > Chris


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

2010-12-13 Thread LightDot
To summarize:
- a python framework licensed under a pure GPLv2 would not allow for a
closed source application development, so Massimo's exception is
crucial for such projects
- changing the license from the current GPLv2 with en exception to the
LGPL brings no improvement
- changing from GPLv2 with an exception to BSD/MIT is not an option.

I also see that the license for the Welcome application has been added
in the default branch (public domain license). That's great, thanks. I
also warmly appreciate Massimo's statements in this thread in regards
to the possibility of individual licensing, should the need arise.

So, it seems that my original questions and our customer's concerns in
regards to licensing were more than valid. I would suggest creating a
separate and prominent LICENSE page with the exact information,
preferably looked over by an experienced lawyer.

If that's possible, of course. I do understand that this entire project
depends on it's community and a lot of work is done here on a purely
volunteer basis.

I would like to emphasise again, our only concern is about the web2py
applications, not the web2py itself. It is not our wish to fork web2py
under any license, nor has anyone approached us with such an idea.

Warm regards to all

[web2py] Re: tags and tag cloud

2010-12-13 Thread Luther Goh Lu Feng


On Dec 13, 5:45 am, Carlos  wrote:
> Hi,
>
> This is not a question specific to web2py, but it's more a generic
> inquiry.
>
> How does 'tags' usually work in a regular website (e.g. for articles/
> blogs)?.
>
> I mean:
>
> Should tags be managed (create/update/delete tags) only by the admin
> or also by end users?.
>
> Should tags be used (tagging specific articles) only by the admin or
> also by end users?.
>

In wordpress, tags are created/managed by the post author and admins,
not the readers.


[web2py] td width with SQLTABLE

2010-12-13 Thread Richard Vézina
Hello,

Is it possible to set td width with SQLTABLE? and if yes how?

Thanks

Richard


[web2py] How to do a list:upload Field?

2010-12-13 Thread Savio Sabino
Have a mode to do this work? Or a other solution?


Re: [web2py] td width with SQLTABLE

2010-12-13 Thread Bruno Rocha
Could be another way, but in controller or view you can do:


>>> table = SQLTABLE(db(db.category.id>0).select())
>>> for td in table.elements('td'): td.attributes['_width']='200px'

>>> print table
category.idcategory.namecategory.created_oncategory.created_bycategory.updated_oncategory.updated_by1Sistema Web2010-12-07 04:31:32None2010-12-07 04:31:32None2Teste2010-12-11 19:13:26None2010-12-11 19:13:26None




2010/12/13 Richard Vézina 

> Hello,
>
> Is it possible to set td width with SQLTABLE? and if yes how?
>
> Thanks
>
> Richard
>



-- 

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


Re: [web2py] How to do a list:upload Field?

2010-12-13 Thread Bruno Rocha
I think it is possible with a custom field and a custom widget.

But, if you need multi file upload there is:
http://web2pyslices.com/main/slices/take_slice/103

2010/12/13 Savio Sabino 

> Have a mode to do this work? Or a other solution?




-- 

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


[web2py] Re: tags and tag cloud

2010-12-13 Thread VP
I think generally there are 2 things: (a) taxonomy and (b) folksonomy.

Taxonomy is a controlled vocabulary which can only be modified/added
by a group of people with special privilege.

Folksonomy, commonly called "tags", is not centrally controlled.
Anyone who can create content and add new terms to the vocabulary.

Taxonomy is more streamlined but requires "experts" to maintain.
Folksonomy can be very rich and users can proliferate the vocabulary
with redundant terms.

Which is better depends on your problem domain and how much effort you
can put in maintaining the vocabulary.  Folksonomy will be richer and
more flexibile.  It seems self-maintained but overtime you will have
to deal with a lot of junk terms.  If you have a large community and
an interesting content, folksonomy is more interesting.



On Dec 12, 3:45 pm, Carlos  wrote:
> Hi,
>
> This is not a question specific to web2py, but it's more a generic
> inquiry.
>
> How does 'tags' usually work in a regular website (e.g. for articles/
> blogs)?.
>
> I mean:
>
> Should tags be managed (create/update/delete tags) only by the admin
> or also by end users?.
>
> Should tags be used (tagging specific articles) only by the admin or
> also by end users?.
>
> And then how to create and manage a "tag cloud"?.
>
> Thanks for your input,
>
>    Carlos


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

2010-12-13 Thread Wikus van de Merwe
Before I dive into analysing the proposed licence changes in detail,
let me remind you one important thing: we are talking here about web
applications. Most of the time these applications are not distributed
as installable software but are deployed on servers. That is, the
distribution does not take place at all, the software is just use on
the server. So let's make this distinction very, very clear here. There
are two scenarios:
1) I write a web app for a client and *use* it (run) on a server
2) I write a web app and *distribute* it to a client so that he can run
it himself

In first scenario, as GPL allows me to *use* the software for any
purpose I can mix it with my proprietary code. Not only the application
code but I can even change the web2py code, as GPL allows me
to *modify* the software to my needs. I don't distribute any of my code
and I'm not required to provide it source code to anyone. This would be
the case only if web2py would be covered by AGPL [1].

In the second scenario, as long as you choose to *distribute* your
code, it has to be released on a GPL compatible terms (note, not a GPL
itself!) as it makes use of GPL modules (web2py). You could argue that
a web application is separated from the framework, but in fact the code
of both is run by the same process and shares several data structures
in memory (see [2-4]). According to GPL this constitutes a derived
work. Note, however, that the code distribution on GPL terms only
happens between me and my client (she gets the freedom to modify and
distribute it under the same license) and I don't have to create a
website and put the application code for everybody in the world to
download.

Yet, web2py does not use the verbatim GPL but adds 2 special exceptions
to it [6]:
1) applications written for web2py are not considered derivative works
as long as they do not share web2py code
2) I can distribute the unmodified web2py binary with my application as
long as it is properly attributed

Now, if for some reason I want to *distribute* my web application to a
client (not *use*/deploy it on a server) in a binary form without
providing the source code (i.e. in a GPL incompatible way) I can do it
because such a special permission from the web2py author have been
granted (and GPL allows such exceptions [7]).

So as you see, the GPL alone as well as the special case of licensing
of web2py and application written for it is quite complex. I believe we
all would benefit from having all this explained in a separate section
of the website, to avoid confusion.

> 1) all web2py/*.py and web2py/gluon/*py files are LPGL

OK, now, how does the LGPL differs from the GPL? It allows a library to
be linked to proprietary applications. It "lessens" the GPL's
requirement of the derivative work to be distributed on GPL compatible
terms. It only requires distribution of the library source code and
permission to link new/modified versions of the library (including
allowance of reverse engineering to debug this) [8]. In essence it
works very similar to current GPL with exceptions.

There are 2 differences though. First, minor, the binary distribution
of LGPL code has to be accompanied with source. Second, major, parts of
the web2py code such as DAL could be used independently on LGPL terms,
while now they are covered by GPL so that non-free derivatives of DAL
are not allowed.

"Proprietary software developers, seeking to deny the free competition
an important advantage, will try to convince authors not to contribute
libraries to the GPL-covered collection. For example, they may appeal
to the ego, promising 'more users for this library' if we let them use
the code in proprietary software products. Popularity is tempting, and
it is easy for a library developer to rationalize the idea that
boosting the popularity of that one library is what the community needs
above all." [9]

"The goal of the GPL is to grant everyone the freedom to copy,
redistribute, understand, and modify a program. If you could
incorporate GPL-covered software into a non-free system, it would have
the effect of making the GPL-covered software non-free too." [10]

And I believe this is a major point in the discussion. Special
privileges for distribution of the application code is one thing, and
allowing proprietary derivative works of the framework itself is
another. To be honest I don't see any benefits of such a licence change.

> 2) all web2py/gluon/contrib/* files are LGPL unless specified
otherwise (MIT or BSD are possible for third party contributions)
> 3) the official web2py binaries for Mac and Windows are freeware
> 4) the scaffolding app is public domain except for images/css/js
files which may have their own licenses.

This is what we currently have, with except to LGPL for files in
contrib, so I guess there is not much to discuss here. As long as
contrib files are optional and their licence is GPL compatible,
everything is fine here. Binaries under the GPL exception are
effectively freeware. An

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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 5:50 PM, Anthony  wrote:
> On Monday, December 13, 2010 8:38:12 AM UTC-5, Branko Vukelic wrote:
> Sorry, I missed this post. Would you mind sending the exact question you
> asked and the full response from GNU? I'm surprised because I would think a
> web2py app would qualify as an "Application" or a "Combined Work" under
> LGPL:

Start verbatim copy -

> On Mon, Dec 13, 2010 at 1:09 PM, ---  wrote:
> > Importing code and sharing namespaces would most probably be creating a
> > derivative work and would need to be licensed under GPLv2 as well.

> Ok, so let me clarify a bit. By importing code, we mean (since this is
> a Python library) that the application framework will execute parts of
> the application, and that the application in turn may execute parts of
> the framework. It is a fact that the application may not execute
> properly without the presence of the framework, but the framework
> authors do not consider applications derivative work because of this.
> Could you please advise on this position?

The answer would be the same. These activities would create a derivative
work.

> Would releasing the framework under the terms of LGPL allow
> proprietary software vendors to

If the goal is to allow proprietary software vendors to do certain
things you should just say so. There are ways of doing this without
harming the free software community. The LGPL isn't recommended in this
case (see: [http://www.gnu.org/licenses/why-not-lgpl.html]).

One way is to dual-license the code. Release the code under a strong
copyleft license such as the GPL and if a company wishes to distribute
it under proprietary terms sell them a copy of the software under a
suitable license. Done right this is a great way of funding the
development of free software. This was everyone always has access to a
copy of the code under a free software license and proprietary software
companies fund your development efforts.

Another way is to Release the code under a strong copyleft license such
as the GPL and to add narrowly defined exceptions which would allow
proprietary software to interact with your software in particular
ways. See:
[http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs]

End verbatim copy -

Judge for yourself if I understood correctly what the guy says.

> "An “Application” is any work that makes use of an interface provided by the
> Library, but which is not otherwise based on the Library. Defining a
> subclass of a class defined by the Library is deemed a mode of using an
> interface provided by the Library."
>
> "A “Combined Work” is a work produced by combining or linking an Application
> with the Library. The particular version of the Library with which the
> Combined Work was made is also called the “Linked Version”.
>

Well, yes. That's exactly why I considered LGPL a good option for us.
But apparently GNU differs on this.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: How to do a list:upload Field?

2010-12-13 Thread Savio Sabino
The best solution to this is a widget to insert multi record of a
referenced table like:

db.define_table('post',
   Field('title'),
   Field('content'))

db.define_table('comment',
   Field('post_id', db.post),
   Field('author'),
   Field('email'),
   Field('body', 'text'))

What I need is a widget to insert multi records of comments on create
and update post form, this is a good solution to multi upload too.


On Dec 13, 5:22 pm, Bruno Rocha  wrote:
> I think it is possible with a custom field and a custom widget.
>
> But, if you need multi file upload there 
> is:http://web2pyslices.com/main/slices/take_slice/103
>
> 2010/12/13 Savio Sabino 
>
> > Have a mode to do this work? Or a other solution?
>
> --
>
> Bruno Rochahttp://about.me/rochacbruno/bio


[web2py] Re: How to do a list:upload Field?

2010-12-13 Thread Savio Sabino
This exists?

On Dec 13, 5:53 pm, Savio Sabino  wrote:
> The best solution to this is a widget to insert multi record of a
> referenced table like:
>
> db.define_table('post',
>    Field('title'),
>    Field('content'))
>
> db.define_table('comment',
>    Field('post_id', db.post),
>    Field('author'),
>    Field('email'),
>    Field('body', 'text'))
>
> What I need is a widget to insert multi records of comments on create
> and update post form, this is a good solution to multi upload too.
>
> On Dec 13, 5:22 pm, Bruno Rocha  wrote:
>
> > I think it is possible with a custom field and a custom widget.
>
> > But, if you need multi file upload there 
> > is:http://web2pyslices.com/main/slices/take_slice/103
>
> > 2010/12/13 Savio Sabino 
>
> > > Have a mode to do this work? Or a other solution?
>
> > --
>
> > Bruno Rochahttp://about.me/rochacbruno/bio


Re: [web2py] td width with SQLTABLE

2010-12-13 Thread Richard Vézina
Thank you!

It works, but my table cells have the same width...

Is SQLTABLE fix the column width base on th width...

I try to give width to TH and TD no success...

I read that TD width is deprecated and should be style: width=200px;
http://www.w3schools.com/tags/att_td_width.asp

Use CSS instead.

CSS syntax: 


Try it too no success...


I am wondering if we can pass col attribute since there is non helpers for
it and SQLTABLE generated table not include col tag...


Richard


On Mon, Dec 13, 2010 at 3:20 PM, Bruno Rocha  wrote:

> Could be another way, but in controller or view you can do:
>
>
> >>> table = SQLTABLE(db(db.category.id>0).select())
> >>> for td in table.elements('td'): td.attributes['_width']='200px'
>
> >>> print table
> category.idcategory.namecategory.created_oncategory.created_bycategory.updated_oncategory.updated_by class="even">1Sistema Web width="200px">2010-12-07 04:31:32None width="200px">2010-12-07 04:31:32None class="odd">2Teste width="200px">2010-12-11 19:13:26None width="200px">2010-12-11 19:13:26 width="200px">None
>
>
>
>
> 2010/12/13 Richard Vézina 
>
> Hello,
>>
>> Is it possible to set td width with SQLTABLE? and if yes how?
>>
>> Thanks
>>
>> Richard
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 9:35 PM, Wikus van de Merwe
 wrote:
> So as you see, the GPL alone as well as the special case of licensing of
> web2py and application written for it is quite complex. I believe we all
> would benefit from having all this explained in a separate section of the
> website, to avoid confusion.

Massimo is not available atm for health reasons, but he has already
considered doing this, and I'm sure he will make it very clear that
web2py is, indeed, dual-licensed.

>> 1) all web2py/*.py and web2py/gluon/*py files are LPGL
> "The goal of the GPL is to grant everyone the freedom to copy, redistribute,
> understand, and modify a program. If you could incorporate GPL-covered
> software into a non-free system, it would have the effect of making the
> GPL-covered software non-free too." [10]
>
> And I believe this is a major point in the discussion. Special privileges
> for distribution of the application code is one thing, and allowing
> proprietary derivative works of the framework itself is another. To be
> honest I don't see any benefits of such a licence change.

Thank you for summing that up. :) I also believe people are missing
the main point here, and that is Massimo is fully commited to the
points above. That is the first reason why he chose GPL as the license
in the first place. To go against the authors' wishes just to change
the license to the one someone feels more comfortable with is unfair
to say the least. As Massimo said once, web2py is not about creating a
mass-consumption framework. There are plenty of those to go around.
His wish is to create a good framework that does its job well, and I
think GPL license can only help that.

> This is what we currently have, with except to LGPL for files in contrib, so
> I guess there is not much to discuss here. As long as contrib files are
> optional and their licence is GPL compatible, everything is fine here.
> Binaries under the GPL exception are effectively freeware. And the template
> app will work best as public domain as the licensing issues won't get in the
> way. It might be good though to explicitly state the permissions (e.g. as in
> CC0 [11])as in some countries such as France, work can't be put into the
> public domain voluntarily.

Again, even the welcome app can be GPL as long as there is an
exception clause similar to the one used for web2py apps. For
instance, if you consider welcome app as part of web2py (because it
uses it to scaffold new applications via the wizard, for instance),
all development on the welcome app should contribute back to upstream,
and GPL ensures this. However, the actual use of the welcome app for
scaffolding your apps can be liberated from the terms of GPL. It all
depends on whether you consider it worthwhile to do that.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] td width with SQLTABLE

2010-12-13 Thread Richard Vézina
Here what I found!!

for th in table.elements('th'): th.attributes['_style']='white-space:nowrap;
'

I thought I could achieve it with width parameter falsely!

Thanks for your hand Bruno.

Richard

On Mon, Dec 13, 2010 at 4:10 PM, Richard Vézina  wrote:

> Thank you!
>
> It works, but my table cells have the same width...
>
> Is SQLTABLE fix the column width base on th width...
>
> I try to give width to TH and TD no success...
>
> I read that TD width is deprecated and should be style: width=200px;
> http://www.w3schools.com/tags/att_td_width.asp
>
> Use CSS instead.
>
> CSS syntax: 
>
>
> Try it too no success...
>
>
> I am wondering if we can pass col attribute since there is non helpers for
> it and SQLTABLE generated table not include col tag...
>
>
> Richard
>
>
> On Mon, Dec 13, 2010 at 3:20 PM, Bruno Rocha wrote:
>
>> Could be another way, but in controller or view you can do:
>>
>>
>> >>> table = SQLTABLE(db(db.category.id>0).select())
>> >>> for td in table.elements('td'): td.attributes['_width']='200px'
>>
>> >>> print table
>> category.idcategory.namecategory.created_oncategory.created_bycategory.updated_oncategory.updated_by> class="even">1Sistema Web> width="200px">2010-12-07 04:31:32None> width="200px">2010-12-07 04:31:32None> class="odd">2Teste> width="200px">2010-12-11 19:13:26None> width="200px">2010-12-11 19:13:26> width="200px">None
>>
>>
>>
>>
>> 2010/12/13 Richard Vézina 
>>
>> Hello,
>>>
>>> Is it possible to set td width with SQLTABLE? and if yes how?
>>>
>>> Thanks
>>>
>>> Richard
>>>
>>
>>
>>
>> --
>>
>> Bruno Rocha
>> http://about.me/rochacbruno/bio
>>
>
>


Re: [web2py] grid

2010-12-13 Thread Richard Vézina
Thank you very much for drawing my attention to this plugin Thadeus

I succeed!

Richard

On Fri, Dec 10, 2010 at 3:58 PM, Thadeus Burgess wrote:

> I really enjoy working with DataTables. It is easy to use and extremely
> configurable!
>
> Not only that, but it can load results from any JSON request, so you can
> handle filtering, ordering, and pagination in your queries on the server.
>
> --
> Thadeus
>
>
>
>
>
> On Fri, Dec 10, 2010 at 9:43 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Here other links fruit of my search for a fixed header and left column
>> jQuery plugin :
>>
>> http://cross-browser.com/x/lib/view.php?s=xlibrary
>>  Other library like
>> jQuery (as far as I understand) seems very rich GPL
>>
>> http://johnsobrepena.blogspot.com/search/label/CoolGridView
>> An other grid
>>
>> Thread on stackoverflow
>> http://stackoverflow.com/questions/673153/html-table-with-fixed-headers
>>
>>
>> http://plugins.jquery.com/project/sfht
>> Chromatable easy to integrate in web2py, nice css, good for table that fit
>> in page width, fixed header
>>
>> http://code.google.com/p/js-scroll-table-header/
>>
>>
>> http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
>> Seems really interresting demo :
>> http://jeromebulanadi.oni.cc/scrollablefixedheader.html
>>
>> http://tablesorter.com/docs/
>>
>>
>> Richard
>>
>>
>>
>>
>>
>>
>> On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha wrote:
>>
>>>
>>> Forget about what I said,
>>>
>>> DataTables is the best one so far!
>>>
>>> http://www.datatables.net/examples/server_side/server_side.html
>>>
>>> I am having a good time with this one, all features in one table plugin.
>>>
>>> This is already in /plugins http://web2py.com/plugins/default/datatable,
>>> but need more documentation, recipes, helpers and more attention.
>>>
>>>
>>>
>>> --
>>>
>>> Bruno Rocha
>>> http://about.me/rochacbruno/bio
>>>
>>
>>
>


Re: [web2py] grid

2010-12-13 Thread Richard Vézina
Hello Bruno,

Where can we get this really nice work!

How did you get it to work with the T() internationalisation of web2py?

Richard

On Mon, Dec 13, 2010 at 2:38 AM, Bruno Rocha  wrote:

>
> The new datatables plugin is almost done!
>
> I am working now on Server Side (Json/XML) data processing and some
> refactoring on plugin API, and test with the new DAL, and test it in GAE.
>
> By this time I have:
>
>- JqueryUI+ThemeRoller
>- Edit Inplace which calls back an ajax URL (see the screenshot)
>- Virtual fields with virtual labels
>- Works with joins
>- Tooltip provided by a special virtual field for row, or by comments
>attribute in table definition for  cells
>- Detail information for rows (can be a detail table) - This is a
>virtual field too.
>- Javascript Injection
>- Pagination with 3 different styles
>- Highlight for rows and columns
>- Row selecting which can call a function
>- Collum hide/show
>- Column reordering
>- Sorting
>- Search global and by field
>- Scrolling X and Y
>- Fixed Header Fixed Column
>- Full i18n provided by T()
>
> Writing server side JS is being the most annoying part of this.
>
> Hope tomorrow I will put it in hg for download.
>
> see the attached screenshot.
>
>
> 2010/12/11 Ivan Matveev 
>
> Wold love to test it with joins.
>>
>
>
>
> --
>
> Bruno Rocha
> http://about.me/rochacbruno/bio
>


[web2py] web2py Chat Problem

2010-12-13 Thread Monbro K
Hey guy,

It depends on a fresh out of the box (chat) installation:
http://web2py.com/appliances/default/show/34

we got some errors while some user is trying to accept an invitation
from one other to one room.

The error message after the path (http://localhost/chat/default/accept/
1) is attached, can someone help us please??

thanks :-)



Traceback (most recent call last):
  File "gluon/restricted.py", line 188, in restricted
  File "/Users/monbro/Downloads/web2py/web2py.app/Contents/Resources/
applications/chat/views/default/index.html", line 78, in 
  File "gluon/sql.py", line 742, in __getattr__
KeyError: 'name'

Frames

*

  File /Users/monbro/Downloads/web2py/web2py.app/Contents/
Resources/gluon/restricted.py in restricted at line 188 code arguments
variables
  Function argument list

  (code='response.write(\'\\n \\n\\n\', escape=False)', environment={'A':
, 'Auth': , 'B':
, 'BEAUTIFY': ,
'BODY': , 'BR': ,
'CENTER': , 'CLEANUP': , 'CODE': ,
'CRYPT': , ...}, layer='/Users/monbro/
Downloads/web2py/web2py.app/Conten...ources/applications/chat/views/
default/index.html')
  Code listing
  Variables
*

  File /Users/monbro/Downloads/web2py/web2py.app/Contents/
Resources/applications/chat/views/default/index.html in  at
line 78 code arguments variables
  Function argument list

  ()
  Code listing

  response.write('\n', escape=False)
  pass
  response.write('\n\n\n\n\n\n\n
Other Rooms\n\n', escape=False)
  for room in otherrooms:
  response.write('\n', escape=False)
  response.write(room.name)

  response.write('\n', escape=False)
  pass
  response.write('\n\n\n\n
Welcome\nThe rooms you've created are listed to
the right, you can also\ncreate new rooms over there. Knock
yourself out.\nInvitations\n\n  ',
escape=False)
  for inv in invites:
  response.write('\n  \n  ', escape=False)
  response.write(inv.sender.username)
  response.write(' @ ', escape=False)
  response.write(inv.posted_on)

  Variables
  File /Users/monbro/Downloads/web2py/web2py.app/Contents/
Resources/gluon/sql.py in __getattr__ at line 742 code arguments
variables

  Function argument list
  (self= at 0x1660beb0>}>,
key='name')


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

2010-12-13 Thread pbreit
Unless there is a move away from GPL, I don't think it's worthwhile to
split hairs on all these intricacies. What is discouraging users
is "GPL" and I don't think adding more exceptions will avoid the
negative perception. If Massimo is married to GPL then there's probably
not much to discuss.


I don't buy that Massimo doesn't care about the number of users. He
promotes the heck out of Web2py. And frameworks benefit greatly from
usage. I also don't understand how GPL helps to "create a good
framework". Does BSD/MIT somehow prevent that?

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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 3:30:17 PM UTC-5, Branko Vukelic wrote:
Start verbatim copy -
> On Mon, Dec 13, 2010 at 1:09 PM, ---  wrote:
> > Importing code and sharing namespaces would most probably be
creating a
> > derivative work and would need to be licensed under GPLv2 as well.
> Ok, so let me clarify a bit. By importing code, we mean (since this is
> a Python library) that the application framework will execute parts of
> the application, and that the application in turn may execute parts of
> the framework. It is a fact that the application may not execute
> properly without the presence of the framework, but the framework
> authors do not consider applications derivative work because of this.
> Could you please advise on this position?
The answer would be the same. These activities would create a derivative
work.
> Would releasing the framework under the terms of LGPL allow
> proprietary software vendors to
If the goal is to allow proprietary software vendors to do certain
things you should just say so. There are ways of doing this without
harming the free software community. The LGPL isn't recommended in this
case (see: [http://www.gnu.org/licenses/why-not-lgpl.html]).
One way is to dual-license the code. Release the code under a strong
copyleft license such as the GPL and if a company wishes to distribute
it under proprietary terms sell them a copy of the software under a
suitable license. Done right this is a great way of funding the
development of free software. This was everyone always has access to a
copy of the code under a free software license and proprietary software
companies fund your development efforts.
Another way is to Release the code under a strong copyleft license such
as the GPL and to add narrowly defined exceptions which would allow
proprietary software to interact with your software in particular
ways. See:
[http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs]
End verbatim copy -
Judge for yourself if I understood correctly what the guy says.

Thanks for investigating that. Reading their FAQ, it seems that GNU
doesn't generally want anyone to use LGPL at all, purely based on
principle. So their response may be more of a preference than a legal
opinion (i.e., even if we could use LGPL, they would prefer we don't).
If a web2py application doesn't count as an "Application" or "Combined
Work" under LGPL, then I don't know what does. In any case, this
discussion has convinced me that if we really want to get this right,
we would probably have to consult an intellectual property attorney
with open source experience. Maybe it's not worth the bother/cost right
now, though.

Anthony


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 3:58:09 PM UTC-5, Branko Vukelic wrote: 
>
> > 1) all web2py/*.py and web2py/gluon/*py files are LPGL
> > "The goal of the GPL is to grant everyone the freedom to copy, 
> redistribute,
> > understand, and modify a program. If you could incorporate GPL-covered
> > software into a non-free system, it would have the effect of making the
> > GPL-covered software non-free too." [10]
> >
> > And I believe this is a major point in the discussion. Special privileges
> > for distribution of the application code is one thing, and allowing
> > proprietary derivative works of the framework itself is another. To be
> > honest I don't see any benefits of such a licence change. 
>
> Thank you for summing that up. :) I also believe people are missing
> the main point here, and that is Massimo is fully commited to the
> points above. That is the first reason why he chose GPL as the license
> in the first place. To go against the authors' wishes just to change
> the license to the one someone feels more comfortable with is unfair
> to say the least. As Massimo said once, web2py is not about creating a
> mass-consumption framework. There are plenty of those to go around.
> His wish is to create a good framework that does its job well, and I
> think GPL license can only help that.
>
 These are good points. It appears that the LGPL would probably be somewhat 
more liberal than the current GPL plus exceptions. The downside is that we 
might not want to allow that extra freedom. The upside is that it might be 
more clear and be perceived as less risky to some, which could promote 
greater usage of the framework. Certainly we don't want to promote more 
usage at all cost, but we don't want to impose unnecessary barriers to 
adoption either. Although the LGPL might allow someone to use all or part of 
web2py within a proprietary system, I don't think it would allow a 
commercial enterprise to modify web2py itself and then release the modified 
framework as a proprietary competitor to web2py, which I think is the 
scenario Massimo really wants to guard against. Ultimately, of course, it is 
up to Massimo to decide how he wants to trade off these various concerns. I 
for one am perfectly happy with the current license, but I'm open to change 
if it would be better for the framework and community as a whole (including 
those not yet part of the community).
 
Anthony


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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 11:46 PM, Anthony  wrote:
> intellectual property attorney with open source experience. Maybe it's not
> worth the bother/cost right now, though.

First, technically, GPL license is totally ok if we look at web2py on
its own. It gets the job done. Releasing web2py under LGPL
accomplishes nothing for the framework that GPL hasn't already. We
were actually discussing applications built to run on top of web2py.
That's covered by the exceptions, and imho, they should be enough. No
change is required, since FSF's suggestions are already implemented.
The only thing that needs to change is to make the exceptions more
prominent (FTR, I haven't seen them before this discussion started.)

On the psychological level, I doubt it would accomplish much in the
way of changing people's perception of 'evilness' of the GPL and its
derivatives (like LGPL). I am more and more convinced of this
observing some of the reactions in this discussion. For those cases, I
don't think there is a straightforward solution, other than
counselling maybe.

Having a concrete need for which GPL+exception poses a _real_ obstacle
(and not 'what if, omg, wtf, bbq' FUD) is one thing. Massimo has
already demonstrated that he is open to custom licensing should the
need arise (and FTR, I think he should charge for it, too, but I also
think he would not). If that is not good enough, then maybe web2py
isn't for them after all.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] grid

2010-12-13 Thread JmiXIII
Hello Bruno!

Seems very fantastic ! I like the in-line editing so much !
I was trying to include most of your features in my own view. Not enough 
skills to make in-line editing...
To my ming your plugin seems much more functionnal to the jquery widget 
provided with plugin_wiki
Looking forward to test it




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

2010-12-13 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 11:33 PM, pbreit  wrote:
> Unless there is a move away from GPL, I don't think it's worthwhile to split

Absolutely. You do not have to discuss the LGPL/GPL licensing issue if
it offends you so much. Especially if you cannot refrain from
name-calling during the process.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] grid

2010-12-13 Thread Bruno Rocha
Even not complete, I'll release this for
http://w2pexhibition.appspot.com/15th December.

Not every functionality will work on this fitst version, but I'd like if you
can help me testing.

In-line editing uses jquery.jeditable, which calls a function in a
controller passing some index information as row_id, column index, actual
value etc. In controller (which you have to specify) you can get the values
in a POST and do whatever you want.

I am thinking in a way to automate the process of update a table cell, it is
easy, but not so safe.

Need test.


Bruno.

2010/12/13 JmiXIII 

> Hello Bruno!
>
> Seems very fantastic ! I like the in-line editing so much !
> I was trying to include most of your features in my own view. Not enough
> skills to make in-line editing...
> To my ming your plugin seems much more functionnal to the jquery widget
> provided with plugin_wiki
> Looking forward to test it
>
>
>


-- 

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


[web2py] Exception during file autodelete

2010-12-13 Thread Kurt Grutzmacher
Using latest web2py trunk.

Upload Field configured for autodelete=True and executing "del
db.t_file_uploads[form.vars.id]" after processing the file:

File "/Users/grutz/src/web2py/gluon/dal.py", line 3696, in __delitem__
elif not str(key).isdigit() or not self._db(self.id ==
key).delete():
  File "/Users/grutz/src/web2py/gluon/dal.py", line 4381, in delete
self.delete_uploaded_files()
  File "/Users/grutz/src/web2py/gluon/dal.py", line 4412, in
delete_uploaded_files
uploadfolder = os.path.join(self.db._folder, '..', 'uploads')
  File "/Users/grutz/src/web2py/gluon/dal.py", line 3329, in
__getattr__
return dict.__getitem__(self,key)
KeyError: '_folder'

FIX: Line 4412 in dal.py should be:

uploadfolder = os.path.join(self.db._adapter.folder, '..', 'uploads')


[web2py] simple db app

2010-12-13 Thread Rick
Hi,

I'm trying to make a data base for storing names and addresses, but
since I'm a n00b then I can't get it working. I've no idea what's
wrong. The problem is that the input function doesn't redirect to the
show function and that the show function doesn't show any data. Here's
the code:

the controller file:
def show():
id=request.vars.id
record=db(db.measure.id==id).select()
return dict(record=record)

def input():
form = SQLFORM(db.addresses)
if form.accepts(request.vars, session):
redirect(URL(r=request, f='show'))
return dict(form=form)

**

and the model file table:

db.define_table('addresses',
 Field('person'),
 Field('adress'))

**

input.html
{{extend 'layout.html'}}
{{=form}}


**

show.html:
{{extend 'layout.html'}}
Addresses
{{for record in record:}}
{{=record.name}} : {{=record.address}}
{{pass}}

**

Thanks in advance for help!


[web2py] Re: simple db app

2010-12-13 Thread Rick Hultgren
http://groups.google.com/group/web2py/browse_thread/thread/b7cd19c53648ef0d

On 12/14/10, Rick  wrote:
> Hi,
>
> I'm trying to make a data base for storing names and addresses, but
> since I'm a n00b then I can't get it working. I've no idea what's
> wrong. The problem is that the input function doesn't redirect to the
> show function and that the show function doesn't show any data. Here's
> the code:
>
> the controller file:
> def show():
>   id=request.vars.id
>   record=db(db.measure.id==id).select()
>   return dict(record=record)
>
> def input():
>   form = SQLFORM(db.addresses)
>   if form.accepts(request.vars, session):
>   redirect(URL(r=request, f='show'))
>   return dict(form=form)
>
> **
>
> and the model file table:
>
> db.define_table('addresses',
>  Field('person'),
>  Field('adress'))
>
> **
>
> input.html
> {{extend 'layout.html'}}
> {{=form}}
>
>
> **
>
> show.html:
> {{extend 'layout.html'}}
> Addresses
> {{for record in record:}}
> {{=record.name}} : {{=record.address}}
> {{pass}}
>
> **
>
> Thanks in advance for help!


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

2010-12-13 Thread Graham Dumpleton


On Tuesday, December 14, 2010 9:46:09 AM UTC+11, Anthony wrote:
>
> On Monday, December 13, 2010 3:30:17 PM UTC-5, Branko Vukelic wrote: 
>
> Start verbatim copy - 
>
> > On Mon, Dec 13, 2010 at 1:09 PM, ---  wrote:
> > > Importing code and sharing namespaces would most probably be creating a
> > > derivative work and would need to be licensed under GPLv2 as well. 
>
> > Ok, so let me clarify a bit. By importing code, we mean (since this is
> > a Python library) that the application framework will execute parts of
> > the application, and that the application in turn may execute parts of
> > the framework. It is a fact that the application may not execute
> > properly without the presence of the framework, but the framework
> > authors do not consider applications derivative work because of this.
> > Could you please advise on this position? 
>
> The answer would be the same. These activities would create a derivative
> work. 
>
> > Would releasing the framework under the terms of LGPL allow
> > proprietary software vendors to 
>
> If the goal is to allow proprietary software vendors to do certain
> things you should just say so. There are ways of doing this without
> harming the free software community. The LGPL isn't recommended in this
> case (see: 
> [http://www.gnu.org/licenses/why-not-lgpl.html]).
>  
>
>
> One way is to dual-license the code. Release the code under a strong
> copyleft license such as the GPL and if a company wishes to distribute
> it under proprietary terms sell them a copy of the software under a
> suitable license. Done right this is a great way of funding the
> development of free software. This was everyone always has access to a
> copy of the code under a free software license and proprietary software
> companies fund your development efforts. 
>
> Another way is to Release the code under a strong copyleft license such
> as the GPL and to add narrowly defined exceptions which would allow
> proprietary software to interact with your software in particular
> ways. See:
> [http://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs] 
>
> End verbatim copy - 
>
> Judge for yourself if I understood correctly what the guy says.
>
> Thanks for investigating that. Reading their FAQ, it seems that GNU doesn't 
> generally want anyone to use LGPL at all, purely based on principle. So 
> their response may be more of a preference than a legal opinion (i.e., even 
> if we could use LGPL, they would prefer we don't). If a web2py application 
> doesn't count as an "Application" or "Combined Work" under LGPL, then I 
> don't know what does. In any case, this discussion has convinced me that if 
> we really want to get this right, we would probably have to consult an 
> intellectual property attorney with open source experience. Maybe it's not 
> worth the bother/cost right now, though.
>

The manner in which the LGPL works when applied to a library actually 
depends to a degree on more than just the function APIs the library may 
expose.

Take C++ for example. You might think that the LGPL on a reusable class 
library would be fine, but technically this may not be the case. The problem 
with C++ is template classes. For these the code implementation is 
effectively in the header files which get included into your application 
code when compiled and the expansion of those templates against types within 
your application ends up as part of your application binary, as opposed to 
it being a part of the library. Thus technically the template code may be 
construed as ending up as part of your application. 

As such, the library API in C++ may not draw a distinct enough line whereby 
that library could then be replaced with a distinct implementation of that 
library and provide the same functionality without reliance on any of the 
prior LGPL code. This being because the LGPL code is a part of your program 
binary still.

Even with the C programming language you might have issues if you were using 
preprocessor macros to do a poor mans version of C++ template.

So, it can depend not only on the specific language being used, but how that 
language is used and how the language is implemented.

The LGPL and how it applies therefore isn't always clear cut and that is 
possibly part of why they have a preference for it not being used.

This is why you always need to have lawyers who have some understanding of 
how programming systems are implemented, or have had sufficient expert 
advice on it, to make judgements and advise you. It is dangerous to simply 
assume that something sounds okay.

Graham


[web2py] Re: simple db app

2010-12-13 Thread pbreit
I would envision something more like this (not tested):

== db.py ==
db.define_table('address', 
Field('person'), 
Field('address'))

== default.py ==
def index(): 
records = db().select(db.address.ALL, orderby=db.address.name)
return dict(records=records) 

def create(): 
form = SQLFORM(table)
if form.accepts(request.post_vars, session):
session.flash = 'Address saved.'
redirect(URL('index'))

== default/index.html ==
{{extend 'layout.html'}} 
Addresses 
{{for record in records:}} 
{{=record.name}} : {{=record.address}} 
{{pass}}
[ {{=A('Add Address', _href=URL('create'))}} ]

== default/create.html ==
{{extend 'layout.html'}} 
{{=form}}


[web2py] Re: Apache wsgi virtualhost configuration for multiple web2py sites

2010-12-13 Thread Vincent
I am interested in a little different setup, I would like
*.example.com to go to the web2py app/folder but be able to specify
other.example.com be served from /var/www/other/

I am having trouble figuring out how to configure Apache virtual host
to do this.

Thanks
Vincent

On Oct 18, 7:07 pm, VP  wrote:
> The way I did this is through Apache, by adding
>
> ServerName domain.com
> ServerAlias *.domain.com
>
> to the web2py configuration section in site-enabled/000-default
>
> Which one is more preferable?  pros and cons?
>
> Thanks.


[web2py] Re: simple db app

2010-12-13 Thread Rick
Thanks for the reply. Unfortunately this code idea gives the same
result as mine.

On Dec 14, 2:51 am, pbreit  wrote:
> I would envision something more like this (not tested):
>
> == db.py ==
> db.define_table('address',
>     Field('person'),
>     Field('address'))
>
> == default.py ==
> def index():
>     records = db().select(db.address.ALL, orderby=db.address.name)
>     return dict(records=records)
>
> def create():
> form = SQLFORM(table)
> if form.accepts(request.post_vars, session):
>     session.flash = 'Address saved.'
>     redirect(URL('index'))
>
> == default/index.html ==
> {{extend 'layout.html'}}
> Addresses
> {{for record in records:}}
> {{=record.name}} : {{=record.address}}
> {{pass}}
> [ {{=A('Add Address', _href=URL('create'))}} ]
>
> == default/create.html ==
> {{extend 'layout.html'}}
> {{=form}}


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 6:18:24 PM UTC-5, Branko Vukelic wrote: 
>
> First, technically, GPL license is totally ok if we look at web2py on
> its own. It gets the job done. Releasing web2py under LGPL
> accomplishes nothing for the framework that GPL hasn't already. 
>
Agreed.
 

> We were actually discussing applications built to run on top of web2py.
> That's covered by the exceptions, and imho, they should be enough. No
> change is required, since FSF's suggestions are already implemented.
>
 
The FSF has a different agenda from people who want to distribute their 
web2py applications closed source. GPL plus exceptions certainly works, but 
apparently it does create an obstacle for some (at least 3 people in this 
thread, and several on reddit, who presumably are representative of some 
segment of the potential user population). Is it worth catering to this 
segment of the population? Perhaps not, but I don't necessarily want to 
dismiss them as in need of counseling. Most other frameworks are indeed 
MIT/BSD, so these people aren't crazy.

> The only thing that needs to change is to make the exceptions more
> prominent (FTR, I haven't seen them before this discussion started.)
>
I would say we might also want to work on the wording. For example, the 
exception for web2py applications simply says:
 
"You can distribute web2py app under any license you like as long they do 
not contain web2py code."
 
First, let's fix the grammar and say "web2py applications". Then, how do we 
define "web2py application", and exactly what does it mean to "contain 
web2py code"? What if you import Auth or Mail? How are plugins treated? 
plugin_wiki? wizard code? A lawyer evaluating this one line exception might 
justifiably be concerned about exactly what it permits and prohibits. 
(There's some more explanation on the Download page in the License section, 
but it's not clear whether that is a legally binding part of the license, or 
just commentary on the license.)
 

> On the psychological level, I doubt it would accomplish much in the
> way of changing people's perception of 'evilness' of the GPL and its
> derivatives (like LGPL).
>
Well, this is an empirical question. Intuition may not be a good guide to 
the answer.
 
Anthony
 
 


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

2010-12-13 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 2:15 AM, Graham Dumpleton
 wrote:
> it being a part of the library. Thus technically the template code may be
> construed as ending up as part of your application.

FSF specifically allows this in LGPL, if I'm not mistaken:

"The object code form of an Application may incorporate material from
a header file that is part of the Library.  You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

   a) Give prominent notice with each copy of the object code that the
   Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the object code with a copy of the GNU GPL and this license
   document."


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


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

2010-12-13 Thread Graham Dumpleton
They may have clarified it then. I am only going by what problems I knew 
came up many many many years ago, ie., early 90s.

Another good example of why lawyers are a good idea. We all often go based 
on possibly out of date recollections. :-)

Graham

On Tuesday, December 14, 2010 2:03:59 PM UTC+11, Branko Vukelic wrote:
>
> On Tue, Dec 14, 2010 at 2:15 AM, Graham Dumpleton
>  wrote:
> > it being a part of the library. Thus technically the template code may be
> > construed as ending up as part of your application.
>
> FSF specifically allows this in LGPL, if I'm not mistaken:
>
> "The object code form of an Application may incorporate material from
> a header file that is part of the Library. You may convey such object
> code under terms of your choice, provided that, if the incorporated
> material is not limited to numerical parameters, data structure
> layouts and accessors, or small macros, inline functions and templates
> (ten or fewer lines in length), you do both of the following:
>
> a) Give prominent notice with each copy of the object code that the
> Library is used in it and that the Library and its use are
> covered by this License.
>
> b) Accompany the object code with a copy of the GNU GPL and this license
> document."
>
>
> -- 
> Branko Vukelić
>
> bg.b...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog: http://www.brankovukelic.com/
> Check out my portfolio: http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca: http://identi.ca/foxbunny
>
> Gimp Brushmakers Guild
> http://bit.ly/gbg-group
>
>

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

2010-12-13 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 4:14 AM, Graham Dumpleton
 wrote:
> They may have clarified it then. I am only going by what problems I knew
> came up many many many years ago, ie., early 90s.

However, web2py is still using GPLv2 :P That ought to be fixed. GPLv3
is both more liberal about some things, and fixes lots of loopholes
from GPLv2, so it's basically 'better', depending on where you come
from, that is.

> Another good example of why lawyers are a good idea. We all often go based
> on possibly out of date recollections. :-)

Well, that's something Massimo's wallet has to decide. :)


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: simple db app

2010-12-13 Thread DenesL
Hi Rick,

On Dec 13, 6:55 pm, Rick  wrote:
> Hi,
>
> I'm trying to make a data base for storing names and addresses, but
> since I'm a n00b then I can't get it working. I've no idea what's
> wrong. The problem is that the input function doesn't redirect to the
> show function and that the show function doesn't show any data. Here's
> the code:
>
> the controller file:
> def show():
>         id=request.vars.id
>         record=db(db.measure.id==id).select()

record=db(db.addresses.id==id).select()

>         return dict(record=record)
>
> def input():
>         form = SQLFORM(db.addresses)
>         if form.accepts(request.vars, session):
>                 redirect(URL(r=request, f='show'))

redirect(URL(r=request, f='show',vars={'id':form.vars.id}))

>         return dict(form=form)
>
> **
>
> and the model file table:
>
> db.define_table('addresses',
>      Field('person'),
>      Field('adress'))

Field('address'))

>
> **
>
> input.html
> {{extend 'layout.html'}}
> {{=form}}
>
> **
>
> show.html:
> {{extend 'layout.html'}}
> Addresses
> {{for record in record:}}
> {{=record.name}} : {{=record.address}}

{{=record.person}} : {{=record.address}}

> {{pass}}
>
> **
>
> Thanks in advance for help!


[web2py] Strange behaviour on SQLFORM update

2010-12-13 Thread Seamon
Hi,

I've just experienced strage behaviour while using SQLFORM to update
records
in MySQL DB. The code is pretty basic (see below), just a little
cookbook application
and this part was ment to edit the recipe. First all seemed ok - the
form was displayed
as specified, but after submitting the changes I kept getting error
like this:
ValueError: invalid literal for int() with base 10: '|1|1|'

Where the |1|1| was clearly connected to the record id. For some
reason the form.accept
was ignored and the whole result from the form submit came in as an
request (so it contained an id
but it was '|1|1|') and that was the problem. Apparently it can be
fixed with some type checking, but
it shouldn't by working like this as far as I know. Any idea why this
happens?


DB Table:
cbook.define_table ('recipe',
Field ('Food_Name','string',length = 40),
Field ('id_author','integer',default = -1),
Field ('creation_date','date'),
Field ('suroviny','text'),#resources
Field ('popis','text'),#info
Field ('postup','text'),  #recipe
Field ('verejny','boolean') #public
)
Code:
def edit_recipe():
if session.authorized:

id = request.vars.id
record=cbook(cbook.recipe.id==id).select()

form = SQLFORM (cbook.recipe,submit_button='Uloz
zmeny',record=record[0],showid=False,fields =
['Food_Name','popis','suroviny','postup','verejny'] )

if form.accepts (request.vars,session):
response.flash = 'Recipe updated'
redirect(URL(r=request,c='recipes',f='edit_recipe',vars =
{'id':id}))

return dict (form=form,id=id)


[web2py] problem with request_reset_password?

2010-12-13 Thread kevski
I snipped a lot of the intermediate stuff out but basically I try to
use the lost_password link on the login page and get the following
traceback. Looking at the sql statement it appears that the parameters
for SET are missing.

from below: Function argument list: (*a=('UPDATE auth_user SET WHERE
auth_user.id=806;',), **b={})

I have a custom auth_user table in that I added some fields.

Other data: I can set a new password by using change_password after
logging in.

Let me know what kind of additional information might help.




Pieces of the traceback information.

***


web2py Version 1.89.5 (2010-11-21 22:12:54)

Error traceback:

Traceback (most recent call last):
  File "gluon/restricted.py", line 188, in restricted
  File "E:/web2py/applications/psc/controllers/default.py", line 55,
in 
  File "gluon/globals.py", line 96, in 
  File "E:/web2py/applications/psc/controllers/default.py", line 34,
in user
  File "gluon/tools.py", line 1038, in __call__
  File "gluon/tools.py", line 1998, in request_reset_password
  File "gluon/sql.py", line 3416, in 
  File "gluon/sql.py", line 3551, in update_record
  File "gluon/sql.py", line 3506, in update
  File "gluon/sql.py", line 965, in 
OperationalError: near "WHERE": syntax error

Error snapshot
Detailed traceback description

* Exception: (near "WHERE":
syntax error)
* Python 2.5.4: E:\web2py\web2py.exe

File E:\web2py\gluon\sql.py in  at line 965
[ code | arguments | variables ]
Function argument list: (*a=('UPDATE auth_user SET WHERE
auth_user.id=806;',), **b={})


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

2010-12-13 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 3:43 AM, Anthony  wrote:
> The FSF has a different agenda from people who want to distribute their
> web2py applications closed source. GPL plus exceptions certainly works, but

However, FSF's agenda also aligns with that of Massimo and some of us,
contributors. We DO go by the spirit in which GPL was created
(incidentally, I also license my open-source code under GPL/LGPLv3
lately). If exception works, than I think it's good enough.

> apparently it does create an obstacle for some (at least 3 people in this
> thread, and several on reddit, who presumably are representative of some
> segment of the potential user population). Is it worth catering to this
> segment of the population? Perhaps not, but I don't necessarily want to
> dismiss them as in need of counseling. Most other frameworks are indeed
> MIT/BSD, so these people aren't crazy.

I don't know about Massimo, but to me, potential user facing a real
trouble would be someone like LightDot, who found Massimo's statements
and the exception good enough. You should also look at others who have
already created commercial applications under the provided terms with
no legal consequence. Perhaps these things are underexposed, but
nevertheless it looks to me like there is a way for people to get
informed and start hacking at their own business.

Rather than just switching licenses, why don't we just help Massimo
clarify what he wanted to convey?

> "You can distribute web2py app under any license you like as long they do
> not contain web2py code."

Yes, but that is not entirely correct. Your application will contain
some scaffolding code. It is extremely important that the scaffolding
code be either liberated from the terms of GPL via an exception. I
think I've already mentioned this early on in this thread.

Anyway, here's the excerpt from the book:

"web2py is open source and released under the GPL2.0 license, but
applications developed with web2py are not subject to any license
constraint. In fact, as long as they do not contain web2py source
code, they are not considered "derivative works". web2py also allows
the developer to bytecode-compile applications and distribute them as
closed source, although they will require web2py to run. The web2py
license includes an exception that allows web developers to ship their
products with original pre-compiled web2py binaries, without the
accompanying source code."

The actual commercial exception clause states the following:

"We allow the redistribution of unmodified binary versions of web2py provided
that they contain a link to the official web2py site.

This means you can redistribute web2py in binary or other closed source form
together with the applications you develop as long as you acknowledge the
author. If you make any modification to web2py you must distribute it together
with the modified source code according to GPLv2.0.

You can distribute web2py app under any license you like as long they do not
contain web2py code."

Maybe something like this would be better (optionally vetted by a lawyer):

"binary version" means byte code version of web2py or your application

"application" or "app" is software that is written specifically to run
on web2py framework

"scaffolding" is a process of setting up the necessary directory
structure and files as the initial state of your application source
code

"template code" includes content in HTML and/or CSS and/or plain text
format, placeholder text, images, and Python and/or JavaScript code to
create the initial state of the application source code

"copyrighted template material" includes images and copyright notices
that appear in template content.

"you" means licensee, and may be an individual or a company

"bundling" means distributing an application along with web2py either
as source code or as binary version in unmodified form

A You hare hereby granted non-exclusive and non-perpetual license to:

1. Freely distribute or modify the template code to create an application.
2. Distribute the application under a license of your choosing for
commercial and/or personal use.
3. Distribute the application as source code and/or as binary version.
4. Bundle the binary version of web2py with your application
5. Deploy your application on a web server, or as a service on an
operating system using either the source code or a binary version of
web2py.

B Following restriction apply to above usage:

1. Your application may not include copyrighted template material.
2. Your application may not include web2py source code in either
modified or unmodified form except under the terms of GNU General
Public license, version 2 or any later version (at your option).
3. If your application includes portions of web2py source code, GNU
General Public License shall apply only to the portions of the source
code described under B/2
4. If you bundle the binary version of web2py, you must clearly note
the current web address (URL) of web2py homepage and keep that
i

[web2py] Re: simple db app

2010-12-13 Thread pbreit
Oops, I made same error.

{{=record.name}} : {{=record.address}}

should be

{{=record.p erson}} : {{=record.address}}

Not to sound like your mother but there were a lot of little errors like 
that in the original code. You have to be *extremely* careful about the 
details.

Denes' reply may be better.


[web2py] Simple debugger

2010-12-13 Thread Bruno Rocha
Hi,

Im here to share a little and simple tip that I use everyday for debug my
apps.

I do not use IDE's, sometimes Komodo Edit, but most of the time I am using
VIM and Emacs.

My debugger is the shell, I am always printing results to see in shell, and
I think it is productive and useful.

to help that I figure out the simple function.

At model defined:


#debugger
def dbg(*attributes):
print '---\n'
print attributes
while not raw_input('\nPRESS TO CONTINUE\n'):
break


So when I want to debug some part of my code I do per example:


for row in rows:
dbg(row)

for i,c in enumerate(rows.colnames):
   dbg(i, db[c].label, db[c].represent)


It is a simple print statement, but the advantage is that it expects a
keyBoard entry to continue the flow, at this pause I can analyse the
values.'

Someone else has any debug tip or advice for sharing?


-- 

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


Re: [web2py] Simple debugger

2010-12-13 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 5:45 AM, Bruno Rocha  wrote:
> Someone else has any debug tip or advice for sharing?

I used this: http://pypi.python.org/pypi/ipdb

All the IPython goodness + pdb-style debugging. You get auto-complete
and command history, too. ;)


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: Simple debugger

2010-12-13 Thread weheh
I want to go to Eclipse but didn't succeed in getting it to install &
run the first time through.

On Dec 14, 12:13 am, Branko Vukelic  wrote:
> On Tue, Dec 14, 2010 at 5:45 AM, Bruno Rocha  wrote:
> > Someone else has any debug tip or advice for sharing?
>
> I used this:http://pypi.python.org/pypi/ipdb
>
> All the IPython goodness + pdb-style debugging. You get auto-complete
> and command history, too. ;)
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 10:52:20 PM UTC-5, Branko Vukelic wrote: 
>
> On Tue, Dec 14, 2010 at 3:43 AM, Anthony  wrote:
> > The FSF has a different agenda from people who want to distribute their
> > web2py applications closed source. GPL plus exceptions certainly works, 
> but 
>
> However, FSF's agenda also aligns with that of Massimo and some of us,
> contributors. We DO go by the spirit in which GPL was created
> (incidentally, I also license my open-source code under GPL/LGPLv3
> lately). If exception works, than I think it's good enough.
>
Yes, we're agreed on how we would like the _framework_ to be licensed -- GPL 
is great for that. The issue is how best to make it clear (both legally and 
in terms of marketing) that web2py _applications_ can be released under any 
license (including closed source). I think Massimo and most others are 
comfortable allowing developers to do what they want with their own 
applications. Empirically, I don't think we have a handle on the extent to 
which the current license might be a hindrance, or whether any reasonable 
alternative (LGPL?) would actually help.

> Rather than just switching licenses, why don't we just help Massimo
> clarify what he wanted to convey?
>
Sounds good. Though ideally we would get some expert advice at some point.
 
Anthony


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

2010-12-13 Thread Anthony
On Monday, December 13, 2010 10:17:39 PM UTC-5, Branko Vukelic wrote: 
>
> On Tue, Dec 14, 2010 at 4:14 AM, Graham Dumpleton 
>
> > Another good example of why lawyers are a good idea. We all often go 
> based
> > on possibly out of date recollections. :-) 
>
> Well, that's something Massimo's wallet has to decide. :)
>
Or the community could pitch in. :)
 


[web2py] Escape JSON vars without escaping JSON control characters

2010-12-13 Thread spiffytech
I'm fetching data from my database, converting it to JSON with
simplejson.dumps(), then passing it to my view to include in my
Javascript. I need to escape the JSON vars to prevent XSS attacks
without escaping all of the brackets, braces, and quotes that make
JSON work.

How can I do this? What I've attempted so far results in either the
entire JSON string being escaped, or none of it. I've hacked together
a loop that generates and prints the JSON one variable, but that's
pretty fragile and kludgy solution. Surely there's a better way?


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

2010-12-13 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 6:55 AM, Anthony  wrote:
> Sounds good. Though ideally we would get some expert advice at some point.

Agreed.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] More DAL examples missing?

2010-12-13 Thread pbreit
The Examples page (http://web2py.com/examples/default/examples) includes a 
link to "more DAL examples" (http://web2py.com/examples/default/dal) which 
errors "invalid function".