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
reset_db breaks with PostGIS without a template_postgis #489
Comments
@maikhoepfel Can you make a pull request? Also I'm not sure how is going to deal with backwards compatibility. |
maiksprenger
added a commit
to django-oscar/django-oscar
that referenced
this issue
Apr 10, 2014
This ensures that we catch errors in the build process of the demo site, and led to me spotting #1294. I must've accidentally committed my demo database settings; switched to a more generic defaults in demo/settings.py. Also added ATOMIC_REQUESTS as that is recommended by Oscar. django-extensions' reset_db fails with PostGIS without a template database, hence it is skipped on Travis. django-extensions/django-extensions#489
maiksprenger
added a commit
to django-oscar/django-oscar
that referenced
this issue
Apr 10, 2014
This ensures that we catch errors in the build process of the demo site, and led to me spotting #1294. I must've accidentally committed my demo database settings; switched to a more generic defaults in demo/settings.py. Also added ATOMIC_REQUESTS as that is recommended by Oscar. django-extensions' reset_db fails with PostGIS without a template database, hence it is skipped on Travis. django-extensions/django-extensions#489
@maikhoepfel any updates? |
@camilonova I unfortunately won't have time to work on this beyond filing the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
django-extensions/django_extensions/management/commands/reset_db.py
Line 146 in 73376f3
template_postgis
. Both assumptions are bad, as the template database can be changed. With PostGIS 2.0 and PostgreSQL 9.1, a template database is not necessary anymore.The correct fix is probably to use
template_postgis
fromdjango.contrib.gis.db.backends.postgis.creation
and only append theTEMPLATE
to the SQL if it is notNone
. As it stands, I can't usereset_db
with a modern PostGIS setup.The text was updated successfully, but these errors were encountered: