Re: patch for cast module - Mailing list pgadmin-hackers

From Sanket Mehta
Subject Re: patch for cast module
Date
Msg-id CA+yw=mM9knpdKBfiP63t1nO=h2PCgWjPaaWnw+eQ1S6AYy7K8A@mail.gmail.com
Whole thread Raw
In response to Re: patch for cast module  (Dave Page <dpage@pgadmin.org>)
Responses Re: patch for cast module
List pgadmin-hackers
Hi Dave,

Regarding your suggestion of putting some comments in javascript, I think I have already put some comments regarding model data and their controls if any extended.

Can you please let me know where exactly you think more comments are required?


Regards,
Sanket Mehta
Sr Software engineer
Enterprisedb

On Fri, Feb 12, 2016 at 9:54 PM, Dave Page <dpage@pgadmin.org> wrote:


On Fri, Feb 12, 2016 at 11:57 AM, Sanket Mehta <sanket.mehta@enterprisedb.com> wrote:
Hi Akshay,

PFA the updated patch.


Hi

When testing this patch, I get the following error:

Traceback (most recent call last):
  File "pgAdmin4.py", line 56, in <module>
    app = create_app()
  File "/Users/dpage/git/pgadmin4/web/pgadmin/__init__.py", line 194, in create_app
    app.register_blueprint(module)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapper_func
    return f(self, *args, **kwargs)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, in register_blueprint
    blueprint.register(self, options, first_registration)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, in register
    app.register_blueprint(module)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapper_func
    return f(self, *args, **kwargs)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, in register_blueprint
    blueprint.register(self, options, first_registration)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, in register
    app.register_blueprint(module)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapper_func
    return f(self, *args, **kwargs)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, in register_blueprint
    blueprint.register(self, options, first_registration)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py", line 147, in register
    super(ServerModule, self).register(app, options, first_registration)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, in register
    app.register_blueprint(module)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapper_func
    return f(self, *args, **kwargs)
  File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, in register_blueprint
    blueprint.register(self, options, first_registration)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 37, in register
    self.submodules = list(app.find_submodules(self.import_name))
  File "/Users/dpage/git/pgadmin4/web/pgadmin/__init__.py", line 42, in find_submodules
    module = import_module(module_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py", line 21, in <module>
    from html import escape
ImportError: No module named html

Other comments:

- Leave a blank line before the header block and the first line of Python code please.
- There is no pydoc description for the module.
- The javascript is almost completely devoid of comments. There should be at least a minimal amount to explain what each code block is doing.
- There should be no blank lines at the top of SQL templates (e.g. create.sql).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-hackers by date:

Previous
From: Harshal Dhumal
Date:
Subject: work status
Next
From: Harshal Dhumal
Date:
Subject: Re: work status