Re: [web2py] Custom JWT login -> Login validated user without a password.

2020-09-16 Thread hiro
; remember correctly.. > > Looking at ths snipped: > > http://www.web2pyslices.com/slice/show/1443/auto-login-when-you-come-from-localhost > > I think you can extract the username from the token and then do: > > user = db(db.auth_user.username==username).select().first() > auth.

Re: [web2py] Custom JWT login -> Login validated user without a password.

2020-09-13 Thread hiro
f the token, the IDP will either > give this information or not. > Usually you also have to whitelist in the IDP from which hosts such a call > can come from and which hosts can actually obtain tokens etc. > > > > Am Fr., 11. Sept. 2020 um 16:06 Uhr schrieb hiro : >

[web2py] Custom JWT login -> Login validated user without a password.

2020-09-11 Thread hiro
Hi, quick question! I am working on an internal API using web2py and the organization I am working for wants us to use JWTs. I have had no success with the JWTAuth in the tools file, but have successfully been able to redirect to the single sing-on provider and then validate the token as the si

[web2py] Error: Tried to send "500 Server Error" to client but received socket error (When user closes browser during load, or when using the requests library.)

2019-10-14 Thread hiro
Hi, I am building a dashboard/API and am seeing this error a lot in my logs: ERROR:Rocket.Errors.Thread-3:Tried to send "500 Server Error" to client but received socket errorERROR:Rocket.Errors.Thread-6:Traceback (most recent call last): File "/opt/app-root/src/gluon/rocket.py", line 1288, in

[web2py] Python 3 brought me back.

2017-07-19 Thread hiro
Just wanted to say thank you to everyone involved in making web2py Python 3 compatible. Need to setup an internal application at work and having it compatible with existing codebase and environments made the decision to go with web2py easier. Have a nice summer. -- Resources: - http://web2

[web2py] Best way to load password at startup.

2015-04-27 Thread hiro
I connect to an external DB in one of my models: my_model.db: my_db = DAL( 'postgres://use:password@url/database', pool_size=20, after_connection=lambda self: self.execute('set search_path to my_schema, other_schema, public; set statement_timeout to 6;'), migrate=False ) Now

[web2py] FPDF, from web-page to service.

2013-10-30 Thread hiro
I have created a few apps that help users to generate pdf-documents. I create some templates and let users enter some forms, the data is submitted, inserted and a PDF is returned. As this feature became popular I now have a generic function in a web2py model where I pass the function list with

[web2py] Re: Problem with combination of SQLForm.grid + LEFT JOIN + Computed Fields

2013-10-29 Thread hiro
Having the same problem, thank you for the info. The problem for me is that I can get either the left join to work using row.table_name.field_name, or the simple view to work by using row.field_name. Is there anyway to define a represent-function to work with both? On Tuesday, January 15, 2013 4

[web2py] appadmin/graph_model for other databases?

2013-10-16 Thread hiro
I store user and password information (the default config) in the default sqlite db but all my other data in an external PostgreSQL server. Is it possible to create the graph created by the appadmin/graph_model controller for my external db? -- Resources: - http://web2py.com - http://web2py.co

[web2py] Include statement in view.

2013-10-16 Thread hiro
I have a smartgrid, and need to add a custom form during an insert. Basically I just want to add some html and hide the original form. Very easy to do with some javascript. My problem is that this is the first time I have tried to use the include statement. And it seems to behave very weird fo

[web2py] Re: Using WrapBootstrap theme with Web2Py - possible?

2013-10-11 Thread hiro
I have tried several themes from http://bootswatch.com/ by just changing the url from the layout.html file. It have worked without any problem. I do not see why the same thing should not be true from themes from wrap-bootstrap.. On Thursday, October 10, 2013 11:17:53 AM UTC+2, Timothy Swieter w

[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread hiro
Thank you! On Friday, September 27, 2013 8:14:55 PM UTC+2, Massimo Di Pierro wrote: > > I can confirm the problem and I opened a ticket: > > https://code.google.com/p/web2py/issues/detail?id=1692 > > On Thursday, 19 September 2013 03:49:35 UTC-5, hiro wrote: >&g

[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread hiro
Small bump, this error is still present in latest stable version. On Thursday, September 19, 2013 10:49:35 AM UTC+2, hiro wrote: > > In the book I read: > > *Showing virtual fields in SQLFORM.grid and smartgrid* > In recent versions of web2py, virtual fields are shown in grids

[web2py] Virtual Fields and Smartgrid not working as expected

2013-09-19 Thread hiro
In the book I read: *Showing virtual fields in SQLFORM.grid and smartgrid* In recent versions of web2py, virtual fields are shown in grids like normal fields: either shown alongside all other fields by default, or by including them in the fields argument. However, virtual fields are not sortable

Re: [web2py] References and Virtual Fields do not play nice together.

2013-09-19 Thread hiro
For now you can use: > lambda row: row.entity.get('slogan', '')+' is the best slogan ever' > > Marin > > > On Wed, Sep 18, 2013 at 1:08 PM, hiro >wrote: > >> Is this a bug, a limitation or by design? >> >> I create a new we

[web2py] Re: References and Virtual Fields do not play nice together.

2013-09-18 Thread hiro
Thank you! On Wednesday, September 18, 2013 3:28:22 PM UTC+2, Massimo Di Pierro wrote: > > Fixed in trunk! > > On Wednesday, 18 September 2013 06:08:28 UTC-5, hiro wrote: >> >> Is this a bug, a limitation or by design? >> >> I create a new welcome applicat

[web2py] References and Virtual Fields do not play nice together.

2013-09-18 Thread hiro
Is this a bug, a limitation or by design? I create a new welcome application and add the following tables and fields: db.define_table('entity', Field('entity_name', 'string'), Field('slogan', 'string'), ) db.entity.slogan2 = Field.Virtual(lambda row: row.entity.slogan+' is the best slo

[web2py] VirtualField Error

2013-09-04 Thread hiro
I try to use virtual fields. I have the following in a model: hb.define_table('entity', Field('name', 'string', unique=True), Field('group', 'reference pml_group'), Field('country', 'string'), Field('something','string'), Field('turnover','double'), Field('days','double'), F

[web2py] Re: crud forms and layout

2013-08-30 Thread hiro
Long time since last post, but i had to do this and a small modification of mdipierros code worked for me fields = form[0].components n_fields = len(fields) bot_half = fields[n_fields/2:] top_half = fields[:n_fields/2] form[0]=TABLE(TR( TD(TABLE(*top_half)),TD(TABLE(*

[web2py] Link with cid not working properly in Chrome.

2013-08-30 Thread hiro
I am having problems getting this code to work i Chorme, it works correctly in IE and Firefox, but in Chrome the form opens in a new window instead of the div tag. If I use Putty to connect to the server in order to use the admin interface, the code works correctly when I connect using localhos

[web2py] Re: Many forms in page with CRUD. Just want to check my approach is reasonable.

2013-08-29 Thread hiro
I have researched more and found out about the cid tag in the link helper. Works much better. -- --- 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+unsub

[web2py] Many forms in page with CRUD. Just want to check my approach is reasonable.

2013-08-29 Thread hiro
I have some tables that I want to be easily readable and editable. We groups with information, with subgroups that should all be easy edit and overview. We have came up with a design that works but I now need to figure out how to be able to show edit forms for each row in the tables. My first

[web2py] Re: InterfaceError: connection already closed

2013-08-21 Thread hiro
Pierro wrote: > > Can you please try again? I think I may have a fix. > > On Thursday, 15 August 2013 05:22:28 UTC-5, hiro wrote: >> >> Ok, I have updated to 2.6.0-development+timestamp.2013.08.08.09.00.28 >> now. Will give it some time and see if the error is still there.

[web2py] Re: InterfaceError: connection already closed

2013-08-15 Thread hiro
ersion? This may be already fixed. For sure > we have changed some of the relevant logic. > Let us know. > > On Thursday, 15 August 2013 04:43:51 UTC-5, hiro wrote: >> >> The latest: 2.5.1-stable+timestamp.2013.06.06.15.39.19, but I have hade >> the problem for a w

[web2py] Re: InterfaceError: connection already closed

2013-08-15 Thread hiro
The latest: 2.5.1-stable+timestamp.2013.06.06.15.39.19, but I have hade the problem for a while with earlier versions of web2py. On Tuesday, August 13, 2013 4:05:15 PM UTC+2, Massimo Di Pierro wrote: > > Do you know which web2py version? > > On Monday, 12 August 2013 09:49:32 UTC-5

Re: [web2py] reference db.auth_user from other Database..

2013-08-15 Thread hiro
Ok, well I will just think about moving all data to the external DB On Wednesday, August 14, 2013 5:48:37 PM UTC+2, Carlos Correia wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Em 14-08-2013 15:23, hiro escreveu: > > Without touching db.py I have created a

[web2py] Re: reference db.auth_user from other Database..

2013-08-15 Thread hiro
Thank you... On Wednesday, August 14, 2013 5:21:49 PM UTC+2, Niphlod wrote: > > nope it's not. > > Is it possible to cross reference the databases? If so, how? >> > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this

[web2py] reference db.auth_user from other Database..

2013-08-14 Thread hiro
Without touching db.py I have created a new file in order to add another database. I want to keep the auth data in the standard setup but keep other parts of my data in a large and fast external database. The problem I am having is that I cannot reference between the databases. in my_new_db.py

[web2py] smartgrid delete button not working properly

2013-08-14 Thread hiro
Hi there.. When I am using the SQLFORM.smartgrid the delete button does not seems to work. I get the confirmation dialog, click yes, and the entry disappears, but after a refresh it is back again. I can right-click it and get the link, and pasting that into the browser deletes the entry proper

[web2py] InterfaceError: connection already closed

2013-08-12 Thread hiro
I have recently starting to get this error when accessing random pages and the admin interface. All I need to do to stop receiving the error is to wait for a while, and then everything works for a while again. Where should I start looking in order to get rid of this error? Traceback 1. 2. 3. 4

[web2py] Re: DAL.executesql timeout..

2013-06-18 Thread hiro
timeout to 5000;'), migrate=False ) Then if I ever need to export large amounts of data that might take more than 5 second, I simply create a function that set a new timeout for that call.. On Monday, June 17, 2013 11:20:25 AM UTC+2, hiro wrote: > > I am using the DAL to connect to a Postg

[web2py] DAL.executesql timeout..

2013-06-17 Thread hiro
I am using the DAL to connect to a Postgres server. This server is very big and under constant heavy load. The problem I am experiencing is that from time to time when the server is under really heavy load, or when the tables queried from the DAL are currently being recreated, the server just w

[web2py] Re: Small form on all pages..

2012-12-22 Thread hiro
Ok I had messed up some of my code, now everything works fine! Thanks anyway! --

[web2py] Small form on all pages..

2012-12-22 Thread hiro
What is the best way to create a small form that is visible on all pages? I want to have a small form in the sidebar where users can add notes (without changing view..) I have tried just adding the for in the layout and send the data to a controller using an ajax function: onsubmit="ajax('{{=U

[web2py] Pushing data to the client..

2012-09-17 Thread hiro
I am trying to port my Baduk client to an web2py app.. I have tried some writing some small programs and have no problem so far.. except.. I do not know how I should update one players board when the other make a move. I want the server to be able to sen an update to a frame or force a reload.