[web2py] Re: Cockroach DB

2017-04-21 Thread Ron McOuat
Database survives outages like the bug colony survives in life. Interesting analogy but the bug is still repulsive. On Wednesday, 12 April 2017 04:43:48 UTC-7, Massimo Di Pierro wrote: > > Interesting... bad name > > On Tuesday, 11 April 2017 07:40:38 UTC-5, mcm wrote: >> >> This seems a real bar

Re: [web2py] Re: Using validate_and_insert with a computed field

2017-04-21 Thread Chris
Many thanks Anthony! That looks like it will work for now...I may specifically handle call that code just before validate_and_insert calls in the web app, so I don't get rid of readURL validation in a place where I need it. On Friday, April 21, 2017 at 4:46:51 PM UTC-4, Anthony wrote: > > Thank

[web2py] Re: force redirect after expiration login session expiration time

2017-04-21 Thread Anthony
You could include some JS in the layout that has the desired time to expiration in a JS variable and automatically does a client-side redirect to the logout URL after the expiration time. Anthony On Friday, April 21, 2017 at 5:04:11 AM UTC-4, A3 wrote: > > Using auth and auth.settings.expiratio

Re: [web2py] Re: Using validate_and_insert with a computed field

2017-04-21 Thread Anthony
Thanks. I updated the Github issue, as there are multiple problems with the current implementation of the .validate_and_ methods. For now, you should be able to get around the two issues you observe by removing the validators: db.story.titleAsSlug.requires = db.story.readURL.requires = None Yo

[web2py] GET queries other than ID

2017-04-21 Thread David Shavers
Hi, How do I GET data by using the "cost-per-night" url? ID works fine, but that's the only thing that does. www.example.com/app/default/api/patterns gives me this: /room_owner[room_owner] /room-owner/id/{room_owner.id} /room-owner/id/{room_owner.id}/:field /room-owner/cost-per-night/{room_

Re: [web2py] Re: 403 Forbidden?

2017-04-21 Thread A.H.Gilbert
Thanks for reply Massimo and especial thanks for making all this available; I like it much better than Rails. I don't think failed logins was the problem. I have now cured it by removing and re-installing web2py (after saving all the copies of my working though your lectures). --

[web2py] Re: 403 Forbidden?

2017-04-21 Thread Massimo Di Pierro
You normally get that is you fail too many logins. It resets itself after 15 minutes. On Friday, 21 April 2017 10:12:52 UTC-5, Arthur Gilbert wrote: > > > Just started web2py. Going thro' Massimo di Pierro's 5 lectures on you > tube. Making good progress, excited about the system and everythin

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-21 Thread Massimo Di Pierro
We do have an adapter for db2:ibm_db_dbi did you try it? Anyway, in general adapter are defined in web2py/gluon/packages/dal/pydal/adapters You can make your own adapter. The first step is identify which existing adapter to extend. You want to pick the one with the closest SQL dialect. Then yo

Re: [web2py] Re: Open Sourced dating website

2017-04-21 Thread David Shavers
Haha thanks a lot Massimo, your acknowledgement makes me want to code better -- 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 be

[web2py] Re: Could I use SQLFORM.factory to update 2 tables in a single form

2017-04-21 Thread Massimo Di Pierro
You can do form = SQLFORM.factory(db.item, db.subscription_item) as long the two tables do not have fields with the same name. Then after if form.process().accepted: db.item.insert() db.subscription_item.insert() where ... should be replaced by the proper fields in form.vars On

Re: [web2py] Re: Open Sourced dating website

2017-04-21 Thread Massimo Di Pierro
Nice work! I am not sure I can sign up to try without getting in trouble. ;-) On Monday, 27 February 2017 16:13:33 UTC-6, Fabiano Almeida wrote: > > Wow! Thanks for sharing! New ideas! New features! > > Thanks a lot and best regards! > > Fabiano > > 2017-02-26 21:03 GMT-03:00 Jaimee S : > >>

[web2py] Re: UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2017-04-21 Thread Massimo Di Pierro
Which is why I hate bootstrap and we have to move to client side generation of forms and grid since server side generation does not know about css. On Sunday, 16 April 2017 16:42:12 UTC-5, Anthony wrote: > > Different versions of Bootstrap involve not just changes to CSS and JS > files -- the st

[web2py] Re: Resetting the database

2017-04-21 Thread Massimo Di Pierro
In the case of sqlite it is easy enough to also delete the content of the databases/ folder. On Sunday, 16 April 2017 09:37:11 UTC-5, Matthew J Watts wrote: > > I had to log out of my webapp before deleting the database data, otherwise > i would get an error message > > cheers > > On Monday, Nov

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-21 Thread António Ramos
having web2py DAL working with ibm_db would give web2py a good visibility from IBM because they often publish documents about open source techs and IBM and being web2py such a good product i think IBM would also be in love as we ALL are!!! regards 2017-04-21 15:49 GMT+01:00 Jim Steil : > I would

[web2py] Help with creating a Select within the Web2Py DAL for a SQL query that uses an 'exists' clause

2017-04-21 Thread George D Elig
I have a simple SQL query that pulls a column value from a secondary table, based on a ID being equal in both tables. The query uses an exists clause on a subquery. select sites.domain_name, batch.batch_name from sites, batch where exists (select batch.id from batch where sites.b

[web2py] How can I create a DAL Select statement from a SQL exists clause?

2017-04-21 Thread George D Elig
I have the following SQL statement that I'm having difficulty converting to a db()Select statement. I could use a left join but I can only return one row, which is being addressed with 'limit 1' select sites.domain_name, batch.batch_name from sites, batch where exists (select batch.id from

[web2py] Re: How to upload a file into web2py?

2017-04-21 Thread fastcard lastname
I have same issue, but I changed controller .py to following, it works def uploading_file(): from gluon.sqlhtml import form_factory form=form_factory(SQLField('import_csv','upload', uploadfolder = 'c:\\temp\\uploading')) if form.accepts(request.vars,session): request.flash='Rec

[web2py] Re: Allowing external access to web2py server ?

2017-04-21 Thread sebas mora
Help please! Im trying to access my web2py server on a Rpi from another device to run an application that is on the server. From local host it runs and executes fine, no problem, but i just cant connect to it from other devices. I do what is said in this message and I get the following error:

[web2py] 403 Forbidden?

2017-04-21 Thread Arthur Gilbert
Just started web2py. Going thro' Massimo di Pierro's 5 lectures on you tube. Making good progress, excited about the system and everything working well. BUT, when I went back to it, today, I clicked on Admin (of the welcome page) I got a long delay and then "403 FORBIDDEN". The page is show

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-21 Thread Jim Steil
I would love to do some work on this if there was a mentor out there willing to help me get started. -Jim On Fri, Apr 21, 2017 at 5:34 AM, António Ramos wrote: > Maybe Massimo will read this and give us some hints on how to make DAL > use the ibm_dbi > > Regards > > >

Re: [web2py] Re: Using validate_and_insert with a computed field

2017-04-21 Thread Chris
Can do, here's an example: # DB db.define_table('story', Field('title', length=512, widget=lambda field, value: SQLFORM.widgets.string.widget(field, value, _size=40), requires=[IS_NOT_

[web2py] A simple way to catch and retry a failed form submit?

2017-04-21 Thread Horst Horst
On my site (sympathetic-resonances.org), users edit complex forms. Part of the form is musical data passed as JSON in a hidden form field, where a JS frontend reads it from and writes it to. The pages themselves are submitted as regular forms. I have a few users in countries with very unreliabl

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-21 Thread António Ramos
Maybe Massimo will read this and give us some hints on how to make DAL use the ibm_dbi Regards Sem vírus. www.avast.com

[web2py] force redirect after expiration login session expiration time

2017-04-21 Thread A3
Using auth and auth.settings.expiration the login expires correctly, when you refresh manually or click a button or menu it redirects to login. My problem is that the page last shown before it expired remains visible. There is no automatic redirecting just after the expiration time has passed.

Re: [web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-04-21 Thread pbreit
I'm still experiencing both problems. I cloned web2py from scratch with: git clone --recursive https://github.com/web2py/web2py.git I added my fairly basic table models into models.py. When i run for the very first time I get: OperationalError: table "auth_user" already exists In /appadmin j