Hola a todos, estoy intentando agregar un database a django, asi que descargue postgresSQL y lo instale despues de instalarlo accedi a pgadmin, he creado un database y me asegure que este conectado todo. Luego instale la libreria para python psycopg2, inserte los datos en settings.py de esta forma:
Código PYTHON:
Ver originalDATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'prueba', # Or path to database file if using sqlite3.
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '12345', # Not used with sqlite3.
'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '5432', # Set to empty string for default. Not used with sqlite3.
}
}
En el cmd.exe ejecute lo siguiente: manage.py runserver. Y me da este error:
Código PYTHON:
Ver originalTraceback (most recent call last):
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.py", line 91, in inner run
self.validate(display_num_errors=True)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "C:\Python27\lib\site-packages\django\core\management\validation.py", line 23, in get_validation_errors
from django.db import models, connection
File "C:\Python27\lib\site-packages\django\db\__init__.py", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE'])
File "C:\Python27\lib\site-packages\django\db\__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "C:\Python27\lib\site-packages\django\db\utils.py", line 92, in __getitem__
backend = load_backend(db['ENGINE'])
File "C:\Python27\lib\site-packages\django\db\utils.py", line 24, in load_backend
return import_module('.base', backend_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "C:\Python27\lib\site-packages\django\db\backends\postgresql_psycopg2\base.py", line 13, in <module>
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
File "C:\Python27\lib\site-packages\django\db\backends\postgresql_psycopg2\creation.py", line 1, in <module>
import psycopg2.extensions
File "C:\Python27\lib\site-packages\psycopg2\__init__.py", line 67, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: DLL load failed: Imposible encontrar el modulo especificado.
Alguien sabe que me equivoque?
Saludos...