[web2py] Re: Does anyone have a stripe connect demo or example for web2py?

2022-04-05 Thread Jose C
Here's some code that I use... hopefully should get you started. In your python environment: pip install stripe Then in a controller (donations): ``` def __create_stripe_session(item_name='', amount_cents=0, success_url='', cancel_url='', item_description='', customer_email=None): """

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
The problem is that I had not installed pyodbc (I use MS SqlServer) and I was using some version of the web2py itself. Installing pyodbc works fine El jueves, 2 de diciembre de 2021 a las 11:39:39 UTC-3, Jose escribió: > I add something. If instead of making select * from MyView I dosel

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
I add something. If instead of making select * from MyView I doselect MyField, AnotherFiel from MyView works in this way I create the dictionary with equal keys to the first letter of each field in lowercase [{'m': 6, 'a': 'xx'}] Jose El jueves, 2 de di

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
Something else if I make select * from myView I get RuntimeError: Result set includes duplicate column names. Specify unique column names using the 'colnames' argument but I do not have duplicate fields El jueves, 2 de diciembre de 2021 a las 11:15:40 UTC-3, Jose escribió: >

[web2py] Re: Avoid colnames in executesql

2021-12-02 Thread Jose
If I do not define colnames I get rows[0]['MyField'] KeyError: 'MyField' El jueves, 2 de diciembre de 2021 a las 9:15:46 UTC-3, Jose escribió: > I'm migrating an old app that runs in an old version of web2py in > python27. In a lot of places I use db.executesq

[web2py] Avoid colnames in executesql

2021-12-02 Thread Jose
tored procedures If I pass a list with the names of the fields it works, but it is something I want to avoid. rows = db.executesql(_sql, as_dict=True, colnames=['MyField']) # This works fine Is there any way to avoid the list with the names of the fields? Jose -- Re

[web2py] Re: Is it time to take redis off the features list?

2020-11-13 Thread Jose C
I have it working with python3 but only as far as web2py 2.18.5. Thereafter I cannot get it to work either. Unfortunately it does begin to appear that web2py has reached end of life status. On Friday, 13 November 2020 at 03:13:18 UTC Joe Barnhart wrote: > I know this is really old news, but

Re: [web2py] Re: Migrate a PostgreSQL Webfaction DB to Opalstack

2020-10-27 Thread Jose C
On Tuesday, 27 October 2020 at 14:35:23 UTC Ramos wrote: > rsync is awesome :) > thank you > Yes, a very nifty little utility... and if you backup to any cloud providers, then check out rclone as well (built on rsync). -- Resources: - http://web2py.com - http://web2p

[web2py] Re: Migrate a PostgreSQL Webfaction DB to Opalstack

2020-10-27 Thread Jose C
Opalstack have some migration tools available: https://community.opalstack.com/d/155-howto-migrate-stuff-automatically-from-webfaction Also I found my old notes from when I moved my web2py apps and PG databases over 18 months ago, hopefully they will help. Also includes how to sync images dire

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-26 Thread Jose C
On Monday, 26 October 2020 01:55:05 UTC, Carlos A wrote: > > Try this: > > cd ~/apps/yourapp > source env/bin/activate > cd web2py/ > python -c "from gluon.main import save_password; > save_password(raw_input('admin password: '), )" > > Note: You can find your assigned port with the command "ls

[web2py] Re: Web2py adn Gzip

2020-10-24 Thread Jose C
On Saturday, 24 October 2020 20:13:23 UTC+1, Jose C wrote: > > > The zip_static_files.py utility in your web2py scripts directory will > create gzipped versions of all your static files for you. > >> Great. >> However something goes wrong. >> > > As

[web2py] Re: Web2py adn Gzip

2020-10-24 Thread Jose C
> The zip_static_files.py utility in your web2py scripts directory will create gzipped versions of all your static files for you. > Great. > However something goes wrong. > hmmm, what is your python version? And web2py version? I'm suspecting this tool hasn't been updated to py3. -- Resour

[web2py] Re: Web2py adn Gzip

2020-10-24 Thread Jose C
I requested gzip as well for a static media site (https) and they said: Our front-end Nginx server will not use gzip compression for requests > served over HTTPS. This is by design as a mitigation for the BREACH > exploit . > > We've an internal feature tick

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread Jose C
On Wednesday, 21 October 2020 20:10:02 UTC+1, Gaël Princivalle wrote: > > Thank you Jose for your help. The Opalstack support have found an error in > the install script, now it works fine. > ' For some reason the install script stored the wrong password hash > That'

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread Jose C
Can you try this: Edit the parameters_.py file that was created and prepend 'md5$$' to the string of alphanum characters. So it should now read (where the dots are the original text): password='md5$$...' then stop and restart your app and see if you can l

Re: [web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread Jose C
On Wednesday, 21 October 2020 15:21:03 UTC+1, Ramos wrote: > > me too am crying a litle > just send email to sup...@opalstack.com > The response time is not as fast as webfaction support but maybe the are > having a burst of clients from webfaction. > > Just looking at the volume on their fo

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread Jose C
On Wednesday, 21 October 2020 13:50:05 UTC+1, Gaël Princivalle wrote: > > Thank you José, I've found the README file and the password. > However this password is not accepted. > I've made another Web2py installation but the result is the same. > > As this is quite the first step to migrate my Web

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-21 Thread Jose C
On Wednesday, 21 October 2020 10:46:03 UTC+1, Gaël Princivalle wrote: > > I've installed Web2py on Opalstack but the Web2py admin password is not > the same as my shell one. How was it for you? > How did you install it? If you manually downloaded and installed it then the initial password crea

[web2py] Re: Opalstack for ex-webfaction users or people looking for a Web2Py Web Hosting (Tutorial for Python 3 or 2.7)

2020-10-20 Thread Jose C
=utf8mb4 > Hi Gael, There's really no difference to the way it worked on webfaction. That link above was a version issue with the psycopg2 library and Antonio shared a way to install the latest psycopg2 version (as did I, using psycopg2-binary package). I wouldn't change databases. H

[web2py] Re: python3 sintax

2020-10-19 Thread Jose C
On Monday, 19 October 2020 22:06:02 UTC+1, Ramos wrote: > > can someone help ? understant why this worked in python 2.7 and not python > 3.6 > > File > "/home/ramos/apps/fileit/web2py/applications/fileit/views/default/user.html", > line 75 > if 'HELP' in globals() and globals()['HELP'

Re: [web2py] Re: opalstack dal connection time out ?

2020-10-19 Thread Jose C
On Monday, 19 October 2020 21:51:00 UTC+1, Ramos wrote: > > got the answer from support > > Hi António, if you need psycopg2 then please install it like this: > > export PATH=/usr/pgsql-11/bin/:$PATH > cd ~/apps/fileit > source env/bin/activate > pip install psycopg2 > > Glad to hear it's working

[web2py] Re: opalstack dal connection time out ?

2020-10-19 Thread Jose C
I'm also on opal5 using postgres but still on web2py 2.18.5 (can't upgrade due to unresolved redis session issue). I suspect you have a library version problem. You're using the default system-wide python3 install, which is using psycopg2 version 2.7.7. (Run psycopg2.__version__ at the comman

[web2py] Re: routes.py and root_static

2020-10-19 Thread Jose C
On Monday, 19 October 2020 10:33:50 UTC+1, Annet wrote: > > Hi Jose, > > Thanks for your reply. > > One more thing. I've got routes.py in web2py's root folder, as you can see > I've got > three applications, do I place the robots.txt file in all three &

[web2py] Re: scheduler error no such column: scheduler_task.broadcast

2020-10-18 Thread Jose C
I'm not sure if this is different with sqlite but with postgres and mysql, you would do the following: 1) delete all the .table files in the databases directory 2) set migrate=True and fake_migrate=True (also make sure lazy_tables is False) 3) start your app with the scheduler option enabled. Yo

Re: [web2py] Re: web2py hosting

2020-10-16 Thread Jose C
> > Did someone tried this one? > https://www.mddhosting.com/ > > It seems a new company made by old Webfaction guys. > > Not sure about that. They say their company was created in 2007. WF was still brilliant then. The only 'new' company founded by ex-Webfaction guys that I know of is Opalst

Re: [web2py] Re: web2py hosting

2020-10-16 Thread Jose C
On Friday, 16 October 2020 15:11:40 UTC+1, Ramos wrote: > > This is not good for me , opalstack is offline for support sometimes. > > Webfaction is always on and has a ticketing system with a priority flag! > Not sure how you got to that screen - looks like an online chat window? I've alw

[web2py] Re: How to use multiple bespoke 400 pages with error text

2020-10-16 Thread Jose C
On Wednesday, 14 October 2020 15:43:05 UTC+1, hyan...@googlemail.com wrote: > > I'm creating my own bespoke 404 / 400 error page by editing routes.py like > this: > > routes_onerror = [('app/400', '/app/default/custom_400.html')] > > and I have 2 questions: > > 1) The custom_400 page is display

[web2py] Re: routes.py and root_static

2020-10-16 Thread Jose C
our site (e.g. https://mydomain.com/robots.txt) go in the /static directory of your app and then you specify them in the root_static list as you've done. Reminder, you need to restart your app each time you change anything in routes.py for the new changes to take effect. Jose

Re: [web2py] Re: web2py hosting

2020-10-16 Thread Jose C
once a minute via cron isn't enough. See this thread for details: https://community.opalstack.com/d/13-mail2script-functionality HTH, Jose On Friday, 16 October 2020 at 09:44:02 UTC+1 Ramos wrote: > i need https ssl certificates (automatic letsencrypt). opalstack and > pyth

Re: [web2py] Re: web2py hosting

2020-10-14 Thread Jose C
luck with your migrations. Jose On Wednesday, 14 October 2020 at 15:51:52 UTC+1 Ramos wrote: > no python??? on TsoHost?? > > Em qua., 14 de out. de 2020 às 15:50, António Ramos > escreveu: > >> no postgresql db... i´m doomed >> >> Em qua., 14 de out.

[web2py] Re: web2py hosting

2020-10-12 Thread Jose C
e customer focus and willingness to help that originally made WF famous, that is, until their encounter with the Borg/GD ;) I doubt you'll have any regrets, Jose On Saturday, 10 October 2020 at 17:07:20 UTC+1 Annet wrote: > Hi Antonio, > > I came across your post, and thought

Re: [web2py] Re: fake_migrate=True is not working

2020-08-28 Thread Jose C
> > thank you Jim, but I don't understand... > > If I set > migrate=False > fake_migrate= True > > it means that web2py create the .table files without touching the db, > isn'it? > > If I set > migrate=True > fake_migrate=True > > It means what exactly? > migrate=True tells web2py to do the tab

[web2py] Re: Samesite attribute in cookies

2020-08-08 Thread Jose C
What version of web2py are you using? At least from 2.18.5+ it specifically defaults to samesite Lax (and you would have to call session.samesite(False) to override the Lax setting). You could try put session.samesite('Lax') somewhere in your model and see if that resolves the issue. You ca

Re: [web2py] Use cron

2020-07-29 Thread Jose C
Hi Dave, This is a problem for you? I've had my scheduler running on AWS and > Postgres for months without issue. I actually have a second scheduler > running in sqlite3 on the same machine. No issue. > Actually it becomes more of an issue if you are on a shared server with a limited shared

[web2py] Re: Autocomplete JSON output format.

2020-07-28 Thread Jose C
I suspect that it has to do with the headers that are set on the response object. When calling the function with .json extension (as in my example) the content-type headers are automagically set by web2py to application/json and the content formatted accordingly. >From what I can tell, you

[web2py] Re: Autocomplete JSON output format.

2020-07-28 Thread Jose C
One way to get your 2nd option: in controller: def country_list(): countries = [] for rec in db(query).select(db.vtx_vertex.name, left=left, distinct=True, orderby=db.vtx_vertex.name): countries.append(rec.name) return dict(suggestions = countries) in the view (js), call the

Re: [web2py] Use cron

2020-07-28 Thread Jose C
Just FYI, the web2py book states: Try to avoid web2py cron, and use a background process instead. web2py cron > can start too many Python instances and cause excessive memory usage. > Using scheduler means an additional long running process using up memory to monitor and manage the scheduler.

[web2py] Re: Security Issue??????

2020-07-10 Thread Jose C
omains; preload' response.headers['Referrer-Policy'] = 'no-referrer-when-downgrade' response.headers['X-Powered-By'] = '' response.headers['X-Frame-Options'] = 'DENY' HTH, Jose -- Resources: - http://web2py.com - http://web2py.

Re: [web2py] Re: Displaying errors in bootstrap collapse

2020-07-09 Thread Jose C
Glad it helped, cheers. -- 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: Displaying errors in bootstrap collapse

2020-07-08 Thread Jose C
ng like that work in your case? On field focus, does the collapse open automatically? HTH, Jose How about in your controller, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

Re: [web2py] Re: Session / Originating IP

2020-07-08 Thread Jose C
ys)" More info: http://www.web2py.com/books/default/chapter/29/09#Auth-Settings-and-messages HTH, Jose -- 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 Issue

[web2py] Re: Session / Originating IP

2020-07-08 Thread Jose C
nd connect to your site again with your local wi-fi connection (which is a different ip). Should give you the answer. Hope that helps, Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.c

[web2py] Re: 2.19.1 redis sessions problem

2020-06-10 Thread Jose C
s reliably. >>> Sorry to be negative about this, it just seems it isn't a priority for the >>> project. >>> >>> -Jim >>> >>> >>> On Saturday, March 28, 2020 at 5:30:11 AM UTC-5, Jose C wrote: >>>> >>>> J

[web2py] Re: __pycache__

2020-05-21 Thread Jose C
I just wonder where the directory and the file came from. I don't > > think I compiled the init application. > > > It's created by Python3... There's a good discussion on it at stackoverflow <https://stackoverflow.com/questions/16869024/what-is-pycache#16869074>

[web2py] Re: Webfaction anyone ??

2020-05-21 Thread Jose C
ong hours looking for and evaluating alternatives to WF and at long last, found the Opalstack guys. Been with them a year now, using their shared servers in Germany and the US. Hope this helps/saves someone a lot of effort and time, Jose -- Resources: - http://web2py.com - http://web2py.co

[web2py] 2.19.1 redis sessions problem

2020-03-28 Thread Jose C
it to work correctly. Can anyone confirm whether they have this issue when trying to login using redis sessions in 2.19.1 (with py3)? If confirmed, I'll file a bug report. Thanks, Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2

[web2py] Re: Redis session error - latest web2py master

2019-11-29 Thread Jose C
On Thursday, 28 November 2019 23:21:39 UTC, Massimo Di Pierro wrote: > > py4web does sessions in redis by default (if you have redis). Just saying. > Yep and it looks promising but I don't have the guts to migrate a mature site with tens of thousands of users on to it yet - a bit too bleeding edg

[web2py] Re: Error on model db.py

2019-11-28 Thread Jose C
Remove the bracket after 'reference person' on line 16. On Thursday, 28 November 2019 21:07:56 UTC, Chuck G. Madamombe wrote: > > I have attached the code and the error message. Please help! > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] Re: Redis session error - latest web2py master

2019-11-28 Thread Jose C
> > > Any feel for how many people are using redis for sessions? > > +1 on on redis for sessions. Use it for multiple apps although they're all older web2py versions and python 2 setups. Upgrading one to python 3 and web2py 2.18.5 which is when the redis session functionality broke. Jim's fi

[web2py] Re: Redis session error - latest web2py master

2019-11-15 Thread Jose C
Nice catch, Jim the .decode() on line 192. It appears to be working as expected now (at least in my use case). I am going to continue testing session functionality and will report if any further issues arise. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

Re: [web2py] Re: Error with sessions on redis

2019-11-08 Thread Jose C
> What do you think about Joe Barnhart's solution? > My point with redis is that I am using database sessions, finally my > goal is to unburden it since I have plenty of RAM on the application > server ... > I haven't tried it but as Joe says his patch was rejected but I'm not sure why. Co

Re: [web2py] Re: Error with sessions on redis

2019-11-08 Thread Jose C
Hi Aureo, You're hitting a bug in web2py's redis session implementation that does not yet have a fix. Basically redis cannot be used for sessions at this stage with web2py 2.18.5 and either versions 2 or 3 of the redis python library. see (for your bug): https://groups.google.com/forum/#!sear

Re: [web2py] Re: Error with sessions on redis

2019-11-08 Thread Jose C
> Web2py: 2.18.5-stable+timestamp.2019.04.08.04.22.03 (running on > gunicorn/19.9.0, Python 2.7.15+) > py-redis: 4.0.9 > Redis server v=4.0.9 sha=:0 malloc=jemalloc-3.6.0 bits=64 > build=9435c3c2879311f3 > redis-cli 4.0.9 > OS: Ubuntu 18.04.1 LTS > > HI Aureo, Which version of t

[web2py] Re: Error with sessions on redis

2019-11-08 Thread Jose C
I can't reproduce this error with my particular setup. Can you post details about which versions of software you're running? Specifically web2py, python, py-redis module, redis itself and which os? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Re: Redis session error - latest web2py master

2019-11-06 Thread Jose C
ort on github. Regards, Jose -- 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] Re: Redis session error - latest web2py master

2019-11-04 Thread Jose C
redis to the default disk based sessions works as expected so it appears to be something related to the redis implementation. Can anyone confirm whether they are using redis for sessions successfully in a configuration similar to the above? Thx, Jose -- Resources: - http://web2py.com -

[web2py] Re: session object: can't hold session.variable

2019-11-03 Thread Jose C
ug toolbar with the session and request contents in there (plus some other useful stuff)... might help troubleshoot. HTH, Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

[web2py] Redis session error - latest web2py master

2019-11-02 Thread Jose C
, 2 Nov 2019. redis: 5.0.4 python-redis: 3.3.11 os: ubuntu 18.04 LTS Traceback (most recent call last): File "/home/jose/python-environments/winp_ca/lib/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/home/jose/python-environments/win

[web2py] Re: invalid function every other page view

2019-08-17 Thread Jose C
> Weird situation where I just created a new app from admin and have the > simplest app. When a visit the page and continue to refresh, on about every > other refresh I get "invalid function". I don't think I'm on any sort of > round robin, load balancing. It's very strange. I've reloaded rout

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Glad to have helped. Cheers, On Friday, 2 August 2019 09:40:05 UTC+1, Rahul wrote: > > Hi Jose, > Thank you !! That worked ... the point #4 resolved that issue. So > now no need to work with Apache and all is working well. Thanks a million!! > artpic.in and targetsoft.

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
lves your issue. I don't have any experience at all with Apache and if point 4) above doesn't resolve your issue then the Apache config is where I would be inclined to look. Unfortunately I'm unable to help you with that, sorry. Jose -- Resources: - http://web2py.com - http:

Re: [web2py] Re: Hosting question

2019-08-01 Thread Jose C
Strange... 1) First of all, can you confirm this is a routes.py file in the web2py root directory and that there are not any routes.py (app-specific routers) files present in the app directories as well (that could be overriding the main routes.py)? 2) The config I posted is my live config (ot

[web2py] Re: Hosting question

2019-08-01 Thread Jose C
> > I use Lets encrypt certificates and redirecting from 80 to 443, and I > don't touch virtualhost file in port 80 so for sure, i'm doing something > wrong with apache3 and for sure with host names in appconfig.ini > > [host] >> names = localhost:*, 127.0.0.1:*, *:*, * >> >> That is worrying.

Re: [web2py] Re: Hosting question

2019-08-01 Thread Jose C
> > > Have you removed welcome application from web2py applications folder > or it still resides there but when accessed gives 404? I am using python > 2.7.13 . I will try your settings for routes and get back to you. > Normally I always delete the app, but for testing this issue I left

[web2py] Re: Hosting question

2019-08-01 Thread Jose C
> > > I added the line in routes.py - While it restricts allowing > access to other applications like welcome it does not restrict > redirection - so in my case it still redirected to welcome application > mentioning something is wrong message. > > Odd. I have a similar setup to you

[web2py] Re: Hosting question

2019-07-31 Thread Jose C
> I want to avoid this and the users must only get redirected to the two sites that are hosted. What should I do ? Two options. 1) remove the default welcome app from your live server (simply delete the directory). 2) Add this key to your BASE dict (which basically tells web2py which apps are

Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Jose C
Darn, I hunted around but didn't see it. Thanks for the link... On Monday, 29 July 2019 10:06:42 UTC+1, Nico Zanferrari wrote: > > Hi Jose, > > the documentation is already on GitHub > <https://github.com/web2py/py4web/tree/master/apps/_documentation/static/chapters

[web2py] Re: web3py -> py4web

2019-07-29 Thread Jose C
Looks promising... some questions: 1) Have spotted many typos in docs but can't find docs for py4web on github. If docs are on there, like web2py book, people can submit pull requests and help massage the docs into shape. 2) Should there be a new official group created for py4web (or some other

[web2py] Re: Getting a PWA set up based on web2py

2018-10-10 Thread Jose C
> > > The main thing about PWAs appears to be that the service worker javascript > files need to be accessible from the domain root. > ... > The main issue I'm having so far is getting a 404 error when trying to > load the service worker file (upup_sw.js) which I think is a path issue > (inside

[web2py] Re: web2py-ipython shell error: "list index out of range"

2018-07-08 Thread Jose C
Great Stifan, thanks for confirming. I'll file a bug report with the dev team. Regards, Jose On Sunday, 8 July 2018 12:41:59 UTC+1, 黄祥 wrote: > > yes, have the same error too on docker, not sure on line 329, i've checked > it shown: > 'import IPython erro

[web2py] Re: web2py-ipython shell error: "list index out of range"

2018-07-08 Thread Jose C
may have been introduced into the newer versions. Can I ask you to please re-run your test for confirmation with the nightly version at: https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip Thanks, Jose -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] web2py-ipython shell error: "list index out of range"

2018-07-07 Thread Jose C
ctive. Steps to reproduce below. jose@VM-ubu1804x64:~/python-environments$ python3 -m venv w2p_test jose@VM-ubu1804x64:~/python-environments$ workon w2p_test (w2p_test) jose@VM-ubu1804x64:~/python-environments$ pip3 install ipython (w2p_test) jose@VM-ubu1804x64:~/python-environments$ ipython Python 3.6.

[web2py] Re: Getting wrong Results with my grading system

2017-11-19 Thread Jose C
This is starting to look like a homework assignment. You do not seem to understand what the >= (greater than or equal to) means. The python statement: if perc >=100: grade='A' elif perc >= 79: grade='B' ... means or reads as (in English): if the value in 'perc' is greater than or equal to 10

[web2py] Re: Getting wrong Results with my grading system

2017-11-18 Thread Jose C
Simple logic error... Your first if clause should most likely be: if perc >= 90: in order to trap that value. -- 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 Iss

[web2py] Re: Codec MS-SQL, unicode Latin1 UTF8

2017-05-18 Thread Jose
Hi J-Michel Angers Given: pydal <-> pyodbc <-> UnixODBC <-> FreeTDS <-> MSSQL In freetds.conf I have: client charset = UTF-8 and in pydal I use mssql2 adapter, db_codec is not necessary Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentat

[web2py] Re: Error background task with Redis

2016-12-21 Thread Jose de Soto
Hi Fabiano, Maybe to late. Here you have a full app based in python-rq: https://github.com/josedesoto/web2py-rq-dashboard On Tuesday, 16 June 2015 19:15:03 UTC+2, Fabiano Faver wrote: > > Failed to copy the 2 error. The full traceback of the second error: > Traceback (most recent call last): >

[web2py] MS SQLServer in Latin1

2016-11-04 Thread Jose
This fails: tb_t_utf8.insert(name='Ñandú') Result: Ã?andú - And if inserted from a form also fails [*] With that fails I mean that inserts the record but with rare characters. [**] All html files are in utf8 Best Regards Jose -- Resources: - http://web2py.com - http://web

[web2py] MemoryError

2016-09-02 Thread Jose
question is: why the memory problem arose when in fact I have more memory available? Best regards Jose [1] https://groups.google.com/forum/#!topic/web2py/kq6c9_av8Ps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

[web2py] Re: logout don't kill session

2016-08-26 Thread Jose Eleudson Gurgel Queiroz
em in administrator menu created with T('Log Out'),URL('default','user', args='logout')==URL(),URL('default','user',args='logout'),[] activate debug and require PDB command to continue. Thanks! Em sexta-feira, 29 de julho de 2016 13:11:

[web2py] Re: logout don't kill session

2016-08-26 Thread Jose Eleudson Gurgel Queiroz
More information. The auth.navbar generate this URL http://localhost:8000/eadnotas/default/user/logout?_next=/eadnotas/default/index that not logout the user. I create a new item in administrator menu with (T('Log Out'),URL('default','user',args='logout')==URL(),URL('default','user',args='log

[web2py] logout don't kill session

2016-07-29 Thread Jose Eleudson Gurgel Queiroz
The SAME app conclude the logout operation on one server, but not on another or local server. Don't show the flash message of confirm logout. Thanks! Eleudson -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: Problem sending emails. Various errors from different Ports

2016-07-28 Thread Jose C
ngs.server = 'smtp.gmail.com:587' mail.settings.login = 'me:my_passw' sent_ok = mail.send( to = [sendto_add], sender = sender, bcc = [bcc], subject = subject, message = (body_txt, body_html)

Re: [web2py] Unable to send mail using gmail.com in web2py

2016-07-05 Thread Jose de Soto
Maybe too late, but I just found Google has added many security improvements. In my case the emails stop working. To fix it I have done: 1- Enable less secure apps: https://www.google.com/settings/security/lesssecureapps 2- Unlock Captcha for the account: https://accounts.google.com/DisplayUnlo

[web2py] Re: Webfaction error after updating

2016-06-01 Thread Jose
I chose to use nginx + uwsgi. Thanks José -- 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 Goo

Re: [web2py] webfaction nginx + uwsgi

2016-06-01 Thread Jose
Already solved. The problem was uwsgi which was compiled by me. I tried to install with pip and it works all right. Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] webfaction nginx + uwsgi

2016-06-01 Thread Jose
worker 4 (pid: 27025, cores: 7) spawned uWSGI worker 5 (pid: 27026, cores: 7) Any idea how to fix it Best regards Jose [1] https://groups.google.com/forum/#!topic/web2py/7mTex8ufUOo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (

[web2py] Webfaction error after updating

2016-05-31 Thread Jose
Hi, Before upgrading was this: mod_wsgi 3.4/Python 2.7 + Web2py Version 2.5.1-stable [I have several applications in web2py] 1) upgrade to mod_wsgi 4.5.2/Python 2.7 + Web2py Version 2.14.6 After this, when starting apache the first application that came worked well, but the other (whatever)

[web2py] SQLFORM.smartgrid with two references to same perent table

2015-12-25 Thread Jose Eleudson Gurgel Queiroz
*With this tables:* db.define_table('tbProduct', \ Field('category_id','reference tbCategory', label='Category', ondelete='RESTRICT'), \ Field('group_id', 'reference tbGroup', label='Group', ondelete='RESTRICT'), \ Field('name', 'string

[web2py] Re: upload using restful

2015-11-24 Thread Jose
Hi Leonel How it is handled on the server (web2py app)? -- 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 subscr

[web2py] upload using restful

2015-11-24 Thread Jose
Hi How I can upload a file using RESTful api? Jose -- 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

[web2py] Re: Wizard inside a LOAD

2015-10-05 Thread Jose
El viernes, 2 de octubre de 2015, 19:49:52 (UTC-3), Niphlod escribió: > > tested and retested. it works. please inspect your form and see if the > correct url is generated and put in the action attribute. > > > You are right. It works. But in my case it will not work because it is not linear bu

[web2py] Re: Wizard inside a LOAD

2015-10-02 Thread Jose
> For now the proposed fix/workaround is to pass an explicit _action to the > FORM, which will prevail if explicitely found. > Its quite easy because _action=URL() gets things done pretty quickly and > painless. > > this has not worked -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: Wizard inside a LOAD

2015-10-01 Thread Jose
I found this [1] and [2]. it seems that with some modifications on an old version of web2py work (web2py.js and web2py_ajax.html), but I can not fix it in new versions José [1] https://groups.google.com/forum/?fromgroups#!topic/web2py/J7-SD0n8hQQ [2] https://groups.google.com/forum/#!msg/web2

[web2py] Wizard inside a LOAD

2015-09-30 Thread Jose
Hi I am embedding wizard in a LOAD {{=LOAD('default', 'f1', ajax=True, ajax_trap=True)}} def f1(): form = FORM(...) if form.process().accepted: #I do something redirect(URL('f2')) return form def f2(): form = FORM(...) if form.process().accepted:

[web2py] Re: Upload via ajax

2015-09-03 Thread Jose
El jueves, 3 de septiembre de 2015, 14:50:37 (UTC-3), Jose escribió: > > Hi > > I want to upload a file via ajax. What I have working for when the file is > stored in a folder, the problem and when I want it stored in a blob field. > > *In upload_picture function I do no

[web2py] Upload via ajax

2015-09-03 Thread Jose
Hi I want to upload a file via ajax. What I have working for when the file is stored in a folder, the problem and when I want it stored in a blob field. *In upload_picture function I do not know how to put the value of image_blob * The code is as follows ==

[web2py] Re: Embed cas login form

2015-08-31 Thread Jose
El domingo, 30 de agosto de 2015, 23:54:30 (UTC-3), Massimo Di Pierro escribió: > > If they are on the same domain you can do this: > > In App_A add a controller function > > def user_embedded(): return auth() > > In App_B ass a controller > > def login(): > return > dict(form=LOAD('App_A

[web2py] Embed cas login form

2015-08-30 Thread Jose
Hi, I have two applications: App_A (cas provider) and App_B (CAS consumer). App_A and App_B have different layouts and css In App_A I defined the user function returns the form login using return form [not return a dictionary] What I want to know if there are ways to embed the form within my A

[web2py] Re: Embed all process in a LOAD

2015-08-26 Thread Jose
El miércoles, 26 de agosto de 2015, 13:33:06 (UTC-3), Leonel Câmara escribió: > > Just make sure all the links inside the LOAD have a cid with the same id > as the container where you're loading the component. A simple way is to > simply put cid=request.cid in them. > > Example: > > {{=A('clic

[web2py] Embed all process in a LOAD

2015-08-26 Thread Jose
Hi, I have in my view a LOAD showing some data. It also has some links that call : a form and list. What I want is for all calls and processes to run embedded inside my container, similar to what would make an iframe. I tried ajax_trap = True, but is only for forms. Best regards, Jose

  1   2   3   4   5   6   7   >