mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
parent
057a2b2312
commit
d68e6bd892
@ -519,10 +519,7 @@ def create_app(app_name=None):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# We use the postgres-winreg.ini file on non-Windows
|
# We use the postgres-winreg.ini file on non-Windows
|
||||||
try:
|
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
except ImportError:
|
|
||||||
from ConfigParser import ConfigParser # Python 2
|
|
||||||
|
|
||||||
registry = ConfigParser()
|
registry = ConfigParser()
|
||||||
|
|
||||||
|
@ -16,17 +16,13 @@ from ldap3.core.exceptions import LDAPSocketOpenError, LDAPBindError,\
|
|||||||
LDAPInvalidScopeError, LDAPAttributeError, LDAPInvalidFilterError,\
|
LDAPInvalidScopeError, LDAPAttributeError, LDAPInvalidFilterError,\
|
||||||
LDAPStartTLSError, LDAPSSLConfigurationError
|
LDAPStartTLSError, LDAPSSLConfigurationError
|
||||||
from flask_babelex import gettext
|
from flask_babelex import gettext
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from .internal import BaseAuthentication
|
from .internal import BaseAuthentication
|
||||||
from pgadmin.model import User, ServerGroup, db, Role
|
from pgadmin.model import User, ServerGroup, db, Role
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from pgadmin.tools.user_management import create_user
|
from pgadmin.tools.user_management import create_user
|
||||||
|
|
||||||
try:
|
|
||||||
from urllib.parse import urlparse
|
|
||||||
except ImportError:
|
|
||||||
from urlparse import urlparse
|
|
||||||
|
|
||||||
|
|
||||||
ERROR_SEARCHING_LDAP_DIRECTORY = "Error searching the LDAP directory: {}"
|
ERROR_SEARCHING_LDAP_DIRECTORY = "Error searching the LDAP directory: {}"
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ from flask import Response, url_for
|
|||||||
from flask import render_template, request, current_app
|
from flask import render_template, request, current_app
|
||||||
from flask_babelex import gettext
|
from flask_babelex import gettext
|
||||||
from flask_security import login_required
|
from flask_security import login_required
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from pgadmin.browser.server_groups.servers.utils import parse_priv_to_db
|
from pgadmin.browser.server_groups.servers.utils import parse_priv_to_db
|
||||||
from pgadmin.utils import PgAdminModule
|
from pgadmin.utils import PgAdminModule
|
||||||
from pgadmin.utils.ajax import make_response as ajax_response, \
|
from pgadmin.utils.ajax import make_response as ajax_response, \
|
||||||
@ -21,11 +23,6 @@ from pgadmin.utils.ajax import make_response as ajax_response, \
|
|||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
|
|
||||||
from config import PG_DEFAULT_DRIVER
|
from config import PG_DEFAULT_DRIVER
|
||||||
|
|
||||||
try:
|
|
||||||
from urllib import unquote
|
|
||||||
except ImportError:
|
|
||||||
from urllib.parse import unquote
|
|
||||||
from pgadmin.utils.ajax import precondition_required
|
from pgadmin.utils.ajax import precondition_required
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from pgadmin.utils.preferences import Preferences
|
from pgadmin.utils.preferences import Preferences
|
||||||
|
@ -18,6 +18,7 @@ from flask import Response, url_for, render_template, session, request, \
|
|||||||
current_app
|
current_app
|
||||||
from flask_babelex import gettext
|
from flask_babelex import gettext
|
||||||
from flask_security import login_required, current_user
|
from flask_security import login_required, current_user
|
||||||
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from config import PG_DEFAULT_DRIVER, ON_DEMAND_RECORD_COUNT
|
from config import PG_DEFAULT_DRIVER, ON_DEMAND_RECORD_COUNT
|
||||||
from pgadmin.misc.file_manager import Filemanager
|
from pgadmin.misc.file_manager import Filemanager
|
||||||
@ -46,12 +47,6 @@ from pgadmin.tools.sqleditor.utils.query_history import QueryHistory
|
|||||||
|
|
||||||
MODULE_NAME = 'sqleditor'
|
MODULE_NAME = 'sqleditor'
|
||||||
|
|
||||||
# import unquote from urllib for python2.x and python3.x
|
|
||||||
try:
|
|
||||||
from urllib import unquote
|
|
||||||
except ImportError:
|
|
||||||
from urllib.parse import unquote
|
|
||||||
|
|
||||||
|
|
||||||
class SqlEditorModule(PgAdminModule):
|
class SqlEditorModule(PgAdminModule):
|
||||||
"""
|
"""
|
||||||
|
@ -10,10 +10,7 @@
|
|||||||
""" Implemented classes for the different object type used by data grid """
|
""" Implemented classes for the different object type used by data grid """
|
||||||
|
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
import six
|
import six
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from flask_babelex import gettext
|
from flask_babelex import gettext
|
||||||
|
@ -12,15 +12,12 @@ import re
|
|||||||
|
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
from jinja2 import FileSystemLoader
|
from jinja2 import FileSystemLoader
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
from pgadmin import VersionedTemplateLoader
|
from pgadmin import VersionedTemplateLoader
|
||||||
from pgadmin.utils.route import BaseTestGenerator
|
from pgadmin.utils.route import BaseTestGenerator
|
||||||
from pgadmin.utils.driver import get_driver
|
from pgadmin.utils.driver import get_driver
|
||||||
from config import PG_DEFAULT_DRIVER
|
from config import PG_DEFAULT_DRIVER
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
|
|
||||||
|
|
||||||
class TestViewDataTemplates(BaseTestGenerator):
|
class TestViewDataTemplates(BaseTestGenerator):
|
||||||
|
@ -23,10 +23,8 @@
|
|||||||
"""
|
"""
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from flask_babelex import gettext
|
from flask_babelex import gettext
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
from pgadmin.tools.sqleditor.utils.get_column_types import get_columns_types
|
from pgadmin.tools.sqleditor.utils.get_column_types import get_columns_types
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,11 +8,9 @@
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
from pgadmin.tools.sqleditor.utils.constant_definition import TX_STATUS_IDLE
|
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
from pgadmin.tools.sqleditor.utils.constant_definition import TX_STATUS_IDLE
|
||||||
|
|
||||||
|
|
||||||
def save_changed_data(changed_data, columns_info, conn, command_obj,
|
def save_changed_data(changed_data, columns_info, conn, command_obj,
|
||||||
|
@ -13,13 +13,9 @@ fetching results from it, and also takes care of the duplicate column name in
|
|||||||
result.
|
result.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
|
|
||||||
from psycopg2.extensions import cursor as _cursor, encodings
|
from psycopg2.extensions import cursor as _cursor, encodings
|
||||||
from .encoding import configureDriverEncodings
|
from .encoding import configureDriverEncodings
|
||||||
|
|
||||||
|
@ -28,21 +28,15 @@ from uuid import uuid4
|
|||||||
from threading import Lock
|
from threading import Lock
|
||||||
from flask import current_app, request, flash, redirect
|
from flask import current_app, request, flash, redirect
|
||||||
from flask_login import login_url
|
from flask_login import login_url
|
||||||
from pgadmin.utils.ajax import make_json_response
|
|
||||||
|
|
||||||
try:
|
|
||||||
from cPickle import dump, load
|
|
||||||
except ImportError:
|
|
||||||
from pickle import dump, load
|
from pickle import dump, load
|
||||||
|
|
||||||
try:
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
|
||||||
from ordereddict import OrderedDict
|
|
||||||
|
|
||||||
from flask.sessions import SessionInterface, SessionMixin
|
from flask.sessions import SessionInterface, SessionMixin
|
||||||
from werkzeug.datastructures import CallbackDict
|
from werkzeug.datastructures import CallbackDict
|
||||||
|
|
||||||
|
from pgadmin.utils.ajax import make_json_response
|
||||||
|
|
||||||
|
|
||||||
def _calc_hmac(body, secret):
|
def _calc_hmac(body, secret):
|
||||||
return base64.b64encode(
|
return base64.b64encode(
|
||||||
|
Loading…
Reference in New Issue
Block a user