Hi Sapna,
What works for me (in Django 2.2) is to use the ENGINE setting that Dave
suggested:
'ENGINE':'django.db.backends.postgresql',
and install the driver that Daniel suggested:
psycopg2
Some database drivers are in the standard Python library (e.g. sqlite)
while others need t
You can use psycopg2
then in your settings must have something like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': DATABASENAME,
'USER': YOURUSER,
'PASSWORD': YOURPASSWORD,
'HOST': SERVER,
'PORT': PO
These are the settings to use in settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'DB-NAME',
'USER': 'USER',
'PASSWORD':'PASSWORD',
'HOST':'HOST',
'PORT': 'PORT',
'OPTIONS': {'charset': 'utf8'}
}
}
*Dave Edwards*
Email > d...@dwedig
Apologies that was from when I used MySQL, please use the following for
postgres:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'HOST':'HOST',
'PORT':'PORT',
'USER':'USERNAME',
'PASSWORD':'PASSWORD',
'NAME': 'DATABASE NAME',
}
}
*Dave Edwards*
Emai
Hi sapna,
Check your settings.py file and search for DATABASE there you can get a
link which is commented. Copy n paste that url and that will take you to
documentation page where you can get what needs to be imported in DATABASE.
On Fri, 14 Jun, 2019, 4:45 PM Sapna Dhage, wrote:
>
> Hello,
>
>
Hello,
I'm implementing Django application using PostgreSQL. However, I'm not able
to configure database connection string.
Any idea how do I configure database connection and where should I mention
database connection string?
Thank you,
Sapna
--
You received this message because you are su
6 matches
Mail list logo