[web2py] Re: Unable to create application on WebFaction

2010-12-12 Thread annet
Hi Dave,

To workaround this problem I always create an application using ssh.

[mydom...@webxx ~]$ cd webapps/web2py/web2py/applications/
[mydom...@webxx applications]$ mkdir base


And then upload and install the packed web2py application via the web
interface and rename it to match the name of the directory I manually
created.

Don't forget to check the overwrite installed app check box.


Kind regards,

Annet


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

2010-12-12 Thread pbreit
 1. GPL is more objectionable than BSD/MIT

 Both GPL and BSD are not well suited to template code, that's the
point.



So which one would you suggest?


 2. Frameworks tend not to use GPL

 So?



So if many/most other frameworks do not use GPL, maybe not using GPL is
worth considering for the Web2py framework. That seems a reasonable
conclusion or at least a basis for consideration.

[web2py] Re: Many to Many on GAE

2010-12-12 Thread Arun K.Rajeevan
Thank you for reply.

My problem is,
I have problem in choosing one approach over other.
1) Use a mapping table
2) Or use list reference.

My tables are something like this:
Table :Picture  Word

Word: Coffee: Picture: Both the picture below represent word coffee.
(ie., for one word many pictures)




Similarly this picture can also mean black cofee (ie., for one picture
many words)




Obviously, I never have to render a form as in person- dog example
(preson: a textbox, dog:as a list).







Any advise on traditional methods v/s list reference?

[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread Michael McGinnis
Yes, we ought to standardize on www or non-www, but as GoldenTiger
implied earlier, the Google Page Rank displayed in toolbars and tools
has little relationship to the numbers that Google actually uses to
rank pages. Seomoz is a great resource.

On Dec 11, 8:41 am, GoldenTiger goldenboy...@gmail.com wrote:
 Yes, there are a few links like that. In fact, the links with higher
 PR.

 Check all internal pagerank onhttp://www.internalrank.com

 http://www.web2py.com/examples/default/download  is PR= 
 5http://web2py.com/examples/default/download    is PR= 5

 Two links above should be one, so PR could be higher

 On 11 dic, 12:42, Martin.Mulone mulone.mar...@gmail.com wrote:







  There are some links in menu, that point to ex: web2py.com/book, in
  web2py mainsite. Perhaps we need to change towww.web2py.com.


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

2010-12-12 Thread LightDot
I was a bit at odds when I saw a framework with a GPL v2 license that
claims that the developed code doesn't need to be GPL v2 compatible.

Has this scenario been looked over by a lawyer? Any such document would
enable us to put customers at ease.

We have used CakePHP for our PHP projects for years now and license was
never an issue (MIT license). But with web2py, customers always bring
this up when the application needs to be closed source. And there isn't
much we can tell them other than they should read the site and decide
for themselves.

[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread GoldenTiger
SeoMoz has his own rank: the MozRank, based only on incoming links,
and maybe more accurate, but only for main domain.
Mozrank and pagerank usually have near values



On 12 dic, 10:19, Michael McGinnis ish...@biographiks.com wrote:
 Yes, we ought to standardize on www or non-www, but as GoldenTiger
 implied earlier, the Google Page Rank displayed in toolbars and tools
 has little relationship to the numbers that Google actually uses to
 rank pages. Seomoz is a great resource.

 On Dec 11, 8:41 am, GoldenTiger goldenboy...@gmail.com wrote:

  Yes, there are a few links like that. In fact, the links with higher
  PR.

  Check all internal pagerank onhttp://www.internalrank.com

 http://www.web2py.com/examples/default/download is PR= 
 5http://web2py.com/examples/default/download   is PR= 5

  Two links above should be one, so PR could be higher

  On 11 dic, 12:42, Martin.Mulone mulone.mar...@gmail.com wrote:

   There are some links in menu, that point to ex: web2py.com/book, in
   web2py mainsite. Perhaps we need to change towww.web2py.com.




[web2py] Re: User login in jquery colorbox

2010-12-12 Thread pk
how can i trap the submit button in this form?
but in my view there is only {{=form}}

peter



On 12 Dez., 00:59, pk peter.kirch...@youngdesigners.de wrote:
 thanks for your help,
 but i am a beginner of web2py :(
 can i send you perhaps my app and you tell me
 what i have exactly to do?
 that would be nice.

 thanks peter

 On 11 Dez., 20:01, Branko Vukelic bg.bra...@gmail.com wrote:







  Some more detail on how to do this:

  Instea of submitting the form, you can trap the onSubmit event,
  capture the data from the form, and send it manually using a $.post()
  call. You can specify a callback function in the $.post() call, and
  then use window.location.replace()[1] to do the redirect.

  [1]http://programming.top54u.com/Samples/Javascript/Location-Object/Loca...

  On Sat, Dec 11, 2010 at 7:58 PM, Branko Vukelic bg.bra...@gmail.com wrote:
   Yes exactly. The login should wait for a return value, and do the
   redirect itself. The server side should issue a redirect only if it
   knows it's not an ajax request.

   On Sat, Dec 11, 2010 at 5:45 PM, Luther Goh Lu Feng elf...@yahoo.com 
   wrote:
   Yes, you are clearer now. I don't know the answer but maybe your login
   should be an ajax submission using jquery's ajax calls. Maybe someone
   with more experience can help.

   On Dec 12, 12:34 am, pk peter.kirch...@youngdesigners.de wrote:
   hi,
   here are the pix. the 
   loginview:http://www.hs-augsburg.de/~pk/pix/login.png

   after the user submit a redirect works in the 
   colorbox:http://www.hs-augsburg.de/~pk/pix/redirect.png

   but this redirect should not be shown in the colorbox!
   i hop it is clearer?

   thanks peter

   On 11 Dez., 17:29, Luther Goh Lu Feng elf...@yahoo.com wrote:

I would love to help you but I am afraid that I have difficulty
understanding your problem. If words fail perhaps some screenshots to
tinypic.com can help make your question clearer?

On Dec 11, 11:33 pm, pk peter.kirch...@youngdesigners.de wrote:

 Hi together,

 it works fine to display the login formular in my jquery colorbox.
 but now i have a question. if user login successfully, i get a 
 refresh
 to
 the userpage in the little colorbox. but i will close the colorbox
 before
 refreshing with this js-command: $.colorbox.close()

 have anybody an idea to solve my problem?

 thanks
 peter

   --
   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 Guildhttp://bit.ly/gbg-group


[web2py] Re: Unable to create application on WebFaction

2010-12-12 Thread Dave
Thank you Annet.

I used ssh to create an application directory as you indicated. web2py
created an empty application stub when it recognized the new directory
in webapps/web2py/web2py/applications.

I then tried to pack the welcome application via the web interface
pack all button, but could not: Internal error.

Ideas?
And why is this occurring at all? This seems to be a larger problem
than just not being able to use the create app buttons in the web
interface.

Dave



On Dec 12, 3:45 am, annet annet.verm...@gmail.com wrote:
 Hi Dave,

 To workaround this problem I always create an application using ssh.

 [mydom...@webxx ~]$ cd webapps/web2py/web2py/applications/
 [mydom...@webxx applications]$ mkdir base

 And then upload and install the packed web2py application via the web
 interface and rename it to match the name of the directory I manually
 created.

 Don't forget to check the overwrite installed app check box.

 Kind regards,

 Annet


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

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 9:51 AM, pbreit pbreitenb...@gmail.com wrote:
 1. GPL is more objectionable than BSD/MIT

 Both GPL and BSD are not well suited to template code, that's the point.

 So which one would you suggest?

It's already been suggested (with a minor wording problem). Look at
the other posts in the topic..

 2. Frameworks tend not to use GPL

 So?

 So if many/most other frameworks do not use GPL, maybe not using GPL is
 worth considering for the Web2py framework. That seems a reasonable
 conclusion or at least a basis for consideration.

Well, most people use PHP. Shall we consider using PHP then? ;)

-- 
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-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 11:09 AM, LightDot light...@gmail.com wrote:
 Has this scenario been looked over by a lawyer? Any such document would
 enable us to put customers at ease.

It's a no brainer. The license covers the platform, not the code
written _using_ that platform. It's not like Microsoft EULA and other
commercial user licenses that also cover what you can produce on the
platform, mind you. GPL strictly covers the code that you have
_received_ not the one you've produced yourself.

GPL is only relevant in cases where the code you've produces contains
the code directly taken from the platform (and that's what we've been
discussing here). For example, if welcome app were GPL (and it's not),
you'd be forced to release your work as GPL unless you removed
significant portions of the welcome app from your own application (and
'significant' depends on jurisdiction). However, according to Massimo,
welcome app is _not_ GPL, so you don't have a problem with this. The
only problem with the welcome app is that it's 'public domain', which
is a concept that may not apply in all jurisdictions (especially
outside US). Despite that, rest assured that the author of the welcome
app will not sue your clients. ;)


-- 
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-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 2:03 PM, Branko Vukelic bg.bra...@gmail.com wrote:
 platform, mind you. GPL strictly covers the code that you have
 _received_ not the one you've produced yourself.

Speaking of which, many developers use Linux, and many more sites are
served off Linux boxes. And Linux is GPL. And that doesn't seem to
bother anyone, right?


-- 
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: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread GoldenTiger
I just saw Revision b6d1599cd0: changed links from web2py.com to
www.web2py.com

That is not the solution. No needs for changing links manually.
The solution is the 301 redirect -- 
http://en.wikipedia.org/wiki/URL_redirection

With a meta redirect the page with the redirect issues a 200 OK status
and some other mechanism moves the browser over to the new URL. With a
200 OK on both pages, the search engine wants to index both the start
page and the target page
The 301 redirect simply issues a Permanently Moved message in the HTTP
header which tells the search engine to only index the target URL.

Actually if you go to http://web2py.com/*, you are NOT redirected to
http://www.web2py.com/*

I have 301 redirect well done on http://web2py.es  --- you are
redirected to http://www.web2py.es automatically. Therefore no needs
for changing manually.

this is my .htaccess:
-
AddHandler fcgid-script .fcgi
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^web2py\.es$ [NC]
RewriteRule ^(.*)$ http://www.web2py.es/$1 [R=301,L]
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]





[web2py] Re: Unable to create application on WebFaction

2010-12-12 Thread Dave
To follow up, I tried this again and had some success:

1. Created 'myApp' test directory using ssh session, in 'webapps/
web2py/web2py/applications/'
Note that it appears on the 'Installed Applications' page in the admin
web interface, but clicking the 'edit' button reveals an empty app.
2. Using web2py running locally on my laptop, I successfully packaged
the welcome application using the admin web interface. Saved package
file locally.
3. Then in admin interface for web2py on webfaction, I used 'Upload 
install packed application' as directed by annet:
   Application name: myApp
   Upload a package: [used Browse to select the package saved in step
2]
   overwrite installed app: selected
  Clicked Install and the packaged myApp app was installed.

Now clicking edit for the myApp application shows that it is a
complete app copied from the welcome app.

So thank you Annet. I do not understand the reason for the problem,
but at least there is a workaround.

Dave


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

2010-12-12 Thread Anthony
On Saturday, December 11, 2010 11:37:23 PM UTC-5, Branko Vukelic wrote:
I think it's better to just remove the favicon. Having a default logo
is just as bad as having a web2py logo.

Agreed. I think the reason so many sites end up using the web2py
favicon is because they don't even think about changing or removing the
default. I think the most sensible default is probably simply no
favicon at all (the browser already has its own default).

Anthony

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

2010-12-12 Thread Michele Comitini
Please keep GPL on the framework, web2py is not backed by a single
commercial company, it is free!

I think that it would be much better that templates and static files
of welcome app (and admin app?) must be distributed with
a more liberal license.

We should eventually ask suggestions to FSF.

mic

2010/12/12 Anthony abasta...@gmail.com:

 On Saturday, December 11, 2010 11:37:23 PM UTC-5, Branko Vukelic wrote:

 I think it's better to just remove the favicon. Having a default logo
 is just as bad as having a web2py logo.


 Agreed. I think the reason so many sites end up using the web2py favicon is
 because they don't even think about changing or removing the default. I
 think the most sensible default is probably simply no favicon at all (the
 browser already has its own default).

 Anthony


Re: [web2py] Re: BUTTON helper

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 8:55 AM, weheh richard_gor...@verizon.net wrote:
 To be more explicit, I think BUTTON is good for newbies -- it's just
 so obvious and convenient. Now TAG.BUTTON ... yes, I like TAG, but I'm
 not used to thinking about it. I guess that makes me a newbie, still.

STRONG helper is also missing, btw.

-- 
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] BUTTON helper

2010-12-12 Thread Branko Vukelic
Not the same as button. Buttons are easier to style in general, and
there's a good reason why it's used instead of input type=submit /
or input type=button /.

Also, button can wrap HTML, which is another reason why it's loved
among fronted designers. :)

On Sun, Dec 12, 2010 at 6:41 AM, Bruno Rocha rochacbr...@gmail.com wrote:
 INPUT(_type='button',_value='Click here', _onclick='javascript:alert(button
 clicked)')   ?

 2010/12/12 weheh richard_gor...@verizon.net

 I know this has come up before, but I found myself wondering why
 web2py doesn't have a BUTTON helper? Sure seems like it would be
 useful, backwards compatible and consistent.


 --

 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: help needed with db table indexing within SQLFORM.factory

2010-12-12 Thread DenesL

form=SQLFORM.factory(db.mytable, record=db.mytable[row])

but why not simply
form=SQLFORM(db.mytable, rowid)
?


On Dec 12, 12:37 am, weheh richard_gor...@verizon.net wrote:
 I neglected to mention that I also have a requires:

   db.mytable.groups.requires=IS_IN_DB(db,'groups.id','%
 (name)s',multiple=True)


Re: [web2py] anybody use the web2py IRC chat?

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 8:48 AM, weheh richard_gor...@verizon.net wrote:
 Just curious. I don't use it, but I probably would if I thought I
 could get a fast response from an expert.

Don't worry, you'll get answers here fast enough.

-- 
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-12 Thread LightDot
Companies don't really care if I tell them that it's a no brainer, they
look at this issues trough the eyes of a business risk and consult
lawyers to minimize them. There are some who get cold feet when they
see GPL but can live with MIT or BSD.

Don't know if the analogy of linux OS / webservers completely applys
here. I'm writing this from a laptop running Fedora 14 and we run
CentOS on all our severs, but web2py application and it's relation to
web2py could be a different thing.

Nego, srdačan pozdrav iz Šapca :)


On Sunday, December 12, 2010 2:03:32 PM UTC+1, Branko Vukelic wrote:
It's a no brainer. The license covers the platform, not the code
written _using_ that platform. It's not like Microsoft EULA and other
commercial user licenses that also cover what you can produce on the
platform, mind you. GPL strictly covers the code that you have
_received_ not the one you've produced yourself.
It's a no brainer. The license covers the platform, not the code

GPL is only relevant in cases where the code you've produces contains
the code directly taken from the platform (and that's what we've been
discussing here). For example, if welcome app were GPL (and it's not),
you'd be forced to release your work as GPL unless you removed
significant portions of the welcome app from your own application (and
'significant' depends on jurisdiction). However, according to Massimo,
welcome app is _not_ GPL, so you don't have a problem with this. The
only problem with the welcome app is that it's 'public domain', which
is a concept that may not apply in all jurisdictions (especially
outside US). Despite that, rest assured that the author of the welcome
app will not sue your clients. ;)


--
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

[web2py] Re: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread Carlos
Hi Massimo,

What do you mean?, that shows the same result (with repeated 'one'
data) in the SQLTABLE, doesn't it?.

Thanks,

   Carlos


On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:
 You can do, for example:

 rows =
 db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many 
 .yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

 On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:







  Hi,

  I need to show a SQLTABLE with joined data but without repeated
  information (like grouping but showing all rows).

  Let's say I have the following model:

          db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
  format='%(aa)s')
          db.define_table('many', Field('one', 'reference one'), Field('xx'),
  Field('yy'), Field('zz'))

  And the following function:

          def join():
              rows = db(db.one.id==db.many.one).select()
              return dict(rows=rows)

  This shows all rows correctly but with repeated data for 'one':

  many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
  one.cc
  1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
  2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
  3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
  4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
  5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

  How can I show this same view (with the same number of rows) but only
  showing the 'one' data once (for the first occurrence) as follows?.

  many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
  one.cc
  1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
  2       a1      a1_x2   a1_y2   a1_z2   2
  3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
  4       a2      a2_x2   a2_y2   a2_z2   3
  5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

  Note the empty spaces in order to show the 'one' data once only (on
  first occurrence).

  Thanks,

     Carlos


[web2py] Re: BUTTON helper

2010-12-12 Thread DenesL

You can always set it in a model as
BUTTON=TAG.BUTTON

and then use it in your controllers and views.

On Dec 12, 2:55 am, weheh richard_gor...@verizon.net wrote:
 To be more explicit, I think BUTTON is good for newbies -- it's just
 so obvious and convenient. Now TAG.BUTTON ... yes, I like TAG, but I'm
 not used to thinking about it. I guess that makes me a newbie, still.


[web2py] Re: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread DenesL

Hi Carlos,

inside the select you can specify which fields to bring back, I think
you want:

rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)


On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:
 Hi Massimo,

 What do you mean?, that shows the same result (with repeated 'one'
 data) in the SQLTABLE, doesn't it?.

 Thanks,

    Carlos

 On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:

  You can do, for example:

  rows =
  db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many 
  .yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

  On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:

   Hi,

   I need to show a SQLTABLE with joined data but without repeated
   information (like grouping but showing all rows).

   Let's say I have the following model:

           db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
   format='%(aa)s')
           db.define_table('many', Field('one', 'reference one'), 
   Field('xx'),
   Field('yy'), Field('zz'))

   And the following function:

           def join():
               rows = db(db.one.id==db.many.one).select()
               return dict(rows=rows)

   This shows all rows correctly but with repeated data for 'one':

   many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
   one.cc
   1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
   2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
   3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
   4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
   5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

   How can I show this same view (with the same number of rows) but only
   showing the 'one' data once (for the first occurrence) as follows?.

   many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
   one.cc
   1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
   2       a1      a1_x2   a1_y2   a1_z2   2
   3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
   4       a2      a2_x2   a2_y2   a2_z2   3
   5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

   Note the empty spaces in order to show the 'one' data once only (on
   first occurrence).

   Thanks,

      Carlos




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

2010-12-12 Thread pbreit
The disadvantages of GPL are somewhat clear.


Are there any advantages of GPL (with respect to frameworks)?

[web2py] Re: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread Carlos
Hi Denes,

That's clear to me, my question is not about getting the data (I got
it ok), but instead showing the data in an html table (SQLTABLE) with
unique (no repeated) one data, as per my examples above.

Maybe I'm not explaining clearly? - sorry :-)

Thanks!,

   Carlos


On Dec 12, 9:41 am, DenesL denes1...@yahoo.ca wrote:
 Hi Carlos,

 inside the select you can specify which fields to bring back, I think
 you want:

 rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
 db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)

 On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:







  Hi Massimo,

  What do you mean?, that shows the same result (with repeated 'one'
  data) in the SQLTABLE, doesn't it?.

  Thanks,

     Carlos

  On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:

   You can do, for example:

   rows =
   db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many
.yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

   On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:

Hi,

I need to show a SQLTABLE with joined data but without repeated
information (like grouping but showing all rows).

Let's say I have the following model:

        db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
format='%(aa)s')
        db.define_table('many', Field('one', 'reference one'), 
Field('xx'),
Field('yy'), Field('zz'))

And the following function:

        def join():
            rows = db(db.one.id==db.many.one).select()
            return dict(rows=rows)

This shows all rows correctly but with repeated data for 'one':

many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
one.cc
1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

How can I show this same view (with the same number of rows) but only
showing the 'one' data once (for the first occurrence) as follows?.

many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
one.cc
1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
2       a1      a1_x2   a1_y2   a1_z2   2
3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
4       a2      a2_x2   a2_y2   a2_z2   3
5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

Note the empty spaces in order to show the 'one' data once only (on
first occurrence).

Thanks,

   Carlos


[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread ma...@rockiger.com
+1


PageRank is dying and not what Google really uses.


The www.web2py.com vs web2py.com is a non issue from a search engine
perspective.
You can tell Google Webmaster Tools that web2py.com == www.web2py.com.

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

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 5:08 PM, pbreit pbreitenb...@gmail.com wrote:
 Are there any advantages of GPL (with respect to frameworks)?

It depends.

-- 
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: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread rochacbruno
Carlos, the only solution I see is using a virtual field, or removing repeats 
in Java Scripts.

Enviado via iPhone

Em 12/12/2010, às 14:17, Carlos carlosgali...@gmail.com escreveu:

 Hi Denes,
 
 That's clear to me, my question is not about getting the data (I got
 it ok), but instead showing the data in an html table (SQLTABLE) with
 unique (no repeated) one data, as per my examples above.
 
 Maybe I'm not explaining clearly? - sorry :-)
 
 Thanks!,
 
   Carlos
 
 
 On Dec 12, 9:41 am, DenesL denes1...@yahoo.ca wrote:
 Hi Carlos,
 
 inside the select you can specify which fields to bring back, I think
 you want:
 
 rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
 db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)
 
 On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:
 
 
 
 
 
 
 
 Hi Massimo,
 
 What do you mean?, that shows the same result (with repeated 'one'
 data) in the SQLTABLE, doesn't it?.
 
 Thanks,
 
Carlos
 
 On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:
 
 You can do, for example:
 
 rows =
 db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many
  .yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)
 
 On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:
 
 Hi,
 
 I need to show a SQLTABLE with joined data but without repeated
 information (like grouping but showing all rows).
 
 Let's say I have the following model:
 
 db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
 format='%(aa)s')
 db.define_table('many', Field('one', 'reference one'), 
 Field('xx'),
 Field('yy'), Field('zz'))
 
 And the following function:
 
 def join():
 rows = db(db.one.id==db.many.one).select()
 return dict(rows=rows)
 
 This shows all rows correctly but with repeated data for 'one':
 
 many.id many.onemany.xx many.yy many.zz one.id  one.aa  one.bb  
 one.cc
 1   a1  a1_x1   a1_y1   a1_z1   2   a1  b1  c1
 2   a1  a1_x2   a1_y2   a1_z2   2   a1  b1  c1
 3   a2  a2_x1   a2_y1   a2_z1   3   a2  b2  c2
 4   a2  a2_x2   a2_y2   a2_z2   3   a2  b2  c2
 5   a3  a3_x1   a3_y1   a3_z1   4   a3  b3  c3
 
 How can I show this same view (with the same number of rows) but only
 showing the 'one' data once (for the first occurrence) as follows?.
 
 many.id many.onemany.xx many.yy many.zz one.id  one.aa  one.bb  
 one.cc
 1   a1  a1_x1   a1_y1   a1_z1   2   a1  b1  c1
 2   a1  a1_x2   a1_y2   a1_z2   2
 3   a2  a2_x1   a2_y1   a2_z1   3   a2  b2  c2
 4   a2  a2_x2   a2_y2   a2_z2   3
 5   a3  a3_x1   a3_y1   a3_z1   4   a3  b3  c3
 
 Note the empty spaces in order to show the 'one' data once only (on
 first occurrence).
 
 Thanks,
 
Carlos


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

2010-12-12 Thread mdipierro
It prevents a group of individuals or a company to make a better
closed source derivative, and screw the original project.

In my experience, MIT/BSD projects tend to be smaller, fragmented and
with a lot of incompatible forks when compared with GPL projects. Of
course there are exceptions.

Massimo

On Dec 12, 10:08 am, pbreit pbreitenb...@gmail.com wrote:
 The disadvantages of GPL are somewhat clear.

 Are there any advantages of GPL (with respect to frameworks)?


Re: [web2py] Re: Accessing filename from upload field in onvalidation call

2010-12-12 Thread G. Clifford Williams
Thanks Massimo, Mr. Freeze and Weheh. In the end I just used 
form.vars.file.file.read(15) to make sure it was a SQLite file to begine with. 
At first I'd neglected to followup with a form.vars.file.file.seek(0) to reset 
the read position in the file. It's pretty important to remember that piece


Thanks again.

On Sun, Dec 05, 2010 at 06:22:54PM -0800, mdipierro spake:
 from python you can read the file content with
 form.vars.file.file.read()
 
 On Dec 5, 8:16 pm, mr.freeze nat...@freezable.com wrote:
  Onvalidation is called before the file is stored on disk. You can
  define a custom_store method on the field to control how and where it
  is stored. I don't know of a way to open the file with sqlite from the
  cgi FieldStorage object form.vars.file.
 
  On Dec 5, 7:11 pm, G. Clifford Williams g...@notadiscussion.com
  wrote:
 
   I have a project that requires users to upload transaction files. These 
   files
   are sqlite databases created with a desktop application. I'm trying to 
   figure
   out a way to ensure that the files uploaded by the various users are 
   infact
   valid transaction files from the proper version of the appropriate 
   application.
   Since they are sqlite3 this _should_ be pretty easy with Python.
 
   I've crated an onvalidation function that can pass off parameters to 
   another
   function that checks for the appropriate fields in the transaction file. 
   The
   problem is that I can't seem to get the name of the uploaded file as a 
   string
   that I can pass along to transaction_test().
 
   My question(s):
       How can I access the name of the file (as stored on disk)?
       Is the name of the file only accessible after the form has been 
   accepted?
 
   model:
   ...
   db.define_table('transaction',
       Field('property', 'string',
           requires=IS_MATCH('^[\w.-]{2,32}$',
               error_message = 'Invalid characters')),
       Field('owner', db.auth_user, default=auth.user_id,
           readable=False, writable=False,),
       Field('visibility', 'boolean', label='List publicly', default=True),
       Field('description', 'text'),
       Field('created_on', 'datetime', readable=True, writable=False,),
       Field('file', 'upload', uploadseparate=True),
       )
 
   controller:
   ...
   @auth.requires_login()
   def create():
       mechanism = request.args(0)
       if mechanism == 'upload':
           message = Upload your Transaction
           db.transaction.file.writable=True
           db.transaction.file.readable=True
           form = crud.create(db.transaction, onvalidation=upload_proc)
       else:
           message = Create a new Transaction
           db.transaction.file.writable=False
           db.transaction.file.readable=False
           form = crud.create(db.transaction, onvalidation=scratch_proc)
       return dict(message=T(message), form=form)
 
   def upload_proc(form):
       form.vars.created_on = request.now #set time stamp properly
       print form.vars.file.filename
       if transaction_test(form.vars.file):
           import os.popen2
           popen2(transaction_BIN+' rebuild '+ form.vars.file)
       else:
           form.errors.file = File is not a valid transaction repo
   ...
 
   def transaction_test(transaction_file):
       #simple test to see whether 'transaction_file' is actually a sqlite3 
   database
       #with some key tables required for transactions from (REDACTED)
       import sqlite3
       dbobj = sqlite3.connect(str(transaction_file.upload))
       dbcursor = connection.cursor()
       query_string = SELECT name FROM sqlite_master WHERE type='table' AND 
+\
                       name='receiver' OR name='bursar' OR name='clagent'  
   +\
                       name='lbroker' OR name='bbroker' OR name='loc';
       dbcursor.execute(query_string)
       rows_returned = len(db.fetchall())
   ...
 
   Thanks in advance...
   --Cliff
 
 


Re: [web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread Bruno Rocha
OK, I like every comments about 301 redirect, and this is a good tip.

But, I started this post with this subject in mind:

I am thinking on how we can have some helpers, functions, directives or just
 improvements in 'welcome' app to help us follow this SEO tips?


So, how can we develop some helpers to that? is there any chance to have a
helper or pre-defined configuration is scaffold app?

what about other things like Sitemap.xml, robots.txt, keywords, page titles
etc.. How can we make it easy to config, how can web2py scafoold help us
when starting a new project.

I used wordpress for a long time, and there is 'ALL IN ONE SEO TOOLS'
plugin, this is great, just installs it and nevermind about SEO again.

I want to have such thing in web2py. how?
-- 

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


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

2010-12-12 Thread pbreit
I'm not sure you can make that generalization with frameworks. The
solid, widely used ones are all BSD/MIT (Rails, Django, Cake,
CodeIgniter, Pylons, Turbogears, Symfony, etc.).


But as you say, BSD/MIT are better for users.

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

2010-12-12 Thread mdipierro
I disagree. In the case of web2py it makes no difference to users
since the web2py license clearly states it does not apply to them.
Users of the framework can release their code under any license they
like.


Massimo


On Dec 12, 11:39 am, pbreit pbreitenb...@gmail.com wrote:
 I'm not sure you can make that generalization with frameworks. The
 solid, widely used ones are all BSD/MIT (Rails, Django, Cake,
 CodeIgniter, Pylons, Turbogears, Symfony, etc.).

 But as you say, BSD/MIT are better for users.


[web2py] login form with a popup

2010-12-12 Thread pk
hi together,

have somebody of you an example app or a code to make the login form
with a popup like javascript colorbox for example??

thanks peter



[web2py] SQLCustomType no longer importable

2010-12-12 Thread Fran
Traceback (most recent call last):
  File C:\Bin\web2py\gluon\restricted.py, line 188, in restricted
exec ccode in environment
  File C:/Bin/web2py/applications/eden/models/00_db.py, line 21, in
module
from gluon.sql import SQLCustomType
ImportError: cannot import name SQLCustomType

Are we not supposed to use these any more?
If not, what should they be replaced by?

F


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

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 6:39 PM, pbreit pbreitenb...@gmail.com wrote:
 But as you say, BSD/MIT are better for users.

He didn't say 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


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

2010-12-12 Thread pbreit
The evidence is overwhelmingly in the other direction both in terms of
what users want and what other frameworks offer. I don't think that's
disputable.

[web2py] Re: SQLCustomType no longer importable

2010-12-12 Thread Fran
On Dec 12, 5:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 Oops. fixed in trunk. It should work now.

Thanks, it does :)

 Long term anyway, I never promised backward compatibility for
 SQLCustomType.

ok, will be good to get a heads-up when that changes  some idea of
how to migrate off it...or just tweak the implementation if it just
changes slightly :)

Many thanks,
Fran.


[web2py] getting the full path to uploaded files

2010-12-12 Thread G. Clifford Williams

Is ther a prescribed mechanism for getting the full path to uploaded files?

I've got an onaccept function that contains:
 os.symlink(os.path.join(request.folder,'uploads',
form.vars.file_newfilename), link_path)

which worked until I'd changed the field to use 'uploadseparate=True'

Thanks in advance
--Cliff


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

2010-12-12 Thread mdipierro
I think we should close this discussion. It is not going anywhere.
The license of web2py is not up for discussion.

I say (and said) that the GPL license applies to derivative work only.
Applications built with web2py and distributed with web2py (compiled
or not) are not derivative work therefore the license does not apply.
My statement has a legal validity because I have complete copyright on
web2py.

Having as many users as possible is not a goal. The goal is to have
the best web2py framework and not fragment the community. The GPL
license, in my view, helps to keep the community together.

Massimo




On Dec 12, 11:59 am, pbreit pbreitenb...@gmail.com wrote:
 The evidence is overwhelmingly in the other direction both in terms of
 what users want and what other frameworks offer. I don't think that's
 disputable.


[web2py] Re: getting the full path to uploaded files

2010-12-12 Thread weheh
If uploadseparate=True then you have to reconstruct the full path with
a routine like this:


def get_path(filename,folder='uploads'):
  Get full path to file stored in uploads
  f=filename.split('.')
  path=os.path.join(request.folder,folder,
'%s.%s'%(f[0],f[1]),
'%c%c'%(f[2][0],f[2][1]),
filename)
  return path

where filename passed to get_path is db.mytable[row].file_fieldname

On Dec 12, 1:07 pm, G. Clifford Williams g...@notadiscussion.com
wrote:
 Is ther a prescribed mechanism for getting the full path to uploaded files?

 I've got an onaccept function that contains:
      os.symlink(os.path.join(request.folder,'uploads',
                                 form.vars.file_newfilename), link_path)

 which worked until I'd changed the field to use 'uploadseparate=True'

 Thanks in advance
 --Cliff


[web2py] Re: BUTTON helper

2010-12-12 Thread weheh
That's an interesting idea. I didn't think of that.

On Dec 12, 10:23 am, DenesL denes1...@yahoo.ca wrote:
 You can always set it in a model as
 BUTTON=TAG.BUTTON

 and then use it in your controllers and views.

 On Dec 12, 2:55 am, weheh richard_gor...@verizon.net wrote:

  To be more explicit, I think BUTTON is good for newbies -- it's just
  so obvious and convenient. Now TAG.BUTTON ... yes, I like TAG, but I'm
  not used to thinking about it. I guess that makes me a newbie, still.




[web2py] Re: help needed with db table indexing within SQLFORM.factory

2010-12-12 Thread weheh
Strange, I'm almost certain I tried
form=SQLFORM.factory(db.mytable,record=db.mytable[row]) but couldn't
get it to work. I shall try again. Thanks much, DenesL!

On Dec 12, 9:10 am, DenesL denes1...@yahoo.ca wrote:
 form=SQLFORM.factory(db.mytable, record=db.mytable[row])

 but why not simply
 form=SQLFORM(db.mytable, rowid)
 ?

 On Dec 12, 12:37 am, weheh richard_gor...@verizon.net wrote:

  I neglected to mention that I also have a requires:

    db.mytable.groups.requires=IS_IN_DB(db,'groups.id','%
  (name)s',multiple=True)




[web2py] Re: SQLCustomType no longer importable

2010-12-12 Thread Fran
On Dec 12, 6:04 pm, Fran francisb...@gmail.com wrote:
 On Dec 12, 5:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
  Oops. fixed in trunk. It should work now.
 Thanks, it does :)

Spoke too soon - it doesn't let me generate new records as the uuids
aren't being generated properly :/

Here is where we use SQLCustomType to define the uuidstamp field:
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head:/models/00_tables.py#L26

Currently I'm on r2717

Many thanks,
Fran.


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

2010-12-12 Thread Branko Vukelic
On Sun, Dec 12, 2010 at 7:21 PM, mdipierro mdipie...@cs.depaul.edu wrote:
 I think we should close this discussion. It is not going anywhere.
 The license of web2py is not up for discussion.

+1


-- 
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: help needed with db table indexing within SQLFORM.factory [Closed]

2010-12-12 Thread weheh
It works. I think I know what I was doing wrong. I tried
SQLFORM.factory(db.mytable,record=rowid). I suppose it's a little
confusing that factory uses the SQLrow object for record and SQLFORM
uses the record id. I've read and re-read the documentation on both
SQLFORM and SQLFORM.factory and this difference is not clearly stated.
In fact, I can't find in the doc where the record argument to
SQLFORM.factory is described. Regardless, I am ajaxing the form and I
can't seem to do it with SQLFORM, while it is possible with
SQLFORM.factory. There are some nuances here that I just haven't had
the time to investigate to my satisfaction. I think I need to go look
at the gluon code to really understand what's going on. Anyway, thanks
again, DenesL. Much obliged.


[web2py] Translate this SQL to DAL?

2010-12-12 Thread Lorin Rivers
THere are a few aspects of the DAL that I can't  quite get my head around. For 
example, how would I do this?

select max(reqtime) from arraydata_table where rollupid = 0

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] Re: anybody use the web2py IRC chat?

2010-12-12 Thread Lorin Rivers
I wish IRC was a little more active...

On Dec 12, 2010, at 8:30 , Luther Goh Lu Feng wrote:

 I do. But there are only about 10 people in the channel each time and
 many are afk. The mailing list is a better bet.
 
 On Dec 12, 10:18 pm, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sun, Dec 12, 2010 at 8:48 AM, weheh richard_gor...@verizon.net wrote:
 Just curious. I don't use it, but I probably would if I thought I
 could get a fast response from an expert.
 
 Don't worry, you'll get answers here fast enough.
 
 --
 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

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] Re: Translate this SQL to DAL?

2010-12-12 Thread DenesL

rows=db(db.arraydata_table.rollupid==0).select(db.arraydata_table.reqtime.max())


On Dec 12, 2:40 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 THere are a few aspects of the DAL that I can't  quite get my head around. 
 For example, how would I do this?

 select max(reqtime) from arraydata_table where rollupid = 0

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


[web2py] Re: Translate this SQL to DAL?

2010-12-12 Thread mdipierro
More verbosely:

max_reqtime = db.arraydata_table.reqtime.max()
rows=db(db.arraydata_table.rollupid==0).select(max_reqtime)
print rows.first()(max_reqtime)

On Dec 12, 2:27 pm, DenesL denes1...@yahoo.ca wrote:
 rows=db(db.arraydata_table.rollupid==0).select(db.arraydata_table.reqtime.max())

 On Dec 12, 2:40 pm, Lorin Rivers lriv...@mosasaur.com wrote:

  THere are a few aspects of the DAL that I can't  quite get my head around. 
  For example, how would I do this?

  select max(reqtime) from arraydata_table where rollupid = 0

  --
  Lorin Rivers
  Mosasaur: Killer Technical Marketing http://www.mosasaur.com
  mailto:lriv...@mosasaur.com
  512/203.3198 (m)




[web2py] Re: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread Carlos
Hi rochacbruno,

That's what I thought, I just wanted to confirm it.

Thanks to all !,

   Carlos


On Dec 12, 10:50 am, rochacbruno rochacbr...@gmail.com wrote:
 Carlos, the only solution I see is using a virtual field, or removing repeats 
 in Java Scripts.

 Enviado via iPhone

 Em 12/12/2010, às 14:17, Carlos carlosgali...@gmail.com escreveu:







  Hi Denes,

  That's clear to me, my question is not about getting the data (I got
  it ok), but instead showing the data in an html table (SQLTABLE) with
  unique (no repeated) one data, as per my examples above.

  Maybe I'm not explaining clearly? - sorry :-)

  Thanks!,

    Carlos

  On Dec 12, 9:41 am, DenesL denes1...@yahoo.ca wrote:
  Hi Carlos,

  inside the select you can specify which fields to bring back, I think
  you want:

  rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
  db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)

  On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:

  Hi Massimo,

  What do you mean?, that shows the same result (with repeated 'one'
  data) in the SQLTABLE, doesn't it?.

  Thanks,

     Carlos

  On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:

  You can do, for example:

  rows =
  db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many
   .yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

  On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:

  Hi,

  I need to show a SQLTABLE with joined data but without repeated
  information (like grouping but showing all rows).

  Let's say I have the following model:

          db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
  format='%(aa)s')
          db.define_table('many', Field('one', 'reference one'), 
  Field('xx'),
  Field('yy'), Field('zz'))

  And the following function:

          def join():
              rows = db(db.one.id==db.many.one).select()
              return dict(rows=rows)

  This shows all rows correctly but with repeated data for 'one':

  many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
  one.cc
  1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
  2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
  3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
  4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
  5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

  How can I show this same view (with the same number of rows) but only
  showing the 'one' data once (for the first occurrence) as follows?.

  many.id many.one        many.xx many.yy many.zz one.id  one.aa  one.bb  
  one.cc
  1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
  2       a1      a1_x2   a1_y2   a1_z2   2
  3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
  4       a2      a2_x2   a2_y2   a2_z2   3
  5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

  Note the empty spaces in order to show the 'one' data once only (on
  first occurrence).

  Thanks,

     Carlos


[web2py] Re: upload files in specific sub-folders

2010-12-12 Thread Carlos
I'll give it a try.

Thanks GoldenTiger !

On Dec 11, 1:00 pm, GoldenTiger goldenboy...@gmail.com wrote:
 did you try Field arguments?

 http://www.web2py.com/examples/static/epydoc/index.html

 uploadfolder=None
 uploadseparate=False # upload to separate directories by uuid_keys
                             # first 2 character and
 tablename.fieldname
                             # False - old behaviour
                             # True - put uploaded file in
                             #   uploaddir/tablename.fieldname/
 uuid_key[:2]
                             #        directory)

 On 10 dic, 19:17, Carlos carlosgali...@gmail.com wrote:







  Hi,

  Is there any way to upload files in specific sub-folders?.

  I have multiple organizations and I have a requirement to upload all
  files to the respective organization sub-folder.

  Thanks,

     Carlos


[web2py] Re: reserved words in databases

2010-12-12 Thread Carlos
Hi Massimo,

Thanks for clarifying this.

   Carlos


On Dec 11, 7:41 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 No. Right now there may problems if you used a reserved keyword.

 On Dec 11, 6:57 pm, Carlos carlosgali...@gmail.com wrote:







  Hi,

  With respect to the following old thread:

 http://groups.google.com/group/web2py/browse_thread/thread/6a0948e7bf...

  Is web2py now ready to use reserved words as table and field names
  (e.g. user, group) without any conflicts with any of the supported
  databases?.

  Or what should be done in order to be portable across multiple
  databases?.

  Thanks,

     Carlos


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

2010-12-12 Thread pbreit
Fair enough. But I do hope you will re-evaluate at some point as I
strongly believe that a non-GPL license would make Web2py much, much
better.


And I think it is worthwhile trying to gain users since usage is the
oxygen for something like a framework.

[web2py] Re: anybody use the web2py IRC chat?

2010-12-12 Thread weheh
Yah, this group is wonderfully fast. Occasionally I get desperate,
though ... ;-)

On Dec 12, 9:18 am, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sun, Dec 12, 2010 at 8:48 AM, weheh richard_gor...@verizon.net wrote:
  Just curious. I don't use it, but I probably would if I thought I
  could get a fast response from an expert.

 Don't worry, you'll get answers here fast enough.

 --
 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


[web2py] Re: Tip of the day

2010-12-12 Thread Carlos
Hi,

I am wondering how this solution (single form with linked tables) can
be used for updates (in addition to creates)?.

Thanks,

   Carlos


On Dec 6, 4:32 am, DenesL denes1...@yahoo.ca wrote:
 True, only restriction is no common field names.
 I have added this to the book.

 On Dec 5, 11:05 pm, mdipierro mdipie...@cs.depaul.edu wrote:







  No field names in comment yes. References between them is not a
  problem as long the reference fields are not writable and readable
  when generating theform.

  On Dec 5, 9:41 pm, DenesL denes1...@yahoo.ca wrote:

   This only works fortablesthat do not have field names in common
   and have no references between them.

   On Oct 16, 9:57 am, mdipierro mdipie...@cs.depaul.edu wrote:

It often happens that you have twotables(for example 'client' and
'address' which arelinkedtogether by a reference and you want to
create asingleformthat allows to insert info about one client and
its default address. Here is how:

model:

db.define_table('client',
     Field('name'))
db.define_table('address',
    Field('client',db.client,writable=False,readable=False),
    Field('street'),Field('city'))

controller:

def register():
   form=SQLFORM.factory(db.client,db.address)
    ifform.accepts(request.vars):
        id = db.client.insert(**db.client._filter_fields(form.vars))
       form.vars.client=id
        id = db.address.insert(**db.address._filter_fields(form.vars))
        response.flash='Thanks for filling theform'
    return dict(form=form)

Notice the SQLFORM.factory (it makes ONEformusing public fields from
bothtablesand inherits their validators too).
Onformaccepts this does two inserts (some data in one table and some
data in the other).

Massimo


[web2py] Re: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread DenesL
Try this:

def join():
  rows = db(db.one.id==db.many.one).select(db.many.id, db.many.one,
db.many.xx, db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)
  tr=[]
  f_many='id one xx yy zz'.split()
  f_one='aa bb cc'.split()
  if len(rows)0:
r=rows[0]
tr.append([r.many[x] for x in f_many])
tr[0].extend([r.one[x] for x in f_one])
for k in range(1,len(rows)):
  r=rows[k]
  tr.append([r.many[x] for x in f_many])
  print tr
  if tr[k][1]==tr[k-1][1]: # many.one
tr[k].extend(['','',''])
  else:
tr[k].extend([r.one[x] for x in f_one])
  tbl=TABLE(tr)
  return dict(rows=rows, tbl=tbl)


On Dec 12, 3:47 pm, Carlos carlosgali...@gmail.com wrote:
 Hi rochacbruno,

 That's what I thought, I just wanted to confirm it.

 Thanks to all !,

    Carlos

 On Dec 12, 10:50 am, rochacbruno rochacbr...@gmail.com wrote:

  Carlos, the only solution I see is using a virtual field, or removing 
  repeats in Java Scripts.

  Enviado via iPhone

  Em 12/12/2010, às 14:17, Carlos carlosgali...@gmail.com escreveu:

   Hi Denes,

   That's clear to me, my question is not about getting the data (I got
   it ok), but instead showing the data in an html table (SQLTABLE) with
   unique (no repeated) one data, as per my examples above.

   Maybe I'm not explaining clearly? - sorry :-)

   Thanks!,

     Carlos

   On Dec 12, 9:41 am, DenesL denes1...@yahoo.ca wrote:
   Hi Carlos,

   inside the select you can specify which fields to bring back, I think
   you want:

   rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
   db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)

   On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:

   Hi Massimo,

   What do you mean?, that shows the same result (with repeated 'one'
   data) in the SQLTABLE, doesn't it?.

   Thanks,

      Carlos

   On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:

   You can do, for example:

   rows =
   db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many
.yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

   On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:

   Hi,

   I need to show a SQLTABLE with joined data but without repeated
   information (like grouping but showing all rows).

   Let's say I have the following model:

           db.define_table('one', Field('aa'), Field('bb'), Field('cc'),
   format='%(aa)s')
           db.define_table('many', Field('one', 'reference one'), 
   Field('xx'),
   Field('yy'), Field('zz'))

   And the following function:

           def join():
               rows = db(db.one.id==db.many.one).select()
               return dict(rows=rows)

   This shows all rows correctly but with repeated data for 'one':

   many.id many.one        many.xx many.yy many.zz one.id  one.aa  
   one.bb  one.cc
   1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
   2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
   3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
   4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
   5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

   How can I show this same view (with the same number of rows) but only
   showing the 'one' data once (for the first occurrence) as follows?.

   many.id many.one        many.xx many.yy many.zz one.id  one.aa  
   one.bb  one.cc
   1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
   2       a1      a1_x2   a1_y2   a1_z2   2
   3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
   4       a2      a2_x2   a2_y2   a2_z2   3
   5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

   Note the empty spaces in order to show the 'one' data once only (on
   first occurrence).

   Thanks,

      Carlos




[web2py] Re: Error in decorator section of web2py book

2010-12-12 Thread Luther Goh Lu Feng


On Dec 12, 10:58 pm, cjrh caleb.hatti...@gmail.com wrote:
 On Dec 11, 7:44 pm, Luther Goh Lu Feng elf...@yahoo.com wrote:

  Line 8 of code snippet should be
  @auth.requires_membership('agents')
  not
  @auth.requires_membership(agents)

 Are you sure?   I haven't tried it out myself, but I note that in a
 subsequent line:

 @auth.requires_permission('read', secrets)
 def function_four():

 The secrets table is referred to directly, not passed as a table name
 string.  I would be surprised if the agents role is required to be
 passed as a string, but the tables are passed as objects.  If you tell
 me you wrote out the example code and it only works if you passed the
 role by name as 'agents', then that'll be good enough for me and I'll
 fix the example.

Hmm, I actually deployed an app that uses that method:

https://github.com/elfgoh/mustardjuice/blob/master/web2py/applications/mustardjuice/controllers/default.py

@auth.requires_membership('admin') worked but not
@auth.requires_membership(admin) (Line 56, 61)


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

2010-12-12 Thread Michele Comitini
2010/12/12 pbreit pbreitenb...@gmail.com:
 Fair enough. But I do hope you will re-evaluate at some point as I strongly
 believe that a non-GPL license would make Web2py much, much better.
 And I think it is worthwhile trying to gain users since usage is the oxygen
 for something like a framework.

Sorry I have to disagree with this,  many users are developers and
contributors.  They agreed to share
their work with GPL by contract.  GPL grants that credit is due to
developers and contributors.
It is simple: individuals and corporations that invest in web2py *are
users* and agree to share all modifications to the framework
with  other individuals or corporations that use them.  It is a matter
of *fair competition*.


[web2py] tags and tag cloud

2010-12-12 Thread Carlos
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: SQLTABLE with joined data, but without repeats?

2010-12-12 Thread Carlos
Hi Denes,

This seems to do the trick - thanks!,

   Carlos


On Dec 12, 3:37 pm, DenesL denes1...@yahoo.ca wrote:
 Try this:

 def join():
   rows = db(db.one.id==db.many.one).select(db.many.id, db.many.one,
 db.many.xx, db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)
   tr=[]
   f_many='id one xx yy zz'.split()
   f_one='aa bb cc'.split()
   if len(rows)0:
     r=rows[0]
     tr.append([r.many[x] for x in f_many])
     tr[0].extend([r.one[x] for x in f_one])
     for k in range(1,len(rows)):
       r=rows[k]
       tr.append([r.many[x] for x in f_many])
       print tr
       if tr[k][1]==tr[k-1][1]: # many.one
         tr[k].extend(['','',''])
       else:
         tr[k].extend([r.one[x] for x in f_one])
   tbl=TABLE(tr)
   return dict(rows=rows, tbl=tbl)

 On Dec 12, 3:47 pm, Carlos carlosgali...@gmail.com wrote:







  Hi rochacbruno,

  That's what I thought, I just wanted to confirm it.

  Thanks to all !,

     Carlos

  On Dec 12, 10:50 am, rochacbruno rochacbr...@gmail.com wrote:

   Carlos, the only solution I see is using a virtual field, or removing 
   repeats in Java Scripts.

   Enviado via iPhone

   Em 12/12/2010, às 14:17, Carlos carlosgali...@gmail.com escreveu:

Hi Denes,

That's clear to me, my question is not about getting the data (I got
it ok), but instead showing the data in an html table (SQLTABLE) with
unique (no repeated) one data, as per my examples above.

Maybe I'm not explaining clearly? - sorry :-)

Thanks!,

  Carlos

On Dec 12, 9:41 am, DenesL denes1...@yahoo.ca wrote:
Hi Carlos,

inside the select you can specify which fields to bring back, I think
you want:

rows = db(db.one.id==db.many.one).select(db.many.id, db.many.xx,
db.many.yy, db.many.zz, db.one.aa, db.one.bb, db.one.cc)

On Dec 12, 9:58 am, Carlos carlosgali...@gmail.com wrote:

Hi Massimo,

What do you mean?, that shows the same result (with repeated 'one'
data) in the SQLTABLE, doesn't it?.

Thanks,

   Carlos

On Dec 12, 1:23 am, mdipierro mdipie...@cs.depaul.edu wrote:

You can do, for example:

rows =
db(db.one.id==db.many.one).select(db.many.id,db.many.one,db.many.xx,db.many
 .yy,db.many.zz,db.one.aa,db.one.bb,db.one.cc)

On Dec 11, 12:27 pm, Carlos carlosgali...@gmail.com wrote:

Hi,

I need to show a SQLTABLE with joined data but without repeated
information (like grouping but showing all rows).

Let's say I have the following model:

        db.define_table('one', Field('aa'), Field('bb'), 
Field('cc'),
format='%(aa)s')
        db.define_table('many', Field('one', 'reference one'), 
Field('xx'),
Field('yy'), Field('zz'))

And the following function:

        def join():
            rows = db(db.one.id==db.many.one).select()
            return dict(rows=rows)

This shows all rows correctly but with repeated data for 'one':

many.id many.one        many.xx many.yy many.zz one.id  one.aa  
one.bb  one.cc
1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
2       a1      a1_x2   a1_y2   a1_z2   2       a1      b1      c1
3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
4       a2      a2_x2   a2_y2   a2_z2   3       a2      b2      c2
5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

How can I show this same view (with the same number of rows) but 
only
showing the 'one' data once (for the first occurrence) as follows?.

many.id many.one        many.xx many.yy many.zz one.id  one.aa  
one.bb  one.cc
1       a1      a1_x1   a1_y1   a1_z1   2       a1      b1      c1
2       a1      a1_x2   a1_y2   a1_z2   2
3       a2      a2_x1   a2_y1   a2_z1   3       a2      b2      c2
4       a2      a2_x2   a2_y2   a2_z2   3
5       a3      a3_x1   a3_y1   a3_z1   4       a3      b3      c3

Note the empty spaces in order to show the 'one' data once only (on
first occurrence).

Thanks,

   Carlos


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

2010-12-12 Thread mdipierro
Once I created web2py 1.0 I registered both copyright and trademark. I
paid for them. All web2py contributors sign a contributors agreement
which gives me permissions to use the code as I see fit (and they also
retain full rights on the contributed code), independently on the GPL.

This means I can release the code under GPL, I can change the license,
I can add licenses, etc. For example I offer the commercial
exception which allows you to distribute your apps with official
web2py binaries. That is not compatible with the GPL but I can do it
(it is an example of dual license).

If a user needs something that is incompatible with the GPL, I can
offer a customized license (although this never came up so far).

You need to make a distinction. I am not claiming thatm for other
frameworks which are GPL, software developed by with framework is not
bound by the GPL. I am not making any statement about the validity of
GPL. I am making a specific statement about web2py and I can do so
because I have more rights than GPL grants because I am not bound by
the GPL myself. I have full copyright.

The web2py license says that applications built with web2py (.w2p
apps) are not derivative work and GPL does not apply. Instead, if you
build a derivative framework or if you use Flask and import dal.py,
than GPL applies. Again, this is not a statement about the GPL, this
is the web2py license.

If you feel that the web2py license is not clean enough in this
regard, that can be rephrased better.

Massimo






On Dec 12, 4:07 pm, VP vtp2...@gmail.com wrote:
 While I don't necessarily advocate for changing web2py's license, I
 think it's important to clarify the issues surrounding the license so
 people are clear.

 The question is can a web2py app be not GPL when the framework is
 GPL?.  I don't think it's as clear cut as someone might suggest.  At
 least it is controversial in a similar way as using GPL libraries or
 linking to GPL code 
 (ref:http://en.wikipedia.org/wiki/GNU_General_Public_License#Linking_and_d...)

 Clearly an app developed by web2py framework is separate from the
 framework, but at the same time, it cannot run without using the
 framework.  Especially when the app is compiled, it could be
 considered a case of static linking (??).

 The other issue is even if this scenario isn't quite kosher with
 respect to how GPL works, but if web2py (Massimo) explicitly permits
 it to be non-GPL, will that still be okay?

 I don't mean to beat a dead horse, but I think it is quite important
 for people what are interested in developing commercial apps using
 web2py.


[web2py] manual login-form

2010-12-12 Thread pk
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:

div id=contenttext
pform action= enctype=multipart/form-data
method=posttabletr id=auth_user_email__rowtd
class=w2p_fllabel for=auth_user_email
id=auth_user_email__labelE-Mail: /label/tdtd
class=w2p_fwinput class=string id=auth_user_email name=email
type=text value= //tdtd class=w2p_fc/td/trtr
id=auth_user_password__rowtd class=w2p_fllabel
for=auth_user_password id=auth_user_password__labelPasswort: /
label/tdtd class=w2p_fwinput class=password
id=auth_user_password name=password type=password value= //
tdtd class=w2p_fc/td/trtr
id=auth_user_remember__rowtdlabelnbsp;nbsp;/label/
tdtddivinput class=checkbox id=auth_user_remember
name=remember type=checkbox value=on /label
for=auth_user_rememberAngemeldet bleiben/label/div/tdtd/
td/trtr id=submit_record__rowtd class=w2p_fl/tdtd
class=w2p_fwinput type=submit value=Auf geht`s //tdtd
class=w2p_fc/td/tr/tablediv class=hiddeninput
name=_next type=hidden value=/NETAVATAR/default/index /input
name=_formkey type=hidden
value=eeac5cfc-4eb8-4532-90b7-546bbf558f9e /input name=_formname
type=hidden value=login //div/form/p

pa href=/NETAVATAR/default/user/request_reset_passwordPasswort
vergessen?/a
/div




[web2py] Test for null not in a form

2010-12-12 Thread Lorin Rivers
Sometimes in the app I'm working on the default values aren't set in a column 
(for reasons outside of my control).

So, instead of using the default value as a filter, I need to also test for 
null.

How do I do that in the DAL?

In other words, select * from table where field is not NULL;


-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] Re: Test for null not in a form

2010-12-12 Thread mdipierro
db(db.mytable.myfield!=None).select()

On Dec 12, 5:02 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 Sometimes in the app I'm working on the default values aren't set in a column 
 (for reasons outside of my control).

 So, instead of using the default value as a filter, I need to also test for 
 null.

 How do I do that in the DAL?

 In other words, select * from table where field is not NULL;

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


[web2py] Socket for bidirectional messaging

2010-12-12 Thread gopiballava
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] error messages while editing in fullscreen mode

2010-12-12 Thread Carlos
Hi,

I've noticed that error messages (e.g. syntax errors) are not
displayed when editing in fullscreen mode.

The invalid section is highlighted correctly but with no message (as
occurs in regular mode).

The worst case is when the error is communications error (which
occurs when a timeout occurs), such that one thinks everything is
correctly saved, but in reality the saving never occurs and there are
no error messages whatsoever ... again, in fullscreen mode.

Just to let you know ... take care,

   Carlos


Re: [web2py] Re: Test for null not in a form

2010-12-12 Thread Lorin Rivers
No kidding. That should be called out in The Book.

On Dec 12, 2010, at 17:14 , mdipierro wrote:

 db(db.mytable.myfield!=None).select()
 
 On Dec 12, 5:02 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 Sometimes in the app I'm working on the default values aren't set in a 
 column (for reasons outside of my control).
 
 So, instead of using the default value as a filter, I need to also test for 
 null.
 
 How do I do that in the DAL?
 
 In other words, select * from table where field is not NULL;
 
 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] single [edit] instead of [create] + [update]

2010-12-12 Thread Carlos
Hi,

I'm implementing crud functions for my models, and I'm wondering if
it's a good idea for each table to just have one single [edit]
function instead of two separate [create] and [update] functions?.

This way I will internally search for the arg (record to be edited),
which if absent then it's treated as [create], otherwise (if present)
then it's treated as [update].

Is this a good practice?.

Thanks,

   Carlos


[web2py] Re: single [edit] instead of [create] + [update]

2010-12-12 Thread mdipierro
I do this all the time

def edit():
   return dict(form=crud.update(db.mytable,request.args(0)))

when called with http://...edit is just creates and when with ..edit/
n it goes into update mode.

On Dec 12, 5:25 pm, Carlos carlosgali...@gmail.com wrote:
 Hi,

 I'm implementing crud functions for my models, and I'm wondering if
 it's a good idea for each table to just have one single [edit]
 function instead of two separate [create] and [update] functions?.

 This way I will internally search for the arg (record to be edited),
 which if absent then it's treated as [create], otherwise (if present)
 then it's treated as [update].

 Is this a good practice?.

 Thanks,

    Carlos


[web2py] Re: administrator controller

2010-12-12 Thread Richard
yes I understand the code required, but was after existing solution
with nice looking view

[web2py] Re: Test for null not in a form

2010-12-12 Thread mdipierro
The book never says that None is NULL?
I will check. That would be a big omission.

Massimo

On Dec 12, 5:24 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 No kidding. That should be called out in The Book.

 On Dec 12, 2010, at 17:14 , mdipierro wrote:



  db(db.mytable.myfield!=None).select()

  On Dec 12, 5:02 pm, Lorin Rivers lriv...@mosasaur.com wrote:
  Sometimes in the app I'm working on the default values aren't set in a 
  column (for reasons outside of my control).

  So, instead of using the default value as a filter, I need to also test 
  for null.

  How do I do that in the DAL?

  In other words, select * from table where field is not NULL;

  --
  Lorin Rivers
  Mosasaur: Killer Technical Marketing http://www.mosasaur.com
  mailto:lriv...@mosasaur.com
  512/203.3198 (m)

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


[web2py] How to test

2010-12-12 Thread weheh
I'm doing
  #controller
  db.auth_user.default_2.requires=IS_IN_SET(...list depends on
db.auth_user.default_1 ...)
  form=auth.profile(next=URL(r=request,f='profile'))
to let the user enter stuff in their user profile (defaults, etc.).

Once the form is loaded, ajax keeps auth_user.default_2 in synch with
changes made to auth_user.default_1.

However, upon pressing the submit button, the requires statement above
kicks in again. So I only want to run it once upon loading the form.

The question is: what should I conditionally test for to determine
whether the form has been submitted or whether it has been generated.
This seems to work:

if not request.vars: db.auth_user.default_2.requires=IS_IN_SET(...)

but I'm pretty sure request.vars is not a robust way to detect whether
the controller is creating a new form or accepting an existing form.
So what is the right thing to test?


[web2py] How to test for form creation vs. acceptance with CRUD-like functionality?

2010-12-12 Thread weheh
.


[web2py] Re: single [edit] instead of [create] + [update]

2010-12-12 Thread Carlos
Massimo,

Great - thanks for confirming this !

   Carlos


On Dec 12, 5:32 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 I do this all the time

 def edit():
    return dict(form=crud.update(db.mytable,request.args(0)))

 when called withhttp://...editis just creates and when with ..edit/
 n it goes into update mode.

 On Dec 12, 5:25 pm, Carlos carlosgali...@gmail.com wrote:







  Hi,

  I'm implementing crud functions for my models, and I'm wondering if
  it's a good idea for each table to just have one single [edit]
  function instead of two separate [create] and [update] functions?.

  This way I will internally search for the arg (record to be edited),
  which if absent then it's treated as [create], otherwise (if present)
  then it's treated as [update].

  Is this a good practice?.

  Thanks,

     Carlos


[web2py] extra non-persistent fields in forms

2010-12-12 Thread Carlos
Hi,

Is it possible to define extra non-persistent fields in forms, either
by CRUD or SQLFORM?.

Or is SQLFORM.factory the only option?.

Thanks,

   Carlos


Re: [web2py] Re: reserved words in databases

2010-12-12 Thread Thadeus Burgess
Are you using the reserved_keywords check built into the DAL?

--
Thadeus




On Sun, Dec 12, 2010 at 2:50 PM, Carlos carlosgali...@gmail.com wrote:

 Hi Massimo,

 Thanks for clarifying this.

   Carlos


 On Dec 11, 7:41 pm, mdipierro mdipie...@cs.depaul.edu wrote:
  No. Right now there may problems if you used a reserved keyword.
 
  On Dec 11, 6:57 pm, Carlos carlosgali...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi,
 
   With respect to the following old thread:
 
  http://groups.google.com/group/web2py/browse_thread/thread/6a0948e7bf.
 ..
 
   Is web2py now ready to use reserved words as table and field names
   (e.g. user, group) without any conflicts with any of the supported
   databases?.
 
   Or what should be done in order to be portable across multiple
   databases?.
 
   Thanks,
 
  Carlos



[web2py] web2py entry on wikipedia needs to be updated

2010-12-12 Thread Bruno Rocha
web2py entry on wikipedia[0] seens to be a little outdated showing
deprecated information about web2py.

[ Who uses.., latest version, applied stack, T2 T3(??), book editions, wiki,
bazzar(?)...]

I never created or edited wikipedia pages before, I need to learn a little
about this markup to start helping on this page, if there is someone here
who has the ability for writing in wikipedia and willing to help to keep
this page updated, include a logo. some screenshots of new admin and
welcome, mentioning the /poweredby and application wizard, and also the
stand alone feature of the new dal.

This is important because a search[1] on google shows wikipedia entry as the
6th, bing[2] as the 3th, 2nd on Yahoo[3] and most people could take first
impressions about the framework by this wikipedia entry.




[0] http://en.wikipedia.org/wiki/Web2py

[1] http://www.google.com/#sclient=psyhl=ensite=source=hpq=web2py

[2] http://www.bing.com/search?q=web2pygo=form=QBREfilt=lf

[3]
http://search.yahoo.com/search;_ylt=AgEtnq9o2r4IzMOQfEIWyNubvZx4?p=web2pytoggle=1cop=mssei=UTF-8fr=yfp-t-701



-- 

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


Re: [web2py] Re: Test for null not in a form

2010-12-12 Thread Lorin Rivers
As far as I can tell, the only place null is mentioned in the DAL page is in 
the definition of tables.


On Dec 12, 2010, at 17:35 , mdipierro wrote:

 The book never says that None is NULL?
 I will check. That would be a big omission.
 
 Massimo
 
 On Dec 12, 5:24 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 No kidding. That should be called out in The Book.
 
 On Dec 12, 2010, at 17:14 , mdipierro wrote:
 
 
 
 db(db.mytable.myfield!=None).select()
 
 On Dec 12, 5:02 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 Sometimes in the app I'm working on the default values aren't set in a 
 column (for reasons outside of my control).
 
 So, instead of using the default value as a filter, I need to also test 
 for null.
 
 How do I do that in the DAL?
 
 In other words, select * from table where field is not NULL;
 
 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)
 
 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




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

2010-12-12 Thread pbreit
 But as you say, BSD/MIT are better for users.

 He didn't say that.


He said it prevents users from making a better derivative.


My apologies to the community and Massimo for be-laboring the point but
I think it's unfortunate that the license alone is discouraging use of
the framework. I'm very close to selecting Web2py for a large, public
project but am having my doubts.

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

2010-12-12 Thread mdipierro
Yes. The GPL prevents users from make a CLOSED SOURCE better
derivative of the framework. That is exactly what this community wants
to protect against. That is something that can kill an open source
project and the reason GPL was invented.

This discussion has nothing to do with users who are not affected.

Please contact me privately about what you want to do. Perhaps you
need a special license. Depending on what you need to do I may provide
such license to you.

Massimo


On Dec 12, 6:53 pm, pbreit pbreitenb...@gmail.com wrote:
  But as you say, BSD/MIT are better for users.
  He didn't say that.

 He said it prevents users from making a better derivative.

 My apologies to the community and Massimo for be-laboring the point but
 I think it's unfortunate that the license alone is discouraging use of
 the framework. I'm very close to selecting Web2py for a large, public
 project but am having my doubts.


Re: [web2py] web2py entry on wikipedia needs to be updated

2010-12-12 Thread Lorin Rivers
I made a few updates, version, book editions.

On Dec 12, 2010, at 18:23 , Bruno Rocha wrote:

 web2py entry on wikipedia[0] seens to be a little outdated showing
 deprecated information about web2py.
 
 [ Who uses.., latest version, applied stack, T2 T3(??), book editions, wiki,
 bazzar(?)...]
 
 I never created or edited wikipedia pages before, I need to learn a little
 about this markup to start helping on this page, if there is someone here
 who has the ability for writing in wikipedia and willing to help to keep
 this page updated, include a logo. some screenshots of new admin and
 welcome, mentioning the /poweredby and application wizard, and also the
 stand alone feature of the new dal.
 
 This is important because a search[1] on google shows wikipedia entry as the
 6th, bing[2] as the 3th, 2nd on Yahoo[3] and most people could take first
 impressions about the framework by this wikipedia entry.
 
 
 
 
 [0] http://en.wikipedia.org/wiki/Web2py
 
 [1] http://www.google.com/#sclient=psyhl=ensite=source=hpq=web2py
 
 [2] http://www.bing.com/search?q=web2pygo=form=QBREfilt=lf
 
 [3]
 http://search.yahoo.com/search;_ylt=AgEtnq9o2r4IzMOQfEIWyNubvZx4?p=web2pytoggle=1cop=mssei=UTF-8fr=yfp-t-701
 
 
 
 -- 
 
 Bruno Rocha
 http://about.me/rochacbruno/bio

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] Re: XML service

2010-12-12 Thread DenesL

The arguments to select should be the fields, not their names:
db(db.cargroup).select(db.cargroup.descr,
db.cargroup.seats,orderby=db.cargroup.descr).as_list()



On Dec 10, 1:53 pm, villas villa...@gmail.com wrote:
 If I make a function with named fields,  e.g.

 def cargroup():
     carlist =
 db(db.cargroup).select('descr','seats',orderby=descr).as_list()
     return dict(carlist=carlist)

 Then call it with .xml extension,  I get an _extra tag element for
 each row,  e.g.:

 item_extradescrChevrolet Matiz/descrseats3/seats/_extra/
 item

 Why do we have the _extra tag?  If I do not specify fields,  then I
 don't see that.  Is it a bug?

 -D


[web2py] Re: reserved words in databases

2010-12-12 Thread Carlos
Hi Thadeus,

I'm not doing any checking with check_reserved (http://web2py.com/
book/default/chapter/06?search=reserved#Reserved-Keywords), if that's
what you're asking.

I really did not fully understand that section, does it only check
whether the current table and field names are in conflict or not?.

I would still have to change the conflicting names, wouldn't I?.

Thanks,

   Carlos


On Dec 12, 5:55 pm, Thadeus Burgess thade...@thadeusb.com wrote:
 Are you using the reserved_keywords check built into the DAL?

 --
 Thadeus







 On Sun, Dec 12, 2010 at 2:50 PM, Carlos carlosgali...@gmail.com wrote:
  Hi Massimo,

  Thanks for clarifying this.

    Carlos

  On Dec 11, 7:41 pm, mdipierro mdipie...@cs.depaul.edu wrote:
   No. Right now there may problems if you used a reserved keyword.

   On Dec 11, 6:57 pm, Carlos carlosgali...@gmail.com wrote:

Hi,

With respect to the following old thread:

   http://groups.google.com/group/web2py/browse_thread/thread/6a0948e7bf.
  ..

Is web2py now ready to use reserved words as table and field names
(e.g. user, group) without any conflicts with any of the supported
databases?.

Or what should be done in order to be portable across multiple
databases?.

Thanks,

   Carlos


[web2py] Re: getting the full path to uploaded files

2010-12-12 Thread weheh
The reason I use folder='uploads' in the get_path arg list is because
I use this same routine to get files that have been stored in various
places: uploads, static, static/data ... etc.

On Dec 12, 8:41 pm, G. Clifford Williams g...@notadiscussion.com
wrote:
 Awesome thanks.

 On Sun, Dec 12, 2010 at 10:25:25AM -0800, weheh spake:

  If uploadseparate=True then you have to reconstruct the full path with
  a routine like this:

  def get_path(filename,folder='uploads'):
    Get full path to file stored in uploads
    f=filename.split('.')
    path=os.path.join(request.folder,folder,
          '%s.%s'%(f[0],f[1]),
          '%c%c'%(f[2][0],f[2][1]),
          filename)
    return path

  where filename passed to get_path is db.mytable[row].file_fieldname

  On Dec 12, 1:07 pm, G. Clifford Williams g...@notadiscussion.com
  wrote:
   Is ther a prescribed mechanism for getting the full path to uploaded 
   files?

   I've got an onaccept function that contains:
   os.symlink(os.path.join(request.folder,'uploads',
   form.vars.file_newfilename), link_path)

   which worked until I'd changed the field to use 'uploadseparate=True'

   Thanks in advance
   --Cliff




[web2py] newbie

2010-12-12 Thread Shel
Hello,

I am trying to create a form that displays all the rows in a table
where, for example, db.storyline.story_id = session.story_id, and I
cannot for the life of me figure out how to do this.  It seems like
this should be very simple, but nothing I have tried works.  I am not
sure how to use a query as the data source for a form, or how to
create a form that shows all the rows returned by the query.  Any help
would be appreciated.Especially if anyone could point me to some
sample code that does something similar, that would be great.

Thank you,
Shel


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

2010-12-12 Thread Branko Vukelic
Since someone mentioned linking, etc, here's an exceprt from the GNU FAQ:

Q. Does prelinking a GPLed binary to various libraries on the system,
to optimize its performance, count as modification?

A. No. Prelinking is part of a compilation process; it doesn't
introduce any license requirements above and beyond what other aspects
of compilation would. If you're allowed to link the program to the
libraries at all, then it's fine to prelink with them as well. If you
distribute prelinked object code, you need to follow the terms of
section 6.

I think this answers the original question. You do not violate GPL by
having import statements in your code, as you can safely detach your
code from web2py and reattach to another copy running somewhere else.

On Mon, Dec 13, 2010 at 3:08 AM, Branko Vukelic bg.bra...@gmail.com wrote:
 http://www.imdb.com/title/tt0097742/

 On Mon, Dec 13, 2010 at 2:01 AM, mdipierro mdipie...@cs.depaul.edu wrote:
 Yes. The GPL prevents users from make a CLOSED SOURCE better
 derivative of the framework. That is exactly what this community wants
 to protect against. That is something that can kill an open source
 project and the reason GPL was invented.

 This discussion has nothing to do with users who are not affected.

 Please contact me privately about what you want to do. Perhaps you
 need a special license. Depending on what you need to do I may provide
 such license to you.

 Massimo


 On Dec 12, 6:53 pm, pbreit pbreitenb...@gmail.com wrote:
  But as you say, BSD/MIT are better for users.
  He didn't say that.

 He said it prevents users from making a better derivative.

 My apologies to the community and Massimo for be-laboring the point but
 I think it's unfortunate that the license alone is discouraging use of
 the framework. I'm very close to selecting Web2py for a large, public
 project but am having my doubts.



 --
 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] Re: newbie

2010-12-12 Thread weheh
I assume you've got something like:

db.define_table('story',Field('text'), ...)
db.define_table('storyline',Field('story_id',db.story,requires=IS_IN_DB(db,'story.id','%
(text)s'), ...)


Then you can query the db:

rows=db(db.storyline.story_id==session.story_id).select(db.story.ALL,left=db.story.on(db.story.id==db.storyline.story_id))

You can return dict(rows=rows) or return dict(rows=SQLTABLE(rows)),
the latter providing more formatting and functionality.





On Dec 12, 8:49 pm, Shel joralemonshe...@gmail.com wrote:
 Hello,

 I am trying to create a form that displays all the rows in a table
 where, for example, db.storyline.story_id = session.story_id, and I
 cannot for the life of me figure out how to do this.  It seems like
 this should be very simple, but nothing I have tried works.  I am not
 sure how to use a query as the data source for a form, or how to
 create a form that shows all the rows returned by the query.  Any help
 would be appreciated.    Especially if anyone could point me to some
 sample code that does something similar, that would be great.

 Thank you,
 Shel


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

2010-12-12 Thread Branko Vukelic
This may also be relevant:

Q. In what cases is the output of a GPL program covered by the GPL too?

A. Only when the program copies part of itself into the output.

-- 
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: Test for null not in a form

2010-12-12 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 1:51 AM, Lorin Rivers lriv...@mosasaur.com wrote:
 As far as I can tell, the only place null is mentioned in the DAL page is in 
 the definition of tables.

None means NULL in Python, though.

-- 
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: anybody use the web2py IRC chat?

2010-12-12 Thread Branko Vukelic
Take a deep breath. :)

On Sun, Dec 12, 2010 at 10:32 PM, weheh richard_gor...@verizon.net wrote:
 Yah, this group is wonderfully fast. Occasionally I get desperate,
 though ... ;-)

 On Dec 12, 9:18 am, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sun, Dec 12, 2010 at 8:48 AM, weheh richard_gor...@verizon.net wrote:
  Just curious. I don't use it, but I probably would if I thought I
  could get a fast response from an expert.

 Don't worry, you'll get answers here fast enough.

 --
 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



-- 
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: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread Michael McGinnis
Those are good ideas. Automatically appending the site name at the end
of each title might be helpful. Or copying the first paragraph as a
fall-back meta-description (not so sure about that one). Or inserting
dynamic keywords for each page into the meta keywords. But we also
have to avoid duplicate content, so we don't want to make things too
automated. For example, we don't want to make it easy to use the same
meta description or meta keywords on each page - that sometimes make
Google think that each page has the same content.

On Dec 12, 11:31 am, Bruno Rocha rochacbr...@gmail.com wrote:
 OK, I like every comments about 301 redirect, and this is a good tip.

 But, I started this post with this subject in mind:

 I am thinking on how we can have some helpers, functions, directives or just

  improvements in 'welcome' app to help us follow this SEO tips?

 So, how can we develop some helpers to that? is there any chance to have a
 helper or pre-defined configuration is scaffold app?

 what about other things like Sitemap.xml, robots.txt, keywords, page titles
 etc.. How can we make it easy to config, how can web2py scafoold help us
 when starting a new project.

 I used wordpress for a long time, and there is 'ALL IN ONE SEO TOOLS'
 plugin, this is great, just installs it and nevermind about SEO again.

 I want to have such thing in web2py. how?
 --

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


[web2py] How to test for form submission vs. form creation [Closed]

2010-12-12 Thread weheh
OK, I think I'm taking the cake today for quantity of dumb questions.
I figured this one out by looking at the request.env.request_method
and request.ajax variables.


[web2py] Re: anybody use the web2py IRC chat?

2010-12-12 Thread weheh
That's what I always tell my son.


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

2010-12-12 Thread weheh
Have you looked at virtual fields and computed fields?

On Dec 12, 6:54 pm, Carlos carlosgali...@gmail.com wrote:
 Hi,

 Is it possible to define extra non-persistent fields in forms, either
 by CRUD or SQLFORM?.

 Or is SQLFORM.factory the only option?.

 Thanks,

    Carlos


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

2010-12-12 Thread Graham Dumpleton
On Monday, December 13, 2010 1:39:57 PM UTC+11, Branko Vukelic
wrote:Since someone mentioned linking, etc, here's an exceprt from the
GNU FAQ:
Q. Does prelinking a GPLed binary to various libraries on the system,
to optimize its performance, count as modification?

A. No. Prelinking is part of a compilation process; it doesn't
introduce any license requirements above and beyond what other aspects
of compilation would. If you're allowed to link the program to the
libraries at all, then it's fine to prelink with them as well. If you
distribute prelinked object code, you need to follow the terms of
section 6.

I think this answers the original question. You do not violate GPL by
having import statements in your code, as you can safely detach your
code from web2py and reattach to another copy running somewhere else.



No I'll think you find it doesn't imply what you think it does.


The prelinking case being talked about as I understand it is where a
pre existing non GPL library exists with some published public
interface and where someone comes along and writes a GPL variant of the
library which adheres to the same published public interface such that
the GPL library could be used in place of the original library by
prelinking it instead of the original so as to provide a better
performing implementation.


This is an entirely different situation to use of 'import' statements
in Python as in this case the original API was a public API and not an
API which is covered by the GPL which is effectively the case with
web2py.


If I remember correctly, there was a specific case where there once
existed a library which was under the GPL and so the API itself,
including structure definitions, was effectively covered by the GPL.
There were then some issues when some people tried to replace the GPL
library with a non GPL version and implement against that instead, so
as to specifically get around that a application written against the
original GPL library implementation was then covered by the GPL. In
other words they were trying to trigger the clause above in reverse,
but because the GPL library existed first it was seen as trying to
circumvent the GPL.


As such, you can't rely on what you quote above. The only way is an
exception statement to the GPL and even then that would need to be very
carefully worded. In all this you really need a lawyer to look at the
situation and draft that exception. If that hasn't been done and some
legal evidence provided to show that the way the exception is done is
valid and will stand up in a court of law, it is very easy to see why
companies, who are going to be very risk averse, would be hesitant to
use software that relies on the GPL but with some sort of stated
exception where the latter is of unknown validity and with no legal
precedent to support it.


Graham
On Mon, Dec 13, 2010 at 3:08 AM, Branko Vukelic bg.b...@gmail.com
wrote:
 http://www.imdb.com/title/tt0097742/

 On Mon, Dec 13, 2010 at 2:01 AM, mdipierro mdip...@cs.depaul.edu
wrote:
 Yes. The GPL prevents users from make a CLOSED SOURCE better
 derivative of the framework. That is exactly what this community
wants
 to protect against. That is something that can kill an open source
 project and the reason GPL was invented.

 This discussion has nothing to do with users who are not affected.

 Please contact me privately about what you want to do. Perhaps you
 need a special license. Depending on what you need to do I may
provide
 such license to you.

 Massimo


 On Dec 12, 6:53 pm, pbreit pbreit...@gmail.com wrote:
  But as you say, BSD/MIT are better for users.
  He didn't say that.

 He said it prevents users from making a better derivative.

 My apologies to the community and Massimo for be-laboring the point
but
 I think it's unfortunate that the license alone is discouraging use
of
 the framework. I'm very close to selecting Web2py for a large,
public
 project but am having my doubts.



 --
 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




--
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-12 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:36 AM, Graham Dumpleton
graham.dumple...@gmail.com wrote:
 As such, you can't rely on what you quote above. The only way is an
 exception statement to the GPL and even then that would need to be very
 carefully worded. In all this you really need a lawyer to look at the
 situation and draft that exception. If that hasn't been done and some legal
 evidence provided to show that the way the exception is done is valid and
 will stand up in a court of law, it is very easy to see why companies, who
 are going to be very risk averse, would be hesitant to use software that
 relies on the GPL but with some sort of stated exception where the latter is
 of unknown validity and with no legal precedent to support it.
 Graham

You keep forgetting that 1. such an exception exists, and 2. Massimo
is the only person that can exercise GPL in this case, since all
contributors specifically signed such a contract.

Anyway, I've already asked GNU to advise. I'll let you know what they say.


-- 
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-12 Thread LightDot
I simply said we had customers expressing concern about using GPLv2
web2py framework for the task of developing a closed source web2py
application. It was never about making closed source versions of web2py
itself. Anyway, I think this issue has been addressed with authority in
massimo's posts and that's good enough for me.

I can perhaps relate my experience with CakePHP (using it since the
middle of 2006). Every once in a while I see a published code
snippet/module/plugin saying something like this was a part of our
closed source application and we are now making it public... etc. The
MIT license of Cake PHP enables this without any question. But
apparently so does the license of web2py. We are talking about the
application side of the things here...

I have never either wanted or needed to fork the CakePHP framework and
make it de facto closed source. I'm not saying it hasn't been done (MIT
license and all), but I've never seen it or done it.

So if the end result is the same (one can freely produce open or closed
source applications, modules, etc.), i'm all for the GPLv2 license. It
is clearly better for the community.

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

2010-12-12 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:53 AM, LightDot light...@gmail.com wrote:
 and all), but I've never seen it or done it.

Which is also the point of MIT. And exactly why massimo insists on
GPL, which forbids this.

 So if the end result is the same (one can freely produce open or closed
 source applications, modules, etc.), i'm all for the GPLv2 license. It is
 clearly better for the community.

There's a difference between GPLv2 and Massimo. Massimo specifically
allows creating closed-source software that runs on web2py despite the
possibility that GPL itself may not necessarily allow this. Regardless
of the conclusion of this GPL agenda, the bottom line is you are free
to create closed-source web2py apps (as long as you don't publish
binary-only web2py modifications, that is). ;)



-- 
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: SEO Tips How this can be applied in web2py apps?

2010-12-12 Thread Branko Vukelic
On Mon, Dec 13, 2010 at 4:29 AM, Michael McGinnis
ish...@biographiks.com wrote:
 Those are good ideas. Automatically appending the site name at the end
 of each title might be helpful. Or copying the first paragraph as a
 fall-back meta-description (not so sure about that one). Or inserting
 dynamic keywords for each page into the meta keywords. But we also
 have to avoid duplicate content, so we don't want to make things too
 automated. For example, we don't want to make it easy to use the same
 meta description or meta keywords on each page - that sometimes make
 Google think that each page has the same content.

No it doesn't. It just downranks you... which is worse. :)

Google is capable of figuring out what the page is about most of the
time. It's just a bitch about compliance to their guidelines. They
seem to have God complex or something. At any rate, it's a good idea
to make web2py as automated as possible in this sense. page title |
title is the form I use on all my stuff (check out
http://www.experts4solutions.com/) and proven to work well, and should
be the default in templates. I don't remember how description and
keywords are assigned, but it's in some global, iirc.

PageRank is mostly dead or dying, but Google probably has something
equally nasty nowadays. The main point of SEO is to just apply the
stuff Google talks about in their webmaster guidelines and to actually
produce good content. There's nothing more to it.

-- 
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


  1   2   >