[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: 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 -

[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

[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

[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. --

[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

[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's great! Please post the

[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

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

[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

[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

[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
On Tuesday, 20 October 2020 at 08:50:13 UTC+1 gaelpri...@gmail.com wrote: > Thank you Carlos, I'll start this migration as soon as my Opalstack > account will be a provisioned. > I've a doubt about the DBs. Opalstack offers MariaDB and PostgreSQL. > It seems that it's not so easy to use

[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

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

[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

[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 > application's static > folder? > > Yes

[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.

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

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

[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

[web2py] Re: routes.py and root_static

2020-10-16 Thread Jose C
> > > BASE = dict( > domains = { }, > root_static = ['favicon.ico', 'robots.txt'], > ), > ) > > would this be correct? > > Should robots.txt go into the /applications/init/static/ > Yep, any files served at the root of your site (e.g. https://mydomain.com/robots.txt) go in

Re: [web2py] Re: web2py hosting

2020-10-16 Thread Jose C
HI Antonio, Can't speak as to pythonanywhere, but Opalstack definitely supports automatic Letsencrypt certificates - I have it set up on all my sites. You just flip a switch on each website and the rest is handled automatically, including auto-renewals. See:

Re: [web2py] Re: web2py hosting

2020-10-14 Thread Jose C
Hi Antonio, I just saw this announcement: https://www.webfaction.com/faq Reading the "What will not be available when I am migrated to tsohost"... makes you wonder what they actually do host on their servers! And they're starting migrations in a couple of weeks and shutting WF down 100% in

[web2py] Re: web2py hosting

2020-10-13 Thread Jose C
Hi Annet, Just FYI, I'm going on 18 months now with Opalstack and couldn´t be happier. Running multiple web2py (and other) apps on servers in US and EU, hosted email, etc. with the same access and levels of control I'd had on WF. And most importantly, always the same incredible customer

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

[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

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

[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,

[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
In addition to the other replies, you can also set the headers easily yourself in web2py (although depending on your own web server settings, some may be overwritten). For example, in a model (say): response.headers['Strict-Transport-Security'] = 'max-age=63072000; includeSubDomains; preload'

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] Re: Displaying errors in bootstrap collapse

2020-07-08 Thread Jose C
Hi Jim, Just got a minute... I use something like this to scroll to and highlight the first field in a long form (but not within a Collapse structure). Off the top of my head, you're submitting to web2py, so in the controller: if form.process().accepted: elif form.errors:

Re: [web2py] Re: Session / Originating IP

2020-07-08 Thread Jose C
If I recall correctly, the default login expiration for the standard web2py login functionality is 1 hour (from last access). If you enable the 'remember me' checkbox on login it should set the expiry to 30 days (by default). You should also be able to set a custom long expiration time with

[web2py] Re: Session / Originating IP

2020-07-08 Thread Jose C
I haven't looked into the code specifically, but can tell you that when I change IP's mid session, (by connecting to a VPN) it has no impact on the session being used at the time. That is, the same session continues to be used in all interactions with the site. I use redis to store my

[web2py] Re: 2.19.1 redis sessions problem

2020-06-10 Thread Jose C
gt;>> 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: >>>> >>>> Just started testing

[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 HTH, Jose -- Resources: -

[web2py] Re: Webfaction anyone ??

2020-05-21 Thread Jose C
A bit off-topic (other than the title) but given the GoDaddy buyout of webfaction (putting it on temporary life support) you may want to consider thinking about options for your hosting if they follow through and shutdown webfaction and enforce the godaddy migration they announced. I'd been a

[web2py] 2.19.1 redis sessions problem

2020-03-28 Thread Jose C
Just started testing version 2.19.1 (prior to upgrading) with py3.6 and it appears that when sessions are stored in redis, a new session is being created each time the login is submitted which then prevents a session from logging in. This issue was discussed in

[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

[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) -

[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

[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) -

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.

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):

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

[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) -

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

2019-11-06 Thread Jose C
On Wednesday, 6 November 2019 15:19:07 UTC, Leonel Câmara wrote: > > We also got this bug when we tried to upgrade to the latest web2py and had > to rollback. We were using the old 2.X pyredis and then tried with 3.X you > get the same problem with both. Please report this issue in github, if no

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

2019-11-04 Thread Jose C
So it appears to be a bug... adding () after the decode on line 185 of redis_session.py appears to resolve the cause of this traceback. However another issue has cropped up... every page hit results in a new session key being created which means they're unusable. Changing sessions from redis

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

2019-11-03 Thread Jose C
In principle, that should work. However you say you're new to this so some basic scenarios to check below. 1) Do you have a def second() controller where the variable is being overridden or deleted? Or session.forget() is called? 2) Are you navigating to /default/first?visitor_name=phil (to

[web2py] Redis session error - latest web2py master

2019-11-02 Thread Jose C
Greetings, Attempting to enable Redis for sessions and get the following error when web2py attempts to retrieve the keys it set on first access. (first page loads and the keys are set and can be seen in redis via redis-cli). python 3.6.8 web2py: latest master downloaded from repo at 10:00

[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

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
co.in work fine now. > > Regards, > > Rahul > > On Fri, Aug 2, 2019 at 1:53 PM Jose C > > wrote: > >> Hi Rahul, >> >> ok,.. >> 1) no the routes.examples.py files don't cause any problems. >> 4) Can you make sure that both *'www.domain.in <h

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Hi Rahul, ok,.. 1) no the routes.examples.py files don't cause any problems. 4) Can you make sure that both *'www.domain.in': 'app1'* as well as *'domain.in': 'app1'* are specified in the domains key of the BASE dict? I would hope this finally resolves your issue. I don't have any experience

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

[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

Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Jose C
en> > , > and PR are always welcome ;-) > > Nico > > Il giorno lun 29 lug 2019 alle ore 10:14 Jose C > ha scritto: > >> Looks promising... some questions: >> >> 1) Have spotted many typos in docs but can't find docs for py4web on >> github. If doc

[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

[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 >

[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 error; use default python shell') > >

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

2018-07-08 Thread Jose C
Hi Stifan, Many thanks for checking. I noticed you used the stable version: 2.16.1-stable+timestamp.2017.11.14.05.54.25. I was using the latest nightly: 2.16.1-stable+timestamp.2018.06.02.04.50.21 I tested with the stable version you used and it works fine here too. This implies that a bug

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

2018-07-07 Thread Jose C
Greetings, In a new virtual environment using Python3's built-in venv functionality, with IPython installed and latest web2py source. When dropping into a web2py-ipython shell, starting ipython throws a "list index out of range" exception and the shell defaults to interactive. Steps to

[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

[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

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

2016-07-28 Thread Jose C
Hi, AFAIK you must use port 587 with gmail. Also, I usspect setting ssl=True is causing issues (port 587 uses TLS). Try removing: mail.settings.ssl = True mail.settings.tls = True This is how I do it with gmail: mail.settings.sender = 'm...@gmail.com' mail.settings.server =

[web2py] Re: sending email

2015-07-05 Thread Jose C
Your mail settings in db.py should be: mail.settings.server = 'smtp.webfaction.com http://smtp.webfaction.com:25' mail.settings.sender = 'an email address that you have created(in the webfaction panel-Emails-Email Addresses section)' mail.settings.login = 'a_mailbox_name(created in webfaction

Re: [web2py] Re: sending email

2015-07-05 Thread Jose C
Hmm...are you running your code on a webfaction server or on another machine? If not running on a webfaction server you'll need to connect to port 587 like so: mail.settings.server = 'smtp.webfaction.com http://smtp.webfaction.com:25/ :587' -- Resources: - http://web2py.com -

[web2py] Re: Database

2015-05-28 Thread Jose C
You can only see and use tables and fields you define in a model file, see the web2py book for details. Specifically the Legacy database section: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=legacy#markmin_LegacyDatabases Pay special attention to

[web2py] Re: ProgrammingError: column worker_stats__tmp is of type json but expression is of type text

2015-05-28 Thread Jose C
Please drop the scheduler_worker table from the database and remove the file *_scheduler_worker.table from the databases/ folder of your application, then set migrate to True (a single request with migrate=True will suffice). The table will be recreated properly and the error will go

[web2py] Re: Object request isn't working

2015-05-28 Thread Jose C
But the admin show me a error: if request.env.server_name == '127.0.0.1': NameError: name 'request' is not defined Are you perhaps using python 3? (Type `python --version` at the command to check) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] ProgrammingError: column worker_stats__tmp is of type json but expression is of type text

2015-05-27 Thread Jose C
Greetings, My postgresql server was upgraded from 9.1 to 9.3. Web2py now crashes on startup with this error code: Traceback (most recent call last): File /home/jose/python-environments/silves/web2py/gluon/restricted.py, line 227, in restricted exec ccode in environment File

[web2py] Re: Robots.txt paramete router

2015-05-27 Thread Jose C
On Thursday, 21 May 2015 19:58:53 UTC+1, Ruud Schroen wrote: Hi, I'm using a parameter based router like this: routers = dict( # base router BASE=dict( default_application='welcome', default_controller = default, default_function = index,

[web2py] Re: cache.redis server unavailable = traceback. Bug?

2015-05-07 Thread Jose C
Ok, issue opened: https://github.com/web2py/web2py/issues/958 Thanks Niphlod. -- 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

[web2py] cache.redis server unavailable = traceback. Bug?

2015-05-06 Thread Jose C
not missing something I'm happy to open an issue on github. web2py ver: 2.10.4 Regards, Jose C -- 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

[web2py] Re: cache.redis server unavailable = traceback. Bug?

2015-05-06 Thread Jose C
. On Wednesday, May 6, 2015 at 2:33:51 PM UTC+2, Jose C wrote: Greetings, I have always assumed that if cache is unavailable, then the fallback is to serve the content from original source again (i.e. treat as if key does not exist). I was surprised today when I got a ConnectionError

[web2py] Re: web2py 2.10.4 and static / fonts

2015-05-06 Thread Jose C
Could it be a browser support issue? Check out the link for more info and browser support of different font files. Also consider the bit at the end of the link about using @import to load all the formats from a CDN (like Google). HTH, Jose C -- Resources: - http://web2py.com - http

[web2py] Re: deploment on an obsolete Debian 5 server

2015-05-06 Thread Jose C
Did you download the source file from the web2py site or github? If github there is this issue https://github.com/web2py/web2py#import-about-this-git-repo to take into account due to pydal being a submodule. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: How to display data at top of nav bar

2015-01-24 Thread Jose C
HI Alex, (1) where do you keep it so it persists in the navbar?How is 3_menu.py called? My 3_menu.py file is located in the /your_application/models/ directory. The files in the directory are processed in alphabetical order (which is why I prefixed a number as my database models are

[web2py] Re: How to display data at top of nav bar

2015-01-22 Thread Jose C
for no_action_users then an orange badge would appear with the number in it as well). Hope that helps, Jose C -- 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

[web2py] Re: Traceback with record versioning enabled and common_filter defined.

2015-01-10 Thread Jose C
On Saturday, 10 January 2015 13:15:48 UTC, Paolo Valleri wrote: Hi, I've fixed the error but I've to understand if all common_filters are applied correctly. Do you mind to test https://github.com/ilvalle/web2py/tree/issue-2023 ? Ok, will add some more common filters and get onto testing

[web2py] Re: Traceback with record versioning enabled and common_filter defined.

2015-01-10 Thread Jose C
Do you mind to test https://github.com/ilvalle/web2py/tree/issue-2023 ? Ok Paolo, it all appears to work as expected now with trunk (2.9.12 beta) - at least with my current system and setup. I also backported your change to my dev version (2.9.5) and it too works. Many thanks for

[web2py] Re: Traceback with record versioning enabled and common_filter defined.

2015-01-10 Thread Jose C
On Saturday, 10 January 2015 12:20:31 UTC, Niphlod wrote: uhmbut record_versioning adds a common_filter per se, and is usually on the form of is_active == True. Did you try to set a different common_filter ? Yes I tried various, within the table definition and external to it (post

[web2py] Re: Traceback with record versioning enabled and common_filter defined.

2015-01-09 Thread Jose C
Bug reported: https://code.google.com/p/web2py/issues/detail?id=2032can=4 -- 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

[web2py] Traceback with record versioning enabled and common_filter defined.

2015-01-07 Thread Jose C
Hello all, I have enabled record versioning on several tables using auth.enable_record_versioning(db) which seems to work as expected. When I add any common_filter to a versioned table, such as the simple one below: common_filter = lambda query: db.property_detail.is_active == True, I get

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Jose C
the paths to everything (the python executable, the web2py.py file, the sessions2trash script... everything) I've had some weird issues in general with cron when using shortcuts in cron. HTH, Jose C -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] autocomplete widget on multiple fields display issue

2013-10-21 Thread Jose C
Issue: When setting the autocomplete widget on two fields in same form, the dropdown box always appears underneath the first field only, even if the second field is selected and typing into the second field. Values are inserted into the correct fields and form submission works ok... it's just

[web2py] Re: profiling a controller at webfaction

2013-06-30 Thread Jose C
I hope one of you can provide me with instructions of how to profile for example init/default/index Try starting your web2py instance adding the -F path/to/profiler_filename command line option. The `profiler_filename` needs to be in a writeable directory. Then hit your controller url and

[web2py] Re: How to start web2py at server reboot

2013-06-06 Thread Jose C
How about using the server cron process? I use this on CentOs and it works perfectly. To edit crontab, type: crontab -e In the crontab file, insert this line: @reboot /usr/local/bin/python2.7 /path/to/your/web2py/dir/web2py.py -p 8000 -a 'recycle' --nogui --no-banner The -p parameter

[web2py] Re: session in redis

2012-10-13 Thread Jose C
+1 request for full Redis session integration. Really like Redis' features over memcache, especially the auto- `save-to-db` config option. Would you prefer opening a feature request ticket? --

[web2py] Re: How do you change memcache session expiry?

2012-09-29 Thread Jose C
Ah, I understand what you're saying. I can't seem to find a way to do this either - if it is obvious it is escaping me too. Perhaps consider opening an issue as a feature request or even possibly a bug - it is a common enough thing to want to do with sessions. --

[web2py] Re: pathoc: testing web servers with pathological requests

2012-09-28 Thread Jose C
We should try this. Massimo Hi Massimo, Had a few minutes so ran some of the default tests against web2py running on rocket. We do get a few 500 errors, in 2 places as far as i can see: `gluon/main.py` and in `gluon/rocket.py`. Nothing catastrophic. How/where do you want the errors

[web2py] Re: How do you change memcache session expiry?

2012-09-28 Thread Jose C
The only way I've found to change this is to explicitly modify the default value from this source file. Is there a better way to configure this value for session expiry from within application code? Cheers. Far as I know it's done like this: set(key=key, value=value, time=seconds)

[web2py] Re: pathoc: testing web servers with pathological requests

2012-09-28 Thread Jose C
Please open a goole ticket and this will be given high priority. Thanks to testing it. Ok, will run a batch of comprehensive tests this weekend and open ticket with results. --

[web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-09-26 Thread Jose C
Nope. A leaking web2py will have worried a lot of users if shows up in a simple app like this (i.e. if it leaks while processing this app, the bases of the web2py code are leaking somewhere and everyone would have noticed that) You'd expect so... although not sure how many users have apps

[web2py] framework benchmarks - web2py surprisingly slow?

2012-09-25 Thread Jose C
Just stumbled across this benchmark: http://mindref.blogspot.pt/2012/09/python-fastest-web-framework.html on the python group discussion: https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.python/yu1_BQZsPPc The author also notes a memory leak problem with web2py but no specifics

  1   2   >