Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation about setting the database connection #80

Open
etj opened this issue Feb 16, 2021 · 2 comments
Open

Documentation about setting the database connection #80

etj opened this issue Feb 16, 2021 · 2 comments

Comments

@etj
Copy link
Contributor

etj commented Feb 16, 2021

The documentation at https://docs.geonode.org/en/master/devel/installation/ reports about creating a local_settings.py file, but it is not used when running the migrate command line or when starting the application.

It should be documented that, if you have your local_settings.py, you should run the commands with the
DJANGO_SETTINGS_MODULE env var set.

You can set it locally on the command line running the command, such like:

DJANGO_SETTINGS_MODULE=geonode.local_settings python manage.py migrate

and

DJANGO_SETTINGS_MODULE=geonode.local_settings paver start

Also, in the section documenting the customization of the DB, the sample snippet reports:

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'geonode_dev',
    'USER': 'geonode_dev', 

but if you replace the default

'ENGINE': 'django.contrib.gis.db.backends.postgis',

with

'ENGINE': 'django.db.backends.postgresql_psycopg2',

you'll get the error

AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'

during the migration command.

@etj
Copy link
Contributor Author

etj commented Feb 16, 2021

@t-book t-book transferred this issue from GeoNode/geonode Feb 18, 2021
@t-book
Copy link
Collaborator

t-book commented Feb 18, 2021

@etj as this is regarding docs I've transferred the issue. Your contribution is very welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants