[web2py] Re: web2py with python 2.7 and web2py running on python 3

2020-03-20 Thread Tim Nyborg
Should be, but it can depend on what other tools you're using in web 
stack.  E.g., the steps it'll take to get Apache running two different 
environments are different from the steps to get NGINX/Uwsgi, or Gunicorn.

On Saturday, 14 March 2020 19:06:20 UTC, Andrea Fae' wrote:
>
> Is it possible to have 2 differents environment on the same PC?
> web2py running python2.7 and web2py running ppython 3 separated...?
> Thank you 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9034e711-5314-4a58-8538-1590694482d8%40googlegroups.com.


[web2py] tailwindcss with web2py ?

2020-03-20 Thread António Ramos
any thoughts about tailwindcss ?

Seems to me that could be the best option for web2py as it is very
programable as we all like :)

just one nice thing i like...
https://tailwindcss.com/docs/extracting-components

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxMQNukRQ2FC8JaS5UQMztScYsj5HTL_KVFF_bBOafCERQ%40mail.gmail.com.


[web2py] Re: web2py with python 2.7 and web2py running on python 3

2020-03-20 Thread Jonathan Clark
Definitely if you're using the rocket web server. There are various ways to 
run different versions of python on the same machine but it depends on your 
OS how to do it. Once you can run different pythons, you can run different 
versions of web2py at the same time, but you will need to use different 
ports e.g. 8080, 8081 etc. to direct the traffic to the right web2py 
instance. That's without Apache.

I also run different web2py instances behind the same Apache instance on a 
virtual host, but I have set up Apache to forward virtual host one to one 
port (using .htaccess), and virtual host two to a different port. The 
rocket server in web2py in each instance is told which port it should 
respond to. So the browser looks for www.hostone.com, .htaccess forwards 
that to port number 65789, and a web2py instance is run to service requests 
to port 65789. For hosttwo, the port number changes.

Here is a snippet of a .htacces file which does what I want:

RewriteCond %{HTTP_HOST}  hostone.com$
RewriteRule ^(.*)$https://127.0.0.1:65789/$1 [P,QSA,L]

(There is another redirect which directs www.hostone.com to hostone.com).


On Saturday, 14 March 2020 19:06:20 UTC, Andrea Fae' wrote:
>
> Is it possible to have 2 differents environment on the same PC?
> web2py running python2.7 and web2py running ppython 3 separated...?
> Thank you 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ad264a91-085c-404a-b57a-1bd46d00460d%40googlegroups.com.


[web2py] shareable web2py pages on linkedin

2020-03-20 Thread Marco Prosperi
hello, if I share www.mysite.com/mypage, linkedin accepts it (can show a 
preview) but if there is another level as in 
www.mysite.com/blog/my-new_article then it refuses. It seems that this 
doesn't happen if I try to share links with more levels in the url from 
wordpress websites. Do you know how to circumvent this problem with web2py? 
I tried to use blog.mysite.com/my-new-article but I can't figure out which 
should be the controller/function to manage the arg 'my-new-article' (I use 
init, default and index as default app, controller, function)

thanks in advance for hints

Marco

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d6658325-74cc-42db-a07e-e3554fc4b06e%40googlegroups.com.


[web2py] error

2020-03-20 Thread Rashdan Hadri
I cant seem to log in when i get redirected from COursera python basics

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/dfab4473-d340-4283-bf38-5c65f36ce803%40googlegroups.com.


Re: [web2py] Re: off topic - Alpine JS as an alternative to vuejs/react

2020-03-20 Thread Massimo Di Pierro
I tried Alpine. It is very slow compared to vue.js. For me it was a 
non-starter.

On Friday, 28 February 2020 07:21:27 UTC-8, Ramos wrote:
>
> maybe this is helpful
>
> https://www.alpinetoolbox.com/  
>
> Em sex., 28 de fev. de 2020 às 06:19, Massimo Di Pierro <
> massimo.dipie...@gmail.com> escreveu:
>
>> wow. Alpine is pretty good. I will give it a try.
>>
>>
>> On Monday, 24 February 2020 08:33:28 UTC-8, Ramos wrote:
>>>
>>> vuejs is awesome but for simple stuff maybe alpine js is simpler.
>>> Just asking your thoughts if any...
>>> https://github.com/alpinejs/alpine  
>>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/3d1f9908-3313-4c80-a8d7-142b4dfbef93%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a1477e76-b8a8-4603-8d61-dc1b29d32b37%40googlegroups.com.


[web2py] Re: how to expire sessions in py4web

2020-03-20 Thread Massimo Di Pierro
Session and login information are not same. The latter is stored in the 
former. When you logout it clears the login info in the session but does 
not clear the session. There is no need. You can of course do 
session.clear() if you want.

Sessions tells py4web (or web2py) that you are the same user as before. 
auth tells who you are and what you are authorized to do. 

On Tuesday, 3 March 2020 19:03:37 UTC-8, Carlos Hanson wrote:
>
> In chapter 4 of the documentation:
>
> By default py4web sessions never expire (unless they contain login 
>> information, but that is another story) even if an expiration can be set. 
>
>
> I see the truth in that statement, since I set the expiration in the 
> session, but my session never expires. 
>
>
> session = Session(secret=settings.SESSION_SECRET_KEY, expiration=settings.
> SESSION_EXPIRATION)
>
>
> What is the story about sessions containing login information? How do I 
> ensure I am not logged in forever?
>
> Thanks.
>
> Carlos
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/858b1d31-2e0a-47b7-bee2-ce91dcc3c9ba%40googlegroups.com.


[web2py] Re: Py4web readonly Form

2020-03-20 Thread Massimo Di Pierro
You may be right but what is the meaning of submitting and accepting a 
readonly form? What is a use case?

On Friday, 6 March 2020 00:53:17 UTC-8, John Bannister wrote:
>
> Hi All,
>
> I have been testing Py4web and have the following to produce basically a 
> 'view record' option :-
>
> def view_test():
> form=Form(db.auth_user, record=1, readonly=True, deletable=False, 
> formstyle=FormStyleBulma)
> if form.accepted:
> redirect(URL('index'))
> return dict(form=form)
>
> This will redirect if I remove the readonly=True from the form but 
> basically form is just displayed (all fields are readonly) and you can hit 
> the submit button as many times as you like and nothing will happen.
>
> Any ideas??
>
> BR
> John
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2089781a-8a2e-4b62-90d4-98a6183b375b%40googlegroups.com.


[web2py] Re: Py4Web fields of type 'upload' not working

2020-03-20 Thread Massimo Di Pierro
Please open a ticket about this.

On Monday, 9 March 2020 03:42:54 UTC-7, John Bannister wrote:
>
> Hi All,
>
> Still struggling a lot with fields of type 'upload'. Whatever I try the 
> field remains None. Any help greatly appreciated.
>
> Typical use case is as follows:
>
> Model:
> db.define_table('test',
> Field('f_name'),
> Field('l_name'),
> Field('image', 'upload', default='test'))
>
> Controller:
> @action('test', method=['GET','POST'])
> @action.uses('generic.html', session, db, T)
> def test():
> page_title = 'Test'
> messages=[]
> my_dict = request.query.decode()
> post_vars = request.forms
> form=Form(db.test)
> print ('Form vars before are %s' % form.vars)
> if form.accepted:
> print('inside form accepted')
> print ('Form vars are %s' % form.vars)
> elif form.errors:
> messages.append('form %s has errors: %s ' % (form.form_name, 
> form.errors))
> return dict(form=form, page_title=page_title, messages=messages)
>
> All fields/form.vars etc are okay except for image which is always None.
>
> All help greatly appreciated
> John
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/16053fc7-d2e2-4b43-8126-b926303e646d%40googlegroups.com.


Re: [web2py] pyweb login

2020-03-20 Thread Massimo Di Pierro
Try rm -rf app and 

python3.7 -m pip install -U py4web

I think you have an old buggy version
On Monday, 9 March 2020 14:43:47 UTC-7, Maurice Waka wrote:
>
> still getting same results.
> see image attached.
>
>
> On Tue, Mar 10, 2020 at 12:25 AM Jim S  wrote:
>
>> Can you now run
>>
>>
>> py4web-start -c new_apps
>>
>> -Jim
>>
>>
>> On Monday, March 9, 2020 at 4:07:13 PM UTC-5, Maurice Waka wrote:
>>>
>>> FYI
>>>
>>>
>>>
>>> On Mon, Mar 9, 2020 at 9:34 PM Jim S  wrote:
>>>
 When you say 'downloaded the py4web', how did you do it?  

 Have you pip installed py4web in the past?

 Can you cut and paste all of your terminal commands and output here to 
 recreate the problem?

 -Jim

 On Monday, March 9, 2020 at 1:26:16 PM UTC-5, Maurice Waka wrote:
>
> Hi Jim
> I havent done anything yet in coding.
> I just removed all apps, downloaded the py4web but the above 
> errors come with opera browser.
> Regards
>
> On Mon, Mar 9, 2020 at 2:25 AM Jim S  wrote:
>
>> Maybe show the code?  The more code you show the more we can help.
>>
>> -Jim
>>
>> On Sunday, March 8, 2020 at 8:51:15 AM UTC-5, Val K wrote:
>>>
>>> It is strange because opera is chromium based. Keep in mind that 
>>> 'disable cache' takes effect if only console is opened. Are there any 
>>> errors in console during page reloading?
>>
>> -- 
>> 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/pBFfw8y9Bic/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/4e3ba7a1-f16a-44c6-aa99-bcf9f685bdef%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
 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/pBFfw8y9Bic/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/web2py/a3bc3bc0-8a11-4887-a250-d51563515798%40googlegroups.com
  
 
 .

>>> -- 
>> 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/pBFfw8y9Bic/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/3b797da7-940d-4f3e-bb99-e8e1884629bd%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/44987135-60f2-4eba-b0cb-dc446faee380%40googlegroups.com.


Re: [web2py] Re: how to expire sessions in py4web

2020-03-20 Thread Carlos Hanson
Thanks. That makes sense. Unfortunately, I asked the wrong question after
trying to figure out the answer myself.

How do I force a logout after some period of time? I thought expiring the
session would do that. In web2py, I had to extend the time so my users
would stay logged in for a longer period of time. Now I I want to ensure
that aren't logged in for too long.

Thanks.


On Fri, Mar 20, 2020, 11:27 PM Massimo Di Pierro 
wrote:

> Session and login information are not same. The latter is stored in the
> former. When you logout it clears the login info in the session but does
> not clear the session. There is no need. You can of course do
> session.clear() if you want.
>
> Sessions tells py4web (or web2py) that you are the same user as before.
> auth tells who you are and what you are authorized to do.
>
> On Tuesday, 3 March 2020 19:03:37 UTC-8, Carlos Hanson wrote:
>>
>> In chapter 4 of the documentation:
>>
>> By default py4web sessions never expire (unless they contain login
>>> information, but that is another story) even if an expiration can be set.
>>
>>
>> I see the truth in that statement, since I set the expiration in the
>> session, but my session never expires.
>>
>>
>> session = Session(secret=settings.SESSION_SECRET_KEY, expiration=settings
>> .SESSION_EXPIRATION)
>>
>>
>> What is the story about sessions containing login information? How do I
>> ensure I am not logged in forever?
>>
>> Thanks.
>>
>> Carlos
>>
> --
> 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/7FEB2x2pSRM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/858b1d31-2e0a-47b7-bee2-ce91dcc3c9ba%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAHdZOTqJrxi5xwE3yATfCCX5DP6Nipb%3DsXQkzK-rtFYeeQ%2BJmQ%40mail.gmail.com.