django 2.1.3 'django.db.backends.postgis' isn't an available database backend
I am trying to use geodjango for a project. Before I use geodjango I'm trying to do a learn it from the following tutorial: https://docs.djangoproject.com/en/2.1/ref/contrib/gis/tutorial/
I originally had django 1.11 installed and tried following that tutorial (stupid of me). However, after uninstalling django 1.11 and installing django 2.1.3 I am encountering some errors.
After I make the model according to the tutorial, I use the command
python3 manage.py makemigrations
I end up getting the following error:
Traceback (most recent call last):
File "/home/aihoque2/.local/lib/python3.6/site- packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.db.backends.postgis'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 101, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 305, in add_to_class
value.contribute_to_class(cls, name)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/options.py", line 203, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/__init__.py", line 33, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 202, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 125, in load_backend
) from e_user
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.postgis' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
here is my configuration in settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'world',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgis',
'NAME': 'XXXX', #redacted
'USER': 'XXXX', #redacted
'PASSWORD': 'XXXX', #redacted
'HOST': 'localhost',
'PORT': '5432',
}
}
I dealt with this problem originally when I had django 1.11 on python2, but if I even use python3 I still get the error. When I run
python3 -m django version
I get '2.1.3'. I am not sure why django 2.1.3 will not take postgis as a backend even though the tutorial tells me it does. Is there perhaps something wrong with my django installation such that when I run
django-admin
it runs the 1.11 script instead of the 2.1.3? I am quite lost and this is quite frustrating.
django python-3.x postgis geodjango
add a comment |
I am trying to use geodjango for a project. Before I use geodjango I'm trying to do a learn it from the following tutorial: https://docs.djangoproject.com/en/2.1/ref/contrib/gis/tutorial/
I originally had django 1.11 installed and tried following that tutorial (stupid of me). However, after uninstalling django 1.11 and installing django 2.1.3 I am encountering some errors.
After I make the model according to the tutorial, I use the command
python3 manage.py makemigrations
I end up getting the following error:
Traceback (most recent call last):
File "/home/aihoque2/.local/lib/python3.6/site- packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.db.backends.postgis'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 101, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 305, in add_to_class
value.contribute_to_class(cls, name)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/options.py", line 203, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/__init__.py", line 33, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 202, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 125, in load_backend
) from e_user
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.postgis' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
here is my configuration in settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'world',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgis',
'NAME': 'XXXX', #redacted
'USER': 'XXXX', #redacted
'PASSWORD': 'XXXX', #redacted
'HOST': 'localhost',
'PORT': '5432',
}
}
I dealt with this problem originally when I had django 1.11 on python2, but if I even use python3 I still get the error. When I run
python3 -m django version
I get '2.1.3'. I am not sure why django 2.1.3 will not take postgis as a backend even though the tutorial tells me it does. Is there perhaps something wrong with my django installation such that when I run
django-admin
it runs the 1.11 script instead of the 2.1.3? I am quite lost and this is quite frustrating.
django python-3.x postgis geodjango
Have you installed all the system dependencies?sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27
add a comment |
I am trying to use geodjango for a project. Before I use geodjango I'm trying to do a learn it from the following tutorial: https://docs.djangoproject.com/en/2.1/ref/contrib/gis/tutorial/
I originally had django 1.11 installed and tried following that tutorial (stupid of me). However, after uninstalling django 1.11 and installing django 2.1.3 I am encountering some errors.
After I make the model according to the tutorial, I use the command
python3 manage.py makemigrations
I end up getting the following error:
Traceback (most recent call last):
File "/home/aihoque2/.local/lib/python3.6/site- packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.db.backends.postgis'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 101, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 305, in add_to_class
value.contribute_to_class(cls, name)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/options.py", line 203, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/__init__.py", line 33, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 202, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 125, in load_backend
) from e_user
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.postgis' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
here is my configuration in settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'world',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgis',
'NAME': 'XXXX', #redacted
'USER': 'XXXX', #redacted
'PASSWORD': 'XXXX', #redacted
'HOST': 'localhost',
'PORT': '5432',
}
}
I dealt with this problem originally when I had django 1.11 on python2, but if I even use python3 I still get the error. When I run
python3 -m django version
I get '2.1.3'. I am not sure why django 2.1.3 will not take postgis as a backend even though the tutorial tells me it does. Is there perhaps something wrong with my django installation such that when I run
django-admin
it runs the 1.11 script instead of the 2.1.3? I am quite lost and this is quite frustrating.
django python-3.x postgis geodjango
I am trying to use geodjango for a project. Before I use geodjango I'm trying to do a learn it from the following tutorial: https://docs.djangoproject.com/en/2.1/ref/contrib/gis/tutorial/
I originally had django 1.11 installed and tried following that tutorial (stupid of me). However, after uninstalling django 1.11 and installing django 2.1.3 I am encountering some errors.
After I make the model according to the tutorial, I use the command
python3 manage.py makemigrations
I end up getting the following error:
Traceback (most recent call last):
File "/home/aihoque2/.local/lib/python3.6/site- packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.db.backends.postgis'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/registry.py", line 112, in populate
app_config.import_models()
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in <module>
class AbstractBaseUser(models.Model):
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 101, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/base.py", line 305, in add_to_class
value.contribute_to_class(cls, name)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/models/options.py", line 203, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/__init__.py", line 33, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 202, in __getitem__
backend = load_backend(db['ENGINE'])
File "/home/aihoque2/.local/lib/python3.6/site-packages/django/db/utils.py", line 125, in load_backend
) from e_user
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.postgis' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
here is my configuration in settings.py:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'world',
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgis',
'NAME': 'XXXX', #redacted
'USER': 'XXXX', #redacted
'PASSWORD': 'XXXX', #redacted
'HOST': 'localhost',
'PORT': '5432',
}
}
I dealt with this problem originally when I had django 1.11 on python2, but if I even use python3 I still get the error. When I run
python3 -m django version
I get '2.1.3'. I am not sure why django 2.1.3 will not take postgis as a backend even though the tutorial tells me it does. Is there perhaps something wrong with my django installation such that when I run
django-admin
it runs the 1.11 script instead of the 2.1.3? I am quite lost and this is quite frustrating.
django python-3.x postgis geodjango
django python-3.x postgis geodjango
asked Nov 22 at 19:46
Ammar Hoque
154
154
Have you installed all the system dependencies?sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27
add a comment |
Have you installed all the system dependencies?sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27
Have you installed all the system dependencies?
sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
Have you installed all the system dependencies?
sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27
add a comment |
1 Answer
1
active
oldest
votes
The postgis backend is in django.contrib.gis
, not django.db
:
'ENGINE': 'django.contrib.gis.db.backends.postgis',
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437263%2fdjango-2-1-3-django-db-backends-postgis-isnt-an-available-database-backend%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The postgis backend is in django.contrib.gis
, not django.db
:
'ENGINE': 'django.contrib.gis.db.backends.postgis',
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
add a comment |
The postgis backend is in django.contrib.gis
, not django.db
:
'ENGINE': 'django.contrib.gis.db.backends.postgis',
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
add a comment |
The postgis backend is in django.contrib.gis
, not django.db
:
'ENGINE': 'django.contrib.gis.db.backends.postgis',
The postgis backend is in django.contrib.gis
, not django.db
:
'ENGINE': 'django.contrib.gis.db.backends.postgis',
answered Nov 22 at 19:56
Alasdair
178k26302306
178k26302306
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
add a comment |
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
I've been dealing with this problem for a week. You fixed my issue. Thank you so much!
– Ammar Hoque
Nov 26 at 22:25
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437263%2fdjango-2-1-3-django-db-backends-postgis-isnt-an-available-database-backend%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you installed all the system dependencies?
sudo apt-get install binutils libproj-dev gdal-bin
– Alex
Nov 22 at 19:50
It was already installed. Turned out something was wrong this the engine backend I selected
– Ammar Hoque
Nov 26 at 22:27