[web2py] multiple controllers with one view

2018-08-19 Thread Nico de Groot
The error is shown because you only send a variable 'id' to the view.  All 
variables used in the view should be send in the dict you return from the 
controller. Please check the web2py book on the website on views and  
controllers.

Nico

-- 
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] changing %(link)s

2018-08-19 Thread Gualter Portella
Hi,

Can anybody provide me with specfic directions on how to do the following 
procedure:

In Auth, by default, email verification is disabled. To enable email, 
append the following lines in the model where auth is defined:

1
2
3
4
5

auth.settings.registration_requires_verification = 
Trueauth.settings.registration_requires_approval = 
Falseauth.settings.reset_password_requires_verification = 
Trueauth.messages.verify_email = 'Click on the link %(link)s to verify your 
email'auth.messages.reset_password = 'Click on the link %(link)s to reset your 
password'

In the two auth.messages above, you may need to replace the URL portion of 
the string with the proper complete URL of the action. This is necessary 
because web2py may be installed behind a proxy, and it cannot determine its 
own public URLs with absolute certainty. The above examples (which are the 
default values) should, however, work in most cases.


How can I change the %(link)s of lines 4 and 5 above. The app is in 
production, but still pointing to http://127.0.0.1:8000/user/verify_email


many thanks in advance,

-- 
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] multiple controllers with one view

2018-08-19 Thread lbjc1978
I have two controllers in an app. 
One controller has functions that manage DAL tables and forms. The second 
has imported module that are sometimes called. They both use one view. I 
have tried to figure out ho to work this out but cant find ho to print 
results to view from the second controller. With this arrangement, I keep 
getting an error message:  

name 'conversations' is not defined


. My second controller has this code:
def conversations():
row = db(db.post.author== auth.user.id).select(db.post.id, db.post.convo
, orderby=~db.post.id, limitby=(0,1)).first()
id = row.convo if row else None
return dict(id=id)


with the view.html
{{=conversations()}}

I tried looking for an example, reference previous items related to this 
and the only answer I got online is this 


-- 
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: Why not to mention support to Python3 on the official sites main page?

2018-08-19 Thread Nico Zanferrari
Hi all,

I've made a  PR to update the Download page (
https://github.com/web2py/web2py/pull/1976).  Also, another PR to update
the first chapters  of the book (
https://github.com/web2py/web2py-book/pull/392) -
with a specific new paragraph 1.8 = "Running web2py with Python 2 vs.
Python 3".

Cheers,
Nico

Il giorno lun 13 ago 2018 alle ore 14:05 Ari Lion BR Sp <
arieh.so...@gmail.com> ha scritto:

> Thank you Massimo,
>
> As our tests, Apps created in Py-3 work in Py-2 and vice-versa - only we
> need to delete "Sessions", and "databases" folder files for migrations
> (proceed fake_migrations_all) and app works.
>
> Thanks for this wondefull  Tool called Web2py.
>
>
> Regards
>
>
> Em domingo, 5 de agosto de 2018 22:33:13 UTC-3, Massimo Di Pierro escreveu:
>>
>> I agree. We should mention it. We should also say that "web2py runs with
>> pyhton 3 BUT web2py apps created with python 2 require web2py running under
>> python 2 and apps created using python 3 requires web2py running python 3.
>> They cannot be mixed."
>>
>> To some this will break the plug and play if they are not careful. Maybe
>> we should create a mechanism to automatically determine which version of
>> python was used to create an app.
>>
>> On Friday, 20 July 2018 18:53:08 UTC-7, Antonio Salazar wrote:
>>>
>>> I try to, as this is the only py2 app I support, but these months I've
>>> been swamped with work. I'll resume testing in September.
>>>
>>> On Friday, July 20, 2018 at 9:06:46 AM UTC-5, Ari Lion BR Sp wrote:

 Hi Antonio Salazar,

 But if we do not test, we would not have how to fix BUGs. Maybe from
 times to times test your whole app on Python3 and report bugs...

 Thanks
 Ari - Brazil



 Em quinta-feira, 19 de julho de 2018 19:38:15 UTC-3, Antonio Salazar
 escreveu:
>
> Last April I downloaded the latest official stable release
> (2017-11-14) and adjusted all my code for Python 3. Unfortunately, two
> serious bugs in the streamer and scheduler made return to Python 2.
>
> Both bugs are fixed in Github, but I'm wary of trying it again until
> it's better tested on Python 3. Since no new stable release has been made
> in eight months, and the current one still has those bugs, I get the
> impression it's not stable yet.
>
>
> On Monday, July 16, 2018 at 7:55:01 AM UTC-5, Ari Lion BR Sp wrote:
>>
>> Hi,
>>
>> I wonder here why Python3 support is not mentioned at the official
>> web2py's website?
>>
>> It is a very important feature which was not enough publicized, in my
>> opinion.
>> It would improove marketing for the framework at least at our
>> Country, Brazil.
>> Peoples colective memory here tends to remeber web2py only suports
>> python2.
>>
>>
>> Thanks,
>> Ari
>>
> --
> 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] Re: Sendin mail

2018-08-19 Thread Gualter Portella
Hi, Stifan. Thanks. No trace back at all. Just the message from the controller.

Enviado do meu iPhone

Em 18 de ago de 2018, à(s) 21:45, 黄祥  escreveu:

> is there any error traceback ? or what is it said on terminal or web2py log?
> perhaps you can start from simple first by following the example from the book
> ref:
> http://web2py.com/books/default/chapter/29/08/emails-and-sms#Sending-emails
> 
> 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 a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/ixO5iFsTD2I/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.