Re: [web2py] Re: web2py and python3

2017-04-02 Thread Alex
Is there any progress or at least a timeline when web2py will officially 
support Python 3?

It's 11 months since the last web2py release and I don't see much activity 
on github. So this is worrying me a little bit. I have a lot of web2py 
projects and I'll start a large project in a few months. I know web2py very 
well and it's a great framework, but at the moment I'm not completely sure 
if it's a good idea to use it for a new project...

best regards,
Alex

Am Donnerstag, 2. Februar 2017 18:39:10 UTC+1 schrieb Paolo Valleri:
>
> In the last months few patches have been accepted in the current master 
> branch, as a result web2py core components can be tested on py3 too. Few 
> features are missing see https://github.com/web2py/web2py/issues/1353.
> Feel free to try and report/fix any new issue discovered.
>
> Paolo
>
> On Thursday, February 2, 2017 at 12:11:37 PM UTC+1, Muhammad Hashim Malik 
> wrote:
>>
>> Its about eight months passed but no news about web3py. What's the latest 
>> updated in this regard?
>>
>>
>>
>> On Wednesday, 25 May 2016 03:17:46 UTC+5, Dave S wrote:
>>>
>>>
>>>
>>> On Tuesday, May 24, 2016 at 1:42:35 PM UTC-7, Sayth Renshaw wrote:

 Of course though as Massimo cited all education institutions are 
 teaching Python 3 and have for a time meaning all the new developers are 
 starting there. If they write new code bases it will be 3, every dev deals 
 with legacy code but is that really the strongest position to take?

>>>
>>> There is a web3py in the works, although it will be experimental for the 
>>> near future.. IIRC, pydal is already P3 compatible.  SQLFORM goes away in 
>>> web3py, AIUI, and FORM will be better supported.  Switching from Bootstrap 
>>> to other view-ish frameworks should be easier.
>>>
>>> /dps
>>>
>>>  
>>>
 On Tuesday, 24 November 2015 09:38:14 UTC+11, Remco Boerma wrote:
>
> I've done my homework and agree Massimo. There is hardly a thing that 
> requires python3 that doesn't work with python2. The only one i know is 
> https://micropython.org/ but it's not a big company, nor a "big" 
> product. 
>
>
> Op woensdag 11 november 2015 16:21:18 UTC+1 schreef Massimo Di Pierro:
>>
>> As of today python 3 is used almost exclusively in schools. Do you 
>> know of any large company that uses Python 3? I do not. But I know many 
>> large companies that use Python 2, including banks.  
>>
>> On Monday, 9 November 2015 01:36:40 UTC-6, Remco Boerma wrote:
>>>
>>> Great one Alex. 
>>>
>>> While searching for web2py and python3 the first result i got was 
>>> this 
>>> . 
>>>  
>>>
 Hi...I m total beginner in python with elastic search also Unicode 
 ... I am looking for a wonderful framework & was keen on web2py..but 
 just 
 happened to read that its not compatible with python 3..

 Pl guide me abt this issue & in selecting framework

 With regards to all,

>>>
>>> I've been asked to start a new internship-company for a project i'm 
>>> involved in. And I so want to take those boys and girls on the web2py 
>>> path, 
>>> but to ask of those new-to-the-market to invest in a legacy language 
>>> (2020 
>>> is only 4 years from now) is something that feels odd to me. Especially 
>>> since i know the power and grace of web2py. 
>>>
>>> I know the subject has been debated and debated but for the sake of 
>>> these students (and these are not the high university kind, but rather 
>>> the 
>>> ground-work and getting-stuff-done folks) i would kindly ask to take 
>>> the 
>>> future into consideration as well as our marketing because web2py is 
>>> simply 
>>> droped out of the equation because of py2. I would love to teach those 
>>> kids 
>>> web2py and be future proof. Many schools already teach things from a 
>>> hundred years ago, let's not do that in IT as well. 
>>>
>>> Thank your for considering. 
>>>
>>> Op vrijdag 6 november 2015 23:57:33 UTC+1 schreef Alex:

 web2py for python 3 would be great. I hope it comes rather sooner 
 than later. I'd love to use python 3, no more str <-> unicode nonsense 
 (which already caused many issues and wasted time for me), type hints 
 (seems to have good support in PyCharm) and other new features. I 
 think the 
 current situation could also scare away potential new users when they 
 see 
 that web2py does not support python 3.

 pyDAL seems to be already compatible with python 3. Is it not 
 possible to make the remaining parts also compatible or are there 
 completely new concepts planned? I for one would completely remove the 
 FORM 
 code - it's nice and easy to get 

Re: [web2py] Sites Powered by web2py

2017-04-02 Thread Ovidio Marinho
Very good!






   [image: http://itjp.net.br] 
 http://itjp.net.b r
  *Ovidio Marinho Falcao Neto*
 ovidio...@gmail.com
Brasil


2017-04-02 17:58 GMT-03:00 Alex :

> The section for "Sites Powered by web2py" does not look very promising and
> also seems outdated. Most pages don't have a screenshot and some of them
> are not even working anymore. When I try to visit the first site I get a
> link to an internal error ticket.
>
> Submitting a new page does not work. We tried to add our website but it
> does not show up. Maybe you want to add it: https://breedarchive.com
>
> Further I'd encourage you to completely restructure the powered by section
> because the current page probably has the opposite desired effect and
> scares off new visitors. Hundreds of applications, many of them with
> questionable content, is not really helpful. It would be much better to
> only show a very small selection (~5) of high quality web2py sites. Each
> one with a screenshot and a short description.
>
> regards,
> Alex
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: [web2py] how string_agg for groupby?

2017-04-02 Thread Alex
Is it possible to do more advanced queries (like using string_agg) with DAL 
in the meantime? Especially string_agg is very useful for efficient queries 
and I need it frequently. As it seems I have to use executesql which is not 
really what I'd prefer.

Are there any plans to implement such functions for DAL?

Alex

-- 
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/d/optout.


[web2py] Sites Powered by web2py

2017-04-02 Thread Alex
The section for "Sites Powered by web2py" does not look very promising and 
also seems outdated. Most pages don't have a screenshot and some of them 
are not even working anymore. When I try to visit the first site I get a 
link to an internal error ticket.

Submitting a new page does not work. We tried to add our website but it 
does not show up. Maybe you want to add it: https://breedarchive.com

Further I'd encourage you to completely restructure the powered by section 
because the current page probably has the opposite desired effect and 
scares off new visitors. Hundreds of applications, many of them with 
questionable content, is not really helpful. It would be much better to 
only show a very small selection (~5) of high quality web2py sites. Each 
one with a screenshot and a short description.

regards,
Alex

-- 
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/d/optout.


[web2py] best place to put style

2017-04-02 Thread Marlysson Silva
The first way is the best option because separate concerns ( views ( HTML ) and 
style (CSS) )

The second you are using all web page with componentes to include in current 
page.. I think that this is not a best pratice..

-- 
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/d/optout.


[web2py] IntegrityError('NOT NULL constraint failed:post.message)

2017-04-02 Thread Maurice Waka


I thought I had escaped/ solved this error. But now am stuck. My db.py code:

Post = db.define_table('post',
   Field('message', 'text', requires=IS_NOT_EMPTY(), 
notnull=False),
   Field('answers', 'text', requires=IS_NOT_EMPTY(), 
notnull=False), 
   auth.signature
   )Post.is_active.readable=FalsePost.is_active.writeable=False

controller:

@auth.requires_login()

def index():
db.post.answers.writable=False
db.post.answers.readable=False
form = SQLFORM(post, formstyle='divs')
if form.process().accepted:
pass
messages = db(post).select(orderby=~post.created_on)
...code
#after several codes in now need to post a message to answers field, 
WITHOUT using a form in the view page
db.post.insert(answers=report)

In my view:

{{for msg in messages:}}
code{{=msg.message}}{{report from answers field}}

My issue is that i keep getting the error: IntegrityError('NOT NULL 
constraint failed:post.message.

The two fields get data from different sources, post.message, from form in 
view and post.answers from a function in the code.

How do I solve this error? Kind 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/d/optout.


Re: [web2py] Re: I can't post into a DAL Field

2017-04-02 Thread Maurice Waka
I had to create another table for 'reply', and it worked.
I appreciate your continuous support!!
Regards

On Sun, Apr 2, 2017 at 11:13 AM, Maurice Waka  wrote:

> Great Antony!. But wait, now I have a new issue:
> IntegrityError: NOT NULL constraint failed: post.message
>
> On Sat, Apr 1, 2017 at 10:49 PM, Anthony  wrote:
>
>> It is not clear what you are trying to do. You can only insert values in
>> fields that exist -- there is no "name" field in your table, so you cannot
>> insert a value for a "name" field. If you want to insert a value for
>> "reply", then you must specify the "reply" field:
>>
>> db.post.insert(reply='report')
>>
>> Where does "name" come from in this scenario?
>>
>> Anthony
>>
>>
>> On Saturday, April 1, 2017 at 11:56:41 AM UTC-4, Maurice Waka wrote:
>>>
>>> I have this:
>>> Post =define_table('post'
>>> Field('message', 'text',
>>> requires=IS_NOT_EMPTY, notnull=True),
>>> Field('reply', 'text',
>>> requires=IS_NOT_EMPTY).
>>> auth.signatue
>>> )
>>> Post.is_active.readable=False
>>> Post.is_active.writable=False
>>>
>>> controller:
>>>
>>> def index():
>>> code
>>> db.post.reply.insert(name='report').to insert into the reply
>>> collumn
>>>
>>> I get error that:
>>> AttributeError:'Field' object has no attribute 'insert'
>>>
>>> If I use:
>>> db.post.insert(name='report')
>>>
>>> SyntaxError: Field name does not belong to the table
>>>
>>> I thought/Learned that to insert: you do e.g.
>>>
>>> db.person.insert(name="Luca")
>>>
>>> db.commit()
>>> What am i doing wrong, and how can i correct it?
>>> 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 a topic in the
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/web2py/u801DTQdpHE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/d/optout.


Re: [web2py] Re: I can't post into a DAL Field

2017-04-02 Thread Maurice Waka
Great Antony!. But wait, now I have a new issue:
IntegrityError: NOT NULL constraint failed: post.message

On Sat, Apr 1, 2017 at 10:49 PM, Anthony  wrote:

> It is not clear what you are trying to do. You can only insert values in
> fields that exist -- there is no "name" field in your table, so you cannot
> insert a value for a "name" field. If you want to insert a value for
> "reply", then you must specify the "reply" field:
>
> db.post.insert(reply='report')
>
> Where does "name" come from in this scenario?
>
> Anthony
>
>
> On Saturday, April 1, 2017 at 11:56:41 AM UTC-4, Maurice Waka wrote:
>>
>> I have this:
>> Post =define_table('post'
>> Field('message', 'text',
>> requires=IS_NOT_EMPTY, notnull=True),
>> Field('reply', 'text', requires=IS_NOT_EMPTY).
>> auth.signatue
>> )
>> Post.is_active.readable=False
>> Post.is_active.writable=False
>>
>> controller:
>>
>> def index():
>> code
>> db.post.reply.insert(name='report').to insert into the reply
>> collumn
>>
>> I get error that:
>> AttributeError:'Field' object has no attribute 'insert'
>>
>> If I use:
>> db.post.insert(name='report')
>>
>> SyntaxError: Field name does not belong to the table
>>
>> I thought/Learned that to insert: you do e.g.
>>
>> db.person.insert(name="Luca")
>>
>> db.commit()
>> What am i doing wrong, and how can i correct it?
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/u801DTQdpHE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/d/optout.