[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread Scott Hunter
Did you try removing the quotes around the address? - Scott On Saturday, February 22, 2020 at 4:56:04 PM UTC-5, mostwanted wrote: > > I've created an emailing form in my application but have substituted where > the email goes with a reference that contains the email, the problem is > that now

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread mostwanted
I did try it without the quotes & it still gave me an error! On Sunday, February 23, 2020 at 2:59:04 PM UTC+2, Scott Hunter wrote: > > Did you try removing the quotes around the address? > > - Scott > > > > On Saturday, February 22, 2020 at 4:56:04 PM UTC-5, mostwanted wrote: >> >> I've created a

[web2py] Re: p4web auth issues

2020-02-23 Thread Ruslan Gareev
Hi! Looks like no import of auth воскресенье, 23 февраля 2020 г., 7:28:10 UTC+5 пользователь Maurice Waka написал: > > Using this code, > > File "apps/_scaffolds/controllers.py", line 82, in index > db.posts.insert(message="Welcome "+auth_user.first_name+'.'+' Thank you for > signing in with us

[web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
Hi I have this with the same error: from .common import db, session, T, cache, auth, logger, authenticated, unauthenticated from py4web.utils.auth import Auth On Sunday, February 23, 2020 at 4:38:25 PM UTC+3, Ruslan Gareev wrote: > > Hi! Looks like no import of auth > > воскресенье, 23 февраля

[web2py] Re: p4web auth issues

2020-02-23 Thread Val K
Show your code, please -- 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-

[web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
import os import datetime as dt from datetime import datetime, timedelta, date from .common import db, session, T, cache, auth, logger, authenticated, unauthenticated from py4web import action, request, DAL, Field, Session, Cache, user_in, abort, redirect, URL, Field from py4web.utils.auth impo

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread Scott Hunter
What error did it give you? Are you sure `details.email_address` is defined? On Sunday, February 23, 2020 at 8:13:07 AM UTC-5, mostwanted wrote: > > I did try it without the quotes & it still gave me an error! > > On Sunday, February 23, 2020 at 2:59:04 PM UTC+2, Scott Hunter wrote: >> >> Did y

[web2py] LOAD in py4web

2020-02-23 Thread RHC
HI, I am beginning to experiment with py4web, I like the sound of it and I am looking to convert a web2py project to py4web to see how they compare. It appears that the LOAD (helper?) that was available in web2py templates is not available in py4web. I was using this to populate part of a web

[web2py] web2py upgrade from 2.16.1

2020-02-23 Thread Andrea Fae'
I 'm using web2py 2.16.1 stable on my computer and I used it with python version 2.7. I programmed some sites with this RAD system. So I want to upgrade to the latest 2.18.5 stable and Python 3. What can I do to do it? What could be the implications on my projects made with 2.16 ant python 2? If

[web2py] py4web URL helper documentation missing?

2020-02-23 Thread RHC
HI, Looking at the py4web documentation at http://py4web.com/_documentation/static/index.html#chapter-08 I see the following where I expected to find details of the URL helper. URL The URL helper is documented in [[Chapter 4 URL ../04#URL]] I go to Chapter 4: http://py4web.com/_documentation

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread mostwanted
I am sure details.email_address is defined, I double checked. I redefined my code & added the highlighted lines, now everytime i send the email response flashes an error message. How can I get it to tell me the exact error?? def contact_us(): details=db.hotel_profile(request.args(0, cast=i

[web2py] PY4WEB request.vars error

2020-02-23 Thread Maurice Waka
New issue with py4web. Whats the new code for request.vars?? I get this error: Traceback (most recent call last): File "/home/maurice/.local/lib/python3.6/site-packages/bottle.py", line 1397, in __getattr__ var = self.environ['bottle.request.ext.%s'%name] KeyError: 'bottle.request.ext.vars'

[web2py] Re: p4web auth issues

2020-02-23 Thread Val K
`auth` in py4web is no the same as in web2py to get user-record you should ... def index(): user = auth.get_user() On Sunday, February 23, 2020 at 8:47:46 PM UTC+3, Maurice Waka wrote: > > > import os > import datetime as dt > from datetime import datetime, timedelta, date > from .common im

[web2py] Re: PY4WEB request.vars error

2020-02-23 Thread Val K
p4web `request` is bottle request, see https://bottlepy.org/docs/dev/api.html#bottle.Request On Monday, February 24, 2020 at 12:30:29 AM UTC+3, Maurice Waka wrote: > > New issue with py4web. > > Whats the new code for request.vars?? > > I get this error: > > > Traceback (most recent call last):

[web2py] Re: py4web URL helper documentation missing?

2020-02-23 Thread Val K
Yes, there is no keyword argument `args`, you can just: args = [...] URL('foo_controller', *args, vars = dict(...) ) On Sunday, February 23, 2020 at 11:37:08 PM UTC+3, RHC wrote: > > HI, > > Looking at the py4web documentation at > http://py4web.com/_documentation/static/index.html#chapter-08

[web2py] Re: LOAD in py4web

2020-02-23 Thread Val K
for server side you can @action("foo") @action.uses("foo.html") def foo(): return dict(...) @action("bar") @action.uses("bar.html") def bar(): return dict(foo_content = foo()) # bar.html [[=XML(foo_content)]] for the client side, I suppose, you have to do it by yourself using pure js o

Re: [web2py] Re: LOAD in py4web

2020-02-23 Thread Carlos Cesar Caballero
Or maybe using something like https://github.com/MoOx/pjax El dom., 23 de febrero de 2020 7:02 p. m., Val K escribió: > for server side you can > @action("foo") > @action.uses("foo.html") > def foo(): > return dict(...) > > @action("bar") > @action.uses("bar.html") > def bar(): > return

[web2py] Re: Error importing csv file in python3.6

2020-02-23 Thread Dan Carroll
It Works! YESSS!!! Worked in my code. Now to fix the import csv function in appadmin. Using version 2.18.5 of web2py with python 3.7.0 on pythonanywhere. On Friday, April 26, 2019 at 1:56:39 AM UTC-4, nbac...@bancointernacional.cl wrote: > > I had a similar issue. > I solve it doing this: > >

[web2py] Re: Error importing csv file in python3.6

2020-02-23 Thread Dan Carroll
This works in your own code using import_from_csv_file as well as in appadmin, all for python 3. On Friday, April 26, 2019 at 1:56:39 AM UTC-4, nbac...@bancointernacional.cl wrote: > > I had a similar issue. > I solve it doing this: > > f = request.vars.csvfile.file > import io > file = io.Text

Re: [web2py] Re: p4web auth issues

2020-02-23 Thread Lovedie JC
Thanks. Before you replied I had tried : user = auth.get.user()[first_name] With an error.. 'first_name' is not defined Regards On Mon, Feb 24, 2020, 02:02 Val K wrote: > `auth` in py4web is no the same as in web2py > to get user-record you should > ... > def index(): > user = auth.get_user

Re: [web2py] Re: p4web auth issues

2020-02-23 Thread Scott Hunter
user = auth.get.user()['first_name'] On Sunday, February 23, 2020 at 9:23:06 PM UTC-5, Lovedie JC wrote: > > Thanks. > Before you replied I had tried : > user = auth.get.user()[first_name] > > With an error.. 'first_name' is not defined > Regards > > On Mon, Feb 24, 2020, 02:02 Val K > wrote: > >

Re: [web2py] Re: p4web auth issues

2020-02-23 Thread Maurice Waka
Thanks a lot. Regards On Mon, Feb 24, 2020, 06:14 Scott Hunter wrote: > user = auth.get.user()['first_name'] > > On Sunday, February 23, 2020 at 9:23:06 PM UTC-5, Lovedie JC wrote: >> >> Thanks. >> Before you replied I had tried : >> user = auth.get.user()[first_name] >> >> With an error.. 'firs

[web2py] Re: web2py upgrade from 2.16.1

2020-02-23 Thread Massimo Di Pierro
If you upgrade web2py to the latest and you continue to use python 2.7 everything should work as expected. We do continue to promise python 2.7 backward compatibility (and this is all that we promised). If you chose to upgrade to python 3.7 than your app will probably no longer work. You will h

[web2py] Re: LOAD in py4web

2020-02-23 Thread Massimo Di Pierro
We can add it in utils. But before we do. Do other peopl find it useful? Is that a pattern we should encourage vs, for example, vue.js? On Sunday, 23 February 2020 10:18:51 UTC-8, RHC wrote: > > HI, > > I am beginning to experiment with py4web, I like the sound of it and I am > looking to conver

[web2py] Re: unexpected end of stream - py4web

2020-02-23 Thread Edoardo Torrini
Hi, I will attach you some part of code: The client is written in c# and is implemented in Xamarin: [image: Exception - Xamarine.png] The server is written in python using the py4web framework, I have implemented the scheduling with celery/redis: This is the con