В терминале Linux Mint 17.1 x64
$ python -V
Python 2.7.6
python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import django
>>> django.VERSION
File “<stdin>”, line 1
django.VERSION
^
IndentationError: unexpected indent
>>> print (django.get_version())
1.6.1
>>>
Дальше в Pycharm
""" Django settings for test1 project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'dld=0ww^y78(!_ujpxp_bz9rkb_=xzs80)wt+^ccxv(0yeszd)' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'Test1', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'test1.urls' WSGI_APPLICATION = 'test1.wsgi.application' # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', 'PASSWORD': '1', 'HOST': '', # Set to empty string for localhost. 'PORT': '', # Set to empty string for default. } } # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_URL = '/static/' TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), )
bash -cl "/usr/bin/python2.7 /opt/pycharm-4.0.5/helpers/pycharm/django_manage.py sql auth /home/andrey/PycharmProjects/test1" Traceback (most recent call last): File "/opt/pycharm-4.0.5/helpers/pycharm/django_manage.py", line 41, in <module> run_module(manage_file, None, '__main__', True) File "/usr/lib/python2.7/runpy.py", line 176, in run_module fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code mod_name, mod_fname, mod_loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/andrey/PycharmProjects/test1/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute output = self.handle(*args, **options) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in handle app_output = self.handle_app(app, **options) File "/usr/lib/python2.7/dist-packages/django/core/management/commands/sql.py", line 21, in handle_app return '\n'.join(sql_create(app, self.style, connections[options.get('database')])) File "/usr/lib/python2.7/dist-packages/django/core/management/sql.py", line 30, in sql_create tables = connection.introspection.table_names() File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 1210, in table_names cursor = self.connection.cursor() File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 157, in cursor cursor = self.make_debug_cursor(self._cursor()) File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 129, in _cursor self.ensure_connection() File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 99, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 124, in ensure_connection self.connect() File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 112, in connect self.connection = self.get_new_connection(conn_params) File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 116, in get_new_connection return Database.connect(**conn_params) File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect connection_factory=connection_factory, async=async) django.db.utils.OperationalError: ВАЖНО: пользователь "adm_petrov" не прошёл проверку подлинности (Peer) Proce
https://www.jetbrains.com/pycharm/quickstart/django_guide.html#BeforeStart
В саму базу PostgreSQL захожу нормально под этим пользователем и паролем. Через PGadmin создавал и другого суперпользователя. Пытался зайти через него в pycharm. Результат тот же