Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aUGWg-0000v1-3U for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 Feb 2016 16:24:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aUGWf-0005Xc-J0 for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 Feb 2016 16:24:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aUGWe-0005WD-N6 for pgadmin-hackers@postgresql.org; Fri, 12 Feb 2016 16:24:56 +0000 Received: from mail-ig0-x22e.google.com ([2607:f8b0:4001:c05::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aUGWa-0006fd-PC for pgadmin-hackers@postgresql.org; Fri, 12 Feb 2016 16:24:56 +0000 Received: by mail-ig0-x22e.google.com with SMTP id xg9so12866649igb.1 for ; Fri, 12 Feb 2016 08:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HqjQbwBK10iXQ1/0fqB9chQVU9tqmoJ6k7y70HnsJwQ=; b=DcOKNizNsuxYOAVk+Gu9gEVyWpMANSbX6XszzH2xP6kcuCJHjQQ7gEs7Hv8GvooLR8 gRiqaJO6CQGwIB7q+XGvvw5JbZzBscsrBwwM/pJvMyhCy02KHwm47R7SABIXomi3LHCA BdcZKX/ZZoL7cZUKOF+DkbkhvYyDncw6D3DIqHj8QFY4/ypKcbQn4p9HiIjQaSVNnG5B O0axA2n0XxU274RHbNh6P87P2iRA7GXpokAYEZaR5AbfKhqcN7KgFh4AiOaHAlsuRrBx WP2E/RiANrlYY0RWxgMFbadR9M99g2Tni35g+We9oCU5L32e5TYVhPakbMJKYCbJKRI6 6Gng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=HqjQbwBK10iXQ1/0fqB9chQVU9tqmoJ6k7y70HnsJwQ=; b=TEIGSA0M+l/a/DKpuHhdYn2YNJ09uahgIQkmbwxTw6uvgAayubKSdwbDNOT/QPJfvZ 494KbrfvS6ZjC2PxSk5VcYkkSw6tMDnbjP4AGe3Jvifi7GiH1CAiwi9OHXE7w8L1MV9X E0AIXgzCheqZ79Fp8l5I3IFBN7NK4p/p8dSWCJpMD6gzSPAlIDsFHCoLccV7bRKJ2ZMv YA8GDMSK6t/8TjXakasHJbzqEg7rIxevBbcL0sQIlMSNGLx7UhcvyEutaMpSyRrP5LmA +20nFtkdmNT0zeecH+t1zAJo+K6U+3NO9T4TgLRKAhiGmQknto8PY0hlxZvy+cnlNP6z q5nQ== X-Gm-Message-State: AG10YOQwtBLRHAkfNcpjIY9ypSYeD6xwnrZbQYSP4K3e0W/i9tvIVx2aEKScEZnGadT3XaIoWjgMNpaukvzyjw== MIME-Version: 1.0 X-Received: by 10.50.143.41 with SMTP id sb9mr857638igb.69.1455294290895; Fri, 12 Feb 2016 08:24:50 -0800 (PST) Received: by 10.64.76.137 with HTTP; Fri, 12 Feb 2016 08:24:50 -0800 (PST) In-Reply-To: References: Date: Fri, 12 Feb 2016 16:24:50 +0000 Message-ID: Subject: Re: patch for cast module From: Dave Page To: Sanket Mehta Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a1134b9fe40c073052b951bf5 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1134b9fe40c073052b951bf5 Content-Type: text/plain; charset=UTF-8 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 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 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 --001a1134b9fe40c073052b951bf5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


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

PFA the updated patch.


Hi
When testing this patch, I get the following error:
=
Traceback (most recent call last):
=C2=A0 Fil= e "pgAdmin4.py", line 56, in <module>
=C2=A0 =C2= =A0 app =3D create_app()
=C2=A0 File "/Users/dpage/git/pgadm= in4/web/pgadmin/__init__.py", line 194, in create_app
=C2=A0= =C2=A0 app.register_blueprint(module)
=C2=A0 File "/Users/d= page/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", = line 62, in wrapper_func
=C2=A0 =C2=A0 return f(self, *args, **kw= args)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/py= thon2.7/site-packages/flask/app.py", line 889, in register_blueprint
=C2=A0 =C2=A0 blueprint.register(self, options, first_registration= )
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/_= _init__.py", line 40, in register
=C2=A0 =C2=A0 app.register= _blueprint(module)
=C2=A0 File "/Users/dpage/.virtualenvs/pg= admin4/lib/python2.7/site-packages/flask/app.py", line 62, in wrapper_= func
=C2=A0 =C2=A0 return f(self, *args, **kwargs)
=C2= =A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packag= es/flask/app.py", line 889, in register_blueprint
=C2=A0 =C2= =A0 blueprint.register(self, options, first_registration)
=C2=A0 = File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", l= ine 40, in register
=C2=A0 =C2=A0 app.register_blueprint(module)<= /div>
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.= 7/site-packages/flask/app.py", line 62, in wrapper_func
=C2= =A0 =C2=A0 return f(self, *args, **kwargs)
=C2=A0 File "/Use= rs/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py&quo= t;, line 889, in register_blueprint
=C2=A0 =C2=A0 blueprint.regis= ter(self, options, first_registration)
=C2=A0 File "/Users/d= page/git/pgadmin4/web/pgadmin/browser/server_groups/servers/__init__.py&quo= t;, line 147, in register
=C2=A0 =C2=A0 super(ServerModule, self)= .register(app, options, first_registration)
=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/pgadmin/utils/__init__.py", line 40, in reg= ister
=C2=A0 =C2=A0 app.register_blueprint(module)
=C2= =A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packag= es/flask/app.py", line 62, in wrapper_func
=C2=A0 =C2=A0 ret= urn f(self, *args, **kwargs)
=C2=A0 File "/Users/dpage/.virt= ualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 889, = in register_blueprint
=C2=A0 =C2=A0 blueprint.register(self, opti= ons, first_registration)
=C2=A0 File "/Users/dpage/git/pgadm= in4/web/pgadmin/utils/__init__.py", line 37, in register
=C2= =A0 =C2=A0 self.submodules =3D list(app.find_submodules(self.import_name))<= /div>
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/__init__.= py", line 42, in find_submodules
=C2=A0 =C2=A0 module =3D im= port_module(module_name)
=C2=A0 File "/System/Library/Framew= orks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py"= ;, line 37, in import_module
=C2=A0 =C2=A0 __import__(name)
=
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server= _groups/servers/databases/casts/__init__.py", line 21, in <module&g= t;
=C2=A0 =C2=A0 from html import escape
ImportError: N= o 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 comme= nts. There should be at least a minimal amount to explain what each code bl= ock 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
--001a1134b9fe40c073052b951bf5--