pgAdmin4 Bug fix or my Fault ?
pgAdmin4 Bug fix or my Fault ?
От:
Seçkin Alan <seckinalan@gmail.com>
Дата:
Hi,
I am using Debian Jessie and install pgAdmin4 Required modules.
after I clone pgAdmin4 from
http://git.postgresql.org/gitweb/?p=pgadmin4.git;a=summary ,
First of, ıf I want run setup.py, I must fix bug .
after I want run pgadmin4.py, I must fix gravatar import line.
In this case,
There are really bugs?
or
is it my fault ?
Thank you.
diff --git a/web/pgadmin/browser/views.py b/web/pgadmin/browser/views.py
index 07637be..f336f31 100644
--- a/web/pgadmin/browser/views.py
+++ b/web/pgadmin/browser/views.py
@@ -11,7 +11,7 @@
MODULE_NAME = 'browser'
from flask import Blueprint, Response, current_app, render_template, url_for
-from flaskext.gravatar import Gravatar
+from flask_gravatar import Gravatar
from flask.ext.security import login_required
from flask.ext.login import current_user
from inspect import getmoduleinfo, getmembers
@@ -223,4 +223,4 @@ def get_nodes():
return resp
-
\ No newline at end of file
+
diff --git a/web/setup.py b/web/setup.py
index c7398f5..da6652e 100644
--- a/web/setup.py
+++ b/web/setup.py
@@ -59,7 +59,9 @@ def do_setup():
db.create_all()
user_datastore.create_role(
name='Administrators',
description='pgAdmin Administrators Role')
user_datastore.create_user(
email=email, password=password)
+ db.session.commit()
user_datastore.add_role_to_user(email, 'Administrators')
+
# Get the user's ID and create the default server group
user = User.query.filter_by(email=email).first()
@@ -138,4 +140,5 @@ if os.path.isfile(config.SQLITE_PATH):
do_upgrade()
else:
print "The configuration database %s does not exist.\nEntering
initial setup mode...\n" % config.SQLITE_PATH
- do_setup()
\ No newline at end of file
+ do_setup()
--
Seçkin ALAN
http://sckn.org
Re: pgAdmin4 Bug fix or my Fault ?
От:
Dave Page <dpage@pgadmin.org>
Дата:
Hi On Fri, May 15, 2015 at 10:39 AM, Seçkin Alan wrote: > Hi, > I am using Debian Jessie and install pgAdmin4 Required modules. > after I clone pgAdmin4 from > http://git.postgresql.org/gitweb/?p=pgadmin4.git;a=summary , One quick comment - please attach your diff's as files, rather than putting them inline in the email. They often get mangled that way. > First of, ıf I want run setup.py, I must fix bug . Hmm, I'm not sure I understand how that is broken. We intentionally make a number of inserts to the database and then commit all the changes at once a little further down. Can you explain what the symptoms you see are? > after I want run pgadmin4.py, I must fix gravatar import line. That's weird. That works fine for a number of people. Can you send the output of "pip freeze"? Thanks! > In this case, > There are really bugs? > or > is it my fault ? > Thank you. > > > diff --git a/web/pgadmin/browser/views.py b/web/pgadmin/browser/views.py > index 07637be..f336f31 100644 > --- a/web/pgadmin/browser/views.py > +++ b/web/pgadmin/browser/views.py > @@ -11,7 +11,7 @@ > MODULE_NAME = 'browser' > > from flask import Blueprint, Response, current_app, render_template, url_for > -from flaskext.gravatar import Gravatar > +from flask_gravatar import Gravatar > from flask.ext.security import login_required > from flask.ext.login import current_user > from inspect import getmoduleinfo, getmembers > @@ -223,4 +223,4 @@ def get_nodes(): > return resp > > > - > \ No newline at end of file > + > diff --git a/web/setup.py b/web/setup.py > index c7398f5..da6652e 100644 > --- a/web/setup.py > +++ b/web/setup.py > @@ -59,7 +59,9 @@ def do_setup(): > db.create_all() > user_datastore.create_role( > name='Administrators', > description='pgAdmin Administrators Role') > user_datastore.create_user( > email=email, password=password) > + db.session.commit() > user_datastore.add_role_to_user(email, 'Administrators') > + > > # Get the user's ID and create the default server group > user = User.query.filter_by(email=email).first() > @@ -138,4 +140,5 @@ if os.path.isfile(config.SQLITE_PATH): > do_upgrade() > else: > print "The configuration database %s does not exist.\nEntering > initial setup mode...\n" % config.SQLITE_PATH > - do_setup() > \ No newline at end of file > + do_setup() > > -- > Seçkin ALAN > http://sckn.org > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company