Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'

2020-02-16 Thread Safford
When running pgAdmin4 python wheel version on Ubuntu 18.04 & python 3.6, I met 
this bug when entering 127.0.0.1:5050 in my browser:
```
2020-02-16 23:21:38,883: ERROR  pgadmin:'Request' object has no 
attribute 'is_xhr'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1949, in 
full_dispatch_request
rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935, in 
dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line 260, 
in decorated_view
return current_app.login_manager.unauthorized()
  File "/usr/local/lib/python3.6/dist-packages/flask_login/login_manager.py", 
line 152, in unauthorized
return self.unauthorized_callback()
  File 
"/usr/local/lib/python3.6/dist-packages/pgadmin4/pgadmin/utils/session.py", 
line 355, in pga_unauthorised
if not lm.login_view or request.is_xhr:
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/local.py", line 347, in 
__getattr__
return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute ‘is_xhr'
```
I don’t know how to solve this problem, so I ask for help there.
My dependencies are:
Flask (1.1.1)
Flask-BabelEx (0.9.4)
Flask-Compress (1.4.0)
Flask-Gravatar (0.5.0)
Flask-Login (0.4.1)
Flask-Mail (0.9.1)
Flask-Migrate (2.4.0)
Flask-Paranoid (0.2.0)
Flask-Principal (0.4.0)
Flask-Security (3.0.0)
Flask-SQLAlchemy (2.3.2)
Flask-WTF (0.14.3)
Werkzeug (1.0.0)
pgAdmin4(4.18)




Re: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'

2020-02-16 Thread Akshay Joshi
Hi Safford

We have fixed this issue and will be available in the next release.
Meanwhile, you can try on the nightly build
https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2020-02-17/

On Sun, Feb 16, 2020 at 9:49 PM Safford  wrote:

> When running pgAdmin4 python wheel version on Ubuntu 18.04 & python 3.6, I
> met this bug when entering 127.0.0.1:5050 in my browser:
> ```
> 2020-02-16 23:21:38,883: ERROR  pgadmin:'Request' object has no
> attribute 'is_xhr'
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1949,
> in full_dispatch_request
> rv = self.dispatch_request()
>   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935,
> in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line
> 260, in decorated_view
> return current_app.login_manager.unauthorized()
>   File
> "/usr/local/lib/python3.6/dist-packages/flask_login/login_manager.py", line
> 152, in unauthorized
> return self.unauthorized_callback()
>   File
> "/usr/local/lib/python3.6/dist-packages/pgadmin4/pgadmin/utils/session.py",
> line 355, in pga_unauthorised
> if not lm.login_view or request.is_xhr:
>   File "/usr/local/lib/python3.6/dist-packages/werkzeug/local.py", line
> 347, in __getattr__
> return getattr(self._get_current_object(), name)
> AttributeError: 'Request' object has no attribute ‘is_xhr'
> ```
> I don’t know how to solve this problem, so I ask for help there.
> My dependencies are:
> Flask (1.1.1)
> Flask-BabelEx (0.9.4)
> Flask-Compress (1.4.0)
> Flask-Gravatar (0.5.0)
> Flask-Login (0.4.1)
> Flask-Mail (0.9.1)
> Flask-Migrate (2.4.0)
> Flask-Paranoid (0.2.0)
> Flask-Principal (0.4.0)
> Flask-Security (3.0.0)
> Flask-SQLAlchemy (2.3.2)
> Flask-WTF (0.14.3)
> Werkzeug (1.0.0)
> pgAdmin4(4.18)
>
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


pgAdmin 4 commit: Added option to override the class name of a label ta

2020-02-16 Thread Akshay Joshi
Added option to override the class name of a label tag for select2 control. 
Fixes #5185

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=3e10e2c978b52199b51c08d4613348e5f98f282a
Author: Nagesh Dhope 

Modified Files
--
docs/en_US/release_notes_4_19.rst | 1 +
web/pgadmin/static/js/backform.pgadmin.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)



Re: [pgAdmin4][RM5185] Option to override select2control's label className

2020-02-16 Thread Akshay Joshi
Thanks patch applied

On Fri, Feb 14, 2020 at 1:41 PM Nagesh Dhope 
wrote:

> Hi Hackers,
>
> Please find a patch, which will allow overriding select2control's label
> className using *controlLabelClassName* option.
>
> --
> Thanks,
> Nagesh
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


Re: [pgAdmin4][RM5185] Option to override select2control's label className

2020-02-16 Thread Nagesh Dhope
Hi Akshay,
Please find a patch for initializing the label and control className for
select2, which was missing my last patch.

On Mon, Feb 17, 2020 at 11:59 AM Akshay Joshi 
wrote:

> Thanks patch applied
>
> On Fri, Feb 14, 2020 at 1:41 PM Nagesh Dhope <
> nagesh.dh...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> Please find a patch, which will allow overriding select2control's label
>> className using *controlLabelClassName* option.
>>
>> --
>> Thanks,
>> Nagesh
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Thanks,
Nagesh


RM5185_v2.patch
Description: Binary data


[pgAdmin][RM5179] Add support for Python 3.8

2020-02-16 Thread Aditya Toshniwal
Hi Hackers,

Attached is the patch to make pgAdmin work on python 3.8. Changes include:
1) Ugraded passlib==1.7.1 to passlib==1.7.2
2) Replace unmaintained Flask-Security with maintained Flask-Security-Too
package, which is also compatible with python 3.8
3) Other compatibility code changes.

Kindly review.
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM5179.patch
Description: Binary data