patents Posted October 12, 2017 Posted October 12, 2017 I am trying to work with postgress on tommy with django. here is django settings.py import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'secret' DEBUG = True ALLOWED_HOSTS = ['*'] INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', '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 = 'urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'patents_plrplus', 'USER': 'patents_plr', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306', } } AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True STATIC_URL = '/static/' Quote
wolstech Posted October 12, 2017 Posted October 12, 2017 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'patents_plrplus', 'USER': 'patents_plr', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306', Postgres uses port 5432, not 3306. Quote
patents Posted October 13, 2017 Author Posted October 13, 2017 (edited) OH. Thanks. Let me try Edited October 13, 2017 by patents Quote
patents Posted October 25, 2017 Author Posted October 25, 2017 I am still not able to use postgresql with django on tommy. Here is what I have tried so far, DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'patents_posttest', 'USER': 'patents_postusr', 'PASSWORD': 'pass', 'HOST': '65.19.143.6', 'PORT': '5432', } } DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'patents_posttest', 'USER': 'patents_postusr', 'PASSWORD': 'pass', 'HOST': '65.19.143.6', 'PORT': '5433', } } DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'patents_posttest', 'USER': 'patents_postusr', 'PASSWORD': 'pass', 'HOST': 'localhost', 'PORT': '', } }None of them works Quote
Krydos Posted October 25, 2017 Posted October 25, 2017 What python module are you using to connect to postgres? The mysqldb module definitely isn't installed by default and I don't think anyone else has requested postgres module. Here is a list of modules currently available to django on Tommy. https://krydos.heliohost.org/cgi-bin/modules36.py Quote
patents Posted October 26, 2017 Author Posted October 26, 2017 Oh I got it.It means other than me nobody trying django + postgress on heliohost. Please install psycopg2. Quote
Krydos Posted October 26, 2017 Posted October 26, 2017 There you go https://krydos.heliohost.org/cgi-bin/modules36.py Quote
wolstech Posted October 27, 2017 Posted October 27, 2017 It means other than me nobody trying django + postgress on heliohost. Pretty likely. A lot of our user have "first of their kind" development projects and configurations. We see a lot of interesting configurations and projects here That's why we install modules when asked, and why we sometimes have to ask a lot of questions when things don't work. Odds are we've simply never seen it before ourselves. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.