[web2py] web2py vs flask

2013-09-28 Thread Gour
Hello,

today when I asked on IRC about whether to use Jinja2 or Mako templates for
some static site generator explaining that if we choose Django, than
Jinja2 is more similar and same with Mako & choosing web2py, I'm asked
'why web2py?' and was recommended to use Flask.

The reply why not web2py was "nobody uses it" and I was given the
following URLs:

a) https://crate.io/packages/web2py/#description

b) https://crate.io/packages/Flask/

with the explanation that there are ~2M downloads for Flask and only ~9k
for web2py.

Can someone compare it and/or explain why the last version for web2py
listed there is 2.1.1, while for Flask is the last stable one?


Sincerely,
Gour

-- 
For him who has conquered the mind, the mind is the best of 
friends; but for one who has failed to do so, his mind will 
remain the greatest enemy.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] status of web3py

2013-09-28 Thread Gour
Today I watched presentation from EuroPython 2013 conference where
Massimo is answering that web3py is 'scheduled' for March.

Is it still valid and what is happening with web3py in general?


Sincerely,
Gour

-- 
The embodied soul may be restricted from sense enjoyment, 
though the taste for sense objects remains. But, ceasing 
such engagements by experiencing a higher taste, 
he is fixed in consciousness.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] status of web3py

2013-09-28 Thread Marin Pranjić
Web3py is still far away from being ready to use. There are even typos in
import statements :)
Repo is untouched for the last 9-10 months. But I'm sure Massimo will
continue to work on it. There are many of us who would like to help.
Personally I find it hard to contribute while web3py is in current state,
unless I'm given directions on what exactly should be done.

Marin (mobile)

On Sep 28, 2013 11:45 AM, "Gour"  wrote:

Today I watched presentation from EuroPython 2013 conference where
Massimo is answering that web3py is 'scheduled' for March.

Is it still valid and what is happening with web3py in general?


Sincerely,
Gour

--
The embodied soul may be restricted from sense enjoyment,
though the taste for sense objects remains. But, ceasing
such engagements by experiencing a higher taste,
he is fixed in consciousness.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread LightDot
Heh, everybody is registering hyped .io domains these days. Why do you 
think this one is relevant?

>From Github..:

Crate.io the website currently only mirrors PyPI. 
> All packages and their associated data come from PyPI. Crate.io provides a 
> reliable place for those packages to be stored and accessed and tries to 
> present a cleaner and more user-friendly interface to that data.


This Crate thing seems like a 3rd party skeleton site that simply takes the 
data from PyPI and present it with a different design. That's it. Someone 
else will have to comment on why PyPI is stuck on web2py 2.1.1.

Also, saying "on IRC" is like saying "on the web". Which IRC channel did 
you ask this on and who answered? And why is he/she's answer authoritative 
in some way?

Regards

On Saturday, September 28, 2013 11:38:37 AM UTC+2, Gour wrote:
>
> Hello, 
>
> today when I asked on IRC about whether to use Jinja2 or Mako templates 
> for 
> some static site generator explaining that if we choose Django, than 
> Jinja2 is more similar and same with Mako & choosing web2py, I'm asked 
> 'why web2py?' and was recommended to use Flask. 
>
> The reply why not web2py was "nobody uses it" and I was given the 
> following URLs: 
>
> a) https://crate.io/packages/web2py/#description 
>
> b) https://crate.io/packages/Flask/ 
>
> with the explanation that there are ~2M downloads for Flask and only ~9k 
> for web2py. 
>
> Can someone compare it and/or explain why the last version for web2py 
> listed there is 2.1.1, while for Flask is the last stable one? 
>
>
> Sincerely, 
> Gour 
>
> -- 
> For him who has conquered the mind, the mind is the best of 
> friends; but for one who has failed to do so, his mind will 
> remain the greatest enemy. 
>
> http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread LightDot
BTW, did you notice that Flask can only be downloaded from PyPI? If a 
visitor goes to http://flask.pocoo.org/ and clicks "Download", the package 
comes from PyPI. Web2py is downloaded primarily from it's web site, not 
PyPI. That explains the PyPI download statistics.

Regrads

On Saturday, September 28, 2013 1:12:31 PM UTC+2, LightDot wrote:
>
> Heh, everybody is registering hyped .io domains these days. Why do you 
> think this one is relevant?
>
> From Github..:
>
> Crate.io the website currently only mirrors 
> PyPI. 
>> All packages and their associated data come from PyPI. Crate.io provides a 
>> reliable place for those packages to be stored and accessed and tries to 
>> present a cleaner and more user-friendly interface to that data.
>
>
> This Crate thing seems like a 3rd party skeleton site that simply takes 
> the data from PyPI and present it with a different design. That's it. 
> Someone else will have to comment on why PyPI is stuck on web2py 2.1.1.
>
> Also, saying "on IRC" is like saying "on the web". Which IRC channel did 
> you ask this on and who answered? And why is he/she's answer authoritative 
> in some way?
>
> Regards
>
> On Saturday, September 28, 2013 11:38:37 AM UTC+2, Gour wrote:
>>
>> Hello, 
>>
>> today when I asked on IRC about whether to use Jinja2 or Mako templates 
>> for 
>> some static site generator explaining that if we choose Django, than 
>> Jinja2 is more similar and same with Mako & choosing web2py, I'm asked 
>> 'why web2py?' and was recommended to use Flask. 
>>
>> The reply why not web2py was "nobody uses it" and I was given the 
>> following URLs: 
>>
>> a) https://crate.io/packages/web2py/#description 
>>
>> b) https://crate.io/packages/Flask/ 
>>
>> with the explanation that there are ~2M downloads for Flask and only ~9k 
>> for web2py. 
>>
>> Can someone compare it and/or explain why the last version for web2py 
>> listed there is 2.1.1, while for Flask is the last stable one? 
>>
>>
>> Sincerely, 
>> Gour 
>>
>> -- 
>> For him who has conquered the mind, the mind is the best of 
>> friends; but for one who has failed to do so, his mind will 
>> remain the greatest enemy. 
>>
>> http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Niphlod
That being said, we should nonetheless hire some packaging expert and 
upload packages to pypi so one can install web2py with pip.
I fully acknowledge that web2py is really packaged well all in a single and 
understandable folder (and if all python packages were like web2py we 
wouldn't have to use pip) but, alas, given that the cheeseshop is the 
"official" one, we should at least post the source version in it.

On Saturday, September 28, 2013 1:26:40 PM UTC+2, LightDot wrote:
>
> BTW, did you notice that Flask can only be downloaded from PyPI? If a 
> visitor goes to http://flask.pocoo.org/ and clicks "Download", the 
> package comes from PyPI. Web2py is downloaded primarily from it's web site, 
> not PyPI. That explains the PyPI download statistics.
>
> Regards
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Multiple buttons in links of smartgrid

2013-09-28 Thread Niphlod
start small, then extend (and don't forget to use indentation to see where 
your errors are): it's not the first time you incur in errors not passing 
the expected data type for an argument.

links is a list of dicts.
any dict should contain a header that is what the column should be called 
and a body that is the element that needs to be "rendered" inside each row.
so
links = [ #start of the list
dict(#start of the dict
   header='print', #the header
   body = lambda row : A('print invoice')#the body
   ) #end of the dict
] #end of the list



if you need 2 buttons inside a single column, then
links = [ #start of the list
dict(#start of the dict
   header='print', #the header
   body = lambda row : DIV(A('print invoice'), A('another print'))   
#the 
body
   ) #end of the dict
] #end of the list




On Saturday, September 28, 2013 4:29:42 AM UTC+2, 黄祥 wrote:
>
> how to add the header for multiple buttons? i mean 1 header field that 
> have multiple buttons on the body.
>
> when i try it return an error :
>
> TypeError: 'list' object is not callable
>
>
> my code :
> invoice_links=[dict(header=T('Print'), 
> body=[lambda row: A(I(_class='icon-print'), _title=T("Print Invoice"), 
> _target="_blank", _class="button", _href=URL("print", "print_invoice", 
> args=[row.id])), 
>   lambda row: A(I(_class='icon-print'), _title=T("Print Invoice"), 
> _target="_blank", _class="button", _href=URL("print", "print_invoice", 
> args=[row.id]))])]
>
> thanks and best regards,
> stifan
>>
>> 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Michele Comitini
pip!

pip install --user https://github.com/web2py/web2py/archive/master.zip


pip install --user https://github.com/web2py/web2py/archive/R-2.6.4.zip


too bad it only installs gluon!

mic


Il giorno sabato 28 settembre 2013 13:37:08 UTC+2, Niphlod ha scritto:
>
> That being said, we should nonetheless hire some packaging expert and 
> upload packages to pypi so one can install web2py with pip.
> I fully acknowledge that web2py is really packaged well all in a single 
> and understandable folder (and if all python packages were like web2py we 
> wouldn't have to use pip) but, alas, given that the cheeseshop is the 
> "official" one, we should at least post the source version in it.
>
> On Saturday, September 28, 2013 1:26:40 PM UTC+2, LightDot wrote:
>>
>> BTW, did you notice that Flask can only be downloaded from PyPI? If a 
>> visitor goes to http://flask.pocoo.org/ and clicks "Download", the 
>> package comes from PyPI. Web2py is downloaded primarily from it's web site, 
>> not PyPI. That explains the PyPI download statistics.
>>
>> Regards
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Gour
On Sat, 28 Sep 2013 04:12:31 -0700 (PDT)
LightDot  wrote:

> Heh, everybody is registering hyped .io domains these days. Why do
> you think this one is relevant?

Well, I can't say how much it is relevant, but Github page says: "Next
Generation Python Packaging Index...Crate is a PyPI Mirror/Python
Package Index that was written to make it easy to discover packages,
evaluate them for usefulness, and then install them..."

> Also, saying "on IRC" is like saying "on the web". Which IRC channel
> did you ask this on and who answered? And why is he/she's answer
> authoritative in some way?

It's not important who did I ask and where 'cause the main topic of the
talk were templating engines, iow. Mako vs. Jinja2. Here the relevant
point is that ratio between web2py/Flask as presented by Crate has any
(practical) meaning?



Sincerely,
Gour

-- 
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider 
yourself the cause of the results of your activities,
and never be attached to not doing your duty.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: status of web3py

2013-09-28 Thread Gour
On Sat, 28 Sep 2013 12:51:12 +0200
Marin Pranjić 
wrote:

> Web3py is still far away from being ready to use. There are even
> typos in import statements :)

Is there any (semi)official roadmap and/or feature list planned for it?


Sincerely,
Gour

-- 
As the ignorant perform their duties with attachment to results, 
the learned may similarly act, but without attachment, for the 
sake of leading people on the right path.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Gour
On Sat, 28 Sep 2013 04:26:40 -0700 (PDT)
LightDot  wrote:

> Web2py is downloaded primarily from it's web site, not PyPI. That
> explains the PyPI download statistics.

I see...still, it might be worthy to make web2py available via PyPy in
order to prevent such skewed statistics?


Sincerely,
Gour

-- 
The working senses are superior to dull matter; mind is higher 
than the senses; intelligence is still higher than the mind; 
and he [the soul] is even higher than the intelligence.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Multiple buttons in links of smartgrid

2013-09-28 Thread 黄祥
thank you so much for your detail explaination. i'm sorry, my fault for 
indentation, because to make it simple and straight to the point,  i take 
the code from the conditional, then remove the indentation (tab).
it works well now.

e.g. 
if request.args(-3) == 'invoice_header' and request.args(-2) == 
'invoice_detail.invoice_no':
invoice_links=[dict(header=T('Action'), 
body=lambda row: DIV(A(I(_class='icon-print'), _title=T("Print invoice"), 
_target="_blank", _class="button", 
_href=URL("print", "print_invoice", args=[row.invoice_no])), 
  A(I(_class='icon-envelope'), _title=T("Mail invoice"), 
_target="_blank", _class="button", 
_href="mailto:%s?subject=%s&body=http://%s/%s/print/print_invoice/%s"; 
% (", ".join(mail for mail in row.invoice_no.buyer.email), 'invoice 
deluxurywatch', 
request.env.http_host, request.application, row.invoice_no))
 )
)
   ]
else:
invoice_links=[dict(header=T('Action'), 
body=lambda row: DIV(A(I(_class='icon-print'), _title=T("Print invoice"), 
   _target="_blank", _class="button", 
   _href=URL("print", "print_invoice", args=[row.id])), 
 A(I(_class='icon-envelope'), _title=T("Mail invoice"), 
   _target="_blank", _class="button", 
   _href="mailto:%s?subject=%s&body=http://%s/%s/print/print_invoice/%s"; 
   % (", ".join(mail for mail in row.buyer.email), 'invoice deluxurywatch', 
   request.env.http_host, request.application, row.id))
)
)
   ]

thanks and best regards,
stifan
>
>  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Anthony
For a long time, web2py was not on PyPI at all. At some point, someone 
finally packaged it for PyPI, but the packaging hasn't been maintained, so 
only an old version resides there. The idea of keeping it up-to-date has 
been brought up a number of times, but nothing has happened yet.

Note, even if we update PyPI, download comparisons with web2py will likely 
still not be valid, unless we stop offering the easy zip download/install 
from web2py.com, as many people will still take that route. Also, many 
people upgrade web2py via the "admin" app once it is first installed, so 
upgrades wouldn't be counted by PyPI either (unless the admin upgrade 
mechanism did so from PyPI).

Anthony

On Saturday, September 28, 2013 9:06:23 AM UTC-4, Gour wrote:
>
> On Sat, 28 Sep 2013 04:26:40 -0700 (PDT) 
> LightDot > wrote: 
>
> > Web2py is downloaded primarily from it's web site, not PyPI. That 
> > explains the PyPI download statistics. 
>
> I see...still, it might be worthy to make web2py available via PyPy in 
> order to prevent such skewed statistics? 
>
>
> Sincerely, 
> Gour 
>
> -- 
> The working senses are superior to dull matter; mind is higher 
> than the senses; intelligence is still higher than the mind; 
> and he [the soul] is even higher than the intelligence. 
>
> http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Gour
On Sat, 28 Sep 2013 07:09:51 -0700 (PDT)
Anthony  wrote:

> Note, even if we update PyPI, download comparisons with web2py will
> likely still not be valid, unless we stop offering the easy zip
> download/install from web2py.com, as many people will still take that
> route. Also, many people upgrade web2py via the "admin" app once it
> is first installed, so upgrades wouldn't be counted by PyPI either
> (unless the admin upgrade mechanism did so from PyPI).

So, we can safely conclude that those download numbers do not speak much
about the popularitity of the two frameworks in question.


Sincerely,
Gour

p.s. It's not that I care much about the popularity (would e.g. use
Windows instead of Linux), but caring about web2py I have brought
that point to the light.

-- 
Those who are on this path are resolute in purpose, 
and their aim is one. O beloved child of the Kurus, 
the intelligence of those who are irresolute is many-branched.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Anthony

>
> > Note, even if we update PyPI, download comparisons with web2py will 
> > likely still not be valid, unless we stop offering the easy zip 
> > download/install from web2py.com, as many people will still take that 
> > route. Also, many people upgrade web2py via the "admin" app once it 
> > is first installed, so upgrades wouldn't be counted by PyPI either 
> > (unless the admin upgrade mechanism did so from PyPI). 
>
> So, we can safely conclude that those download numbers do not speak much 
> about the popularitity of the two frameworks in question.


Yes, that's a very safe conclusion. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Anthony
Note, Flask is a very popular framework, and may even be more prevalent 
than web2py, but certainly not by a factor of 200. Perhaps Massimo has some 
data on downloads from web2py.com.

Anthony

On Saturday, September 28, 2013 10:58:55 AM UTC-4, Anthony wrote:
>
> > Note, even if we update PyPI, download comparisons with web2py will 
>> > likely still not be valid, unless we stop offering the easy zip 
>> > download/install from web2py.com, as many people will still take that 
>> > route. Also, many people upgrade web2py via the "admin" app once it 
>> > is first installed, so upgrades wouldn't be counted by PyPI either 
>> > (unless the admin upgrade mechanism did so from PyPI). 
>>
>> So, we can safely conclude that those download numbers do not speak much 
>> about the popularitity of the two frameworks in question.
>
>
> Yes, that's a very safe conclusion. 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Custom form with jquery acts weird

2013-09-28 Thread Jordan Ladora
Hi Anthony,

Thanks for your note. Like I said, I understand the helpful comments on 
fixing the  issue. 

However, what is unclear to me still is Massimo's (and yours here - 
https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
 
) comments on form processing.. Massimo pointed out that, a la Jonas' post, 
that you cannot do -

form=crud.create(db.comments)
if form.process().accepted

...yet I have:

  form = SQLFORM.factory(*fields)
  if form.accepts(request, session): 

...and that also seems to be wrong (no doubt, since process() is a shortcut 
for accepts(), they are doing the same thing). BUT I am not sure how to 
correct it - you both said that process is getting called twice. OK, if I 
shouldn't use 'if form.accepts(request, session): ' then what should I use 
to process (and call validation on) the form once the user clicks 'Submit' ?

Thanks again,
-jl






On Friday, September 27, 2013 7:36:04 PM UTC-7, Anthony wrote:
>
> If you follow Massimo's suggestion:
>
> Cancel
>
> everything seems to work fine. What problem do you have after making that 
> change?
>
> Anthony
>
> On Friday, September 27, 2013 9:00:47 PM UTC-4, Jordan Ladora wrote:
>>
>> Hi Massimo,
>>
>> Thanks for your help. I think I'm crystal clear on your explanation 
>> regarding the button, but I'm still confused on the other issue that 
>> Anthony answered previously, despite his and your posts.. 
>>
>> In my controller I used:
>>
>>   form = SQLFORM.factory(*fields)
>>
>>   if form.accepts(request, session): 
>>
>>
>> Could you please be a little more specific? What should I use here 
>> instead of 'form.accepts' ? I think this is causing me trouble elsewhere in 
>> my application, too, and it would be really helpful if I knew a little bit 
>> more..
>>
>> Thanks again,
>> -J
>>
>>
>>
>> On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:
>>>
>>> Hi,
>>>
>>> I have the same problem as 
>>>
>>>
>>> https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
>>>
>>> https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ
>>>
>>> From the first thread/link above, "...if I use a regular form, 
>>> {{=form}}, then validation works but not if I use the custom form. Also 
>>> form.process() works, so the problem seems to be related to custom forms.."
>>>
>>> Those threads seemed to end without finding a solution. I think the 
>>> author of those threads didn't realize that the form is actually being 
>>> validated, but it doesn't seem like it b/c the error messages do not show 
>>> with the custom form. 
>>>
>>> In my hands, if I use a custom form, it validates OK but form errors do 
>>> not display and, quite often, any jquery code in the view misbehaves (which 
>>> is the real problem). This behavior turns on and off depending ONLY on 
>>> whether I have a custom form. I used {{=custom.form.begin}} and 
>>> {{=custom.form.end}} and {{=form.custom.widget.xyz}} and 
>>> {{=form.custom.label.xyz}} in the view. If I replace it with {{=form}} then 
>>> everything works perfectly. 
>>>
>>> In the controller, I used 
>>>
>>> if form.accepts(request, session, onvalidation=abc):
>>>   ...
>>>
>>>
>>> Thanks for any help. I love the custom forms and it really stinks not 
>>> being able to use them with jQuery!!
>>>
>>> -jl
>>>
>>> ps - I previously posted with more details about this problem, before I 
>>> realized the problem seems related more generally to javascript/jquery + 
>>> custom forms -
>>>
>>> https://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg
>>> https://groups.google.com/forum/?fromgroups=#!topic/web2py/0LpfMJPwSsI
>>>
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Custom form with jquery acts weird

2013-09-28 Thread Anthony


> form=crud.create(db.comments)
> if form.process().accepted
>

Right, you cannot do that. 

 

>   form = SQLFORM.factory(*fields)
>   if form.accepts(request, session): 
>

The above is perfectly fine (though form.process().accepted is now 
preferred to form.accepts(request, session)).

My question was exactly what problem are you having with the above>The app 
you attached uses the above, and it works fine.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Parsing only first items with Python's feedparser

2013-09-28 Thread lesssugar
In the RSS aggregator section, the web2py's book shows an example taht uses 
Python's feedparser (http://pythonhosted.org/feedparser/):

d = feedparser.parse("url")

- this way all the items in the feed get parsed.

However, some of external RSS feeds may take lots of time to parse. Does 
anyone know how to parse e.g. the first 10 items of an external feed using 
feedparser?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Multiple buttons in links of smartgrid

2013-09-28 Thread Niphlod


On Saturday, September 28, 2013 3:59:34 PM UTC+2, 黄祥 wrote:
>
> thank you so much for your detail explaination. i'm sorry, my fault for 
> indentation, because to make it simple and straight to the point,  i take 
> the code from the conditional, then remove the indentation (tab).
> it works well now.
>
> it's not a matter on "you must do it" but a matter of "you should do it": 
indentation keeps the code more readable and it will be easier for you to 
spot bugs. Once the code works you can either decide to squash everything 
in the minimum number of lines possible or to keep it fully indented: it's 
just a matter of personal taste. I prefer reading 1k line of 
nicely-indented code than 200 of obscure 400-line long code that does the 
exact same thing. Remember that as soon as the "development process" is 
finished, you'll need to read the code more often than writing a brand new 
large section (squash bugs, improve performances, add features, etc). Nice 
indenting (and possibly lots of comments) makes code more "typo" resilient 
and helps also other people looking at your code to understand what it 
does.  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Custom form with jquery acts weird

2013-09-28 Thread Jordan Ladora
Thanks for that - I'd assumed the button in the form was related, but let 
me try and isolate the other problem and make another app that reproduces 
it.



On Saturday, September 28, 2013 10:09:58 AM UTC-7, Anthony wrote:
>
>
> form=crud.create(db.comments)
>> if form.process().accepted
>>
>
> Right, you cannot do that. 
>
>  
>
>>   form = SQLFORM.factory(*fields)
>>   if form.accepts(request, session): 
>>
>
> The above is perfectly fine (though form.process().accepted is now 
> preferred to form.accepts(request, session)).
>
> My question was exactly what problem are you having with the above? The 
> app you attached uses the above, and it works fine.
>
> Anthony
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] IE8 error in web2py.js line 43, Object doesn't support....

2013-09-28 Thread davedigerati
Way too deep into js and the guts of web2py for me to make sense of this, 
but IE8 is tripping up in web2py.js, line 43:

  doc.on('click', '.flash', function(e){var t=jQuery(this); 
if(t.css('top')=='0px') t.slideUp('slow'); else t.fadeOut(); 
e.preventDefault();});

And in Chrome I can see an error in the javascript console:

   1. Uncaught TypeError: Object # has no method 'on' 
web2py.js:43
  1. 
web2py_event_handlersweb2py.js:43
  2. (anonymous 
function)web2py.js:81
  3. 
cjquery.js:4
  4. 
p.fireWithjquery.js:4
  5. 
x.extend.readyjquery.js:4
  6. q
  

Can anyone suggest where I might start looking to fix this?!??? ;(

FWIW- I tested a clean copy of the executable and it is not throwing that 
error but still is also throwing the :
GET http://127.0.0.1:9000/welcome/static/js/jquery-1.10.0.min.map 404 (NOT 
FOUND) 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: IE8 error in web2py.js line 43, Object doesn't support....

2013-09-28 Thread LightDot
The jQuery map file is optionally used by the browser when debugging 
jQuery, but shouldn't be requested by web2py code or needed otherwise. Are 
you seeing this in IE8 too?

On Sunday, September 29, 2013 5:48:17 AM UTC+2, davedigerati wrote:
>
> FWIW- I tested a clean copy of the executable and it is not throwing that 
> error but still is also throwing the :
> GET http://127.0.0.1:9000/welcome/static/js/jquery-1.10.0.min.map 404 
> (NOT FOUND) 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Massimo Di Pierro
This was not on the web2py IRC channel, was it?

On Saturday, 28 September 2013 04:38:37 UTC-5, Gour wrote:
>
> Hello, 
>
> today when I asked on IRC about whether to use Jinja2 or Mako templates 
> for 
> some static site generator explaining that if we choose Django, than 
> Jinja2 is more similar and same with Mako & choosing web2py, I'm asked 
> 'why web2py?' and was recommended to use Flask. 
>
> The reply why not web2py was "nobody uses it" and I was given the 
> following URLs: 
>
> a) https://crate.io/packages/web2py/#description 
>
> b) https://crate.io/packages/Flask/ 
>
> with the explanation that there are ~2M downloads for Flask and only ~9k 
> for web2py. 
>
> Can someone compare it and/or explain why the last version for web2py 
> listed there is 2.1.1, while for Flask is the last stable one? 
>
>
> Sincerely, 
> Gour 
>
> -- 
> For him who has conquered the mind, the mind is the best of 
> friends; but for one who has failed to do so, his mind will 
> remain the greatest enemy. 
>
> http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: IE8 error in web2py.js line 43, Object doesn't support....

2013-09-28 Thread davedigerati
not sure, when I run the debug in IE8 it trips up on line 43 and so no, I 
am not seeing the 404, but I don't know the IE8 dev tools well enough to be 
positive.

So the fact that I am getting this GET request indicates the browser is 
seeing a problem in jQuery?  Maybe that line 43?


On Sunday, September 29, 2013 12:00:39 AM UTC-4, LightDot wrote:
>
> The jQuery map file is optionally used by the browser when debugging 
> jQuery, but shouldn't be requested by web2py code or needed otherwise. Are 
> you seeing this in IE8 too?
>
> On Sunday, September 29, 2013 5:48:17 AM UTC+2, davedigerati wrote:
>>
>> FWIW- I tested a clean copy of the executable and it is not throwing that 
>> error but still is also throwing the :
>> GET http://127.0.0.1:9000/welcome/static/js/jquery-1.10.0.min.map 404 
>> (NOT FOUND) 
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Microsoft SQL Server Migrate Trying to Create New Table instead of Editing Old One

2013-09-28 Thread PN
Version: Using web2py 2.6.4

Steps:

1. I used web2py DAL to create a table in ms sql. This ran in production 
for a while.

2. I downloaded the web2py app to my development machine, and added a 
column to the table in DAL.

3. When I try to go to the table in web2py admin (database administration) 
with migrate=True, I get an error message " ('42S01', "[42S01] [Microsoft][ODBC SQL Server 
Driver][SQL Server]There is already an object named 'BIG_Mapping' in the 
database. (2714) (SQLExecDirectW)")

4. The error message shows that web2py is issuing a CREATE command, not the 
ALTER command (in the error log)

Any suggestions on further troubleshooting? I can alter the table manually 
but wanted to test migrations through DAL so I understand them for future 
reference.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py vs flask

2013-09-28 Thread Gour
On Sat, 28 Sep 2013 21:28:13 -0700 (PDT)
Massimo Di Pierro
 wrote:

> This was not on the web2py IRC channel, was it?

No, it was on the channel unrelated to either web2py or flask.


Sincerely,
Gour

-- 
Thus the wise living entity's pure consciousness becomes covered by 
his eternal enemy in the form of lust, which is never satisfied and 
which burns like fire.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-28 Thread Gour
On Fri, 27 Sep 2013 17:06:02 +0200
Loïc ESPERN  wrote:

> Depends on what you (or your customers) need...

Exactly.

> I developped my little CMS to build a presentation website for a local
> organization of firefighters in my city. They hadn't a lot of money to
> expend, and they needed something very simple, to edit some webpages
> content. Wordpress / Joomla were already overcomplicated for them.

Similarly, I did web site for non-profit here which is running under
Textpattern (PHP) CMS allowing easy adding/editing of the content by
using Textile markup.

> And so on...
> 
> Finally, of course, a specific app that addresses exactly each
> customer needs is ideal for them. But not every customer will accept
> to pay thousands of dollars for only a few of basic features.

I'm in a similar boat...

My friend running web agency here in Croatia is complaining to me that
many customers just want modified generic WP template and that's all and
not ready to pay for more than few hours work modifying the WP theme.

Now I wonder what to do in a case when

a) I'd like not to combine PHP technology with web2py

b) there is no web2py-powered CMS providing features similar to e.g.
some PHP solutions

c) not having (yet) skills to roll my own CMS ?

In general, one starts by creating static design using some CSS
framework. Then, depending on the customer's needs, I could leave the
site as it is or convert design into some CMS enabling easy
adding/editing of the content.

The option which I am considering lately for my own purpose is to use
some python-powered static-site-generator.

When the need arises to add some interactive/dynamic features to the
site, static-site-generator and/or plain static site is not good-enough.

So, the question is how to start building web2py-powered web site which
should start e.g. as simple brochure site onto which one can further
functionality by writing small apps in web2py?

Do you all write some kind of CMS allowing to add larger portions of
static text/media which make the major portion of the site or do you
combine smaller web2py apps with something else?

What do you think about e.g. building web site via some static site
generator and then write web2py handling some dynamic aspects?

How is e.g. added/edited content to the web2py.com site itself?
Manually?


Sincerely,
Gour

-- 
For him who has conquered the mind, the mind is the best of 
friends; but for one who has failed to do so, his mind will 
remain the greatest enemy.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

-- 
A person who is not disturbed by the incessant flow of 
desires — that enter like rivers into the ocean, which is 
ever being filled but is always still — can alone achieve 
peace, and not the man who strives to satisfy such desires.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Multiple buttons in links of smartgrid

2013-09-28 Thread 黄祥


> it's not a matter on "you must do it" but a matter of "you should do it": 
> indentation keeps the code more readable and it will be easier for you to 
> spot bugs. Once the code works you can either decide to squash everything 
> in the minimum number of lines possible or to keep it fully indented: it's 
> just a matter of personal taste. I prefer reading 1k line of 
> nicely-indented code than 200 of obscure 400-line long code that does the 
> exact same thing. Remember that as soon as the "development process" is 
> finished, you'll need to read the code more often than writing a brand new 
> large section (squash bugs, improve performances, add features, etc). Nice 
> indenting (and possibly lots of comments) makes code more "typo" resilient 
> and helps also other people looking at your code to understand what it 
> does.  
>

yes, i understand, thank you so much for your suggestion and explaination 
about indentation. 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] web2py website down

2013-09-28 Thread 黄祥
hi,

i can't accessed web2py website, is it down right now?
it return :
502 Bad Gateway
--
nginx/1.4.1

after several times, i refresh it return :

Unhandled Exception


best regards,

stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.