Magg27 | Bonjour,
J'ai installé le framework Django, j'ai paramétré le fichier settings.py pour qu'il puisse utiliser ma base SQL :
Code :
- # Django settings for bcgw project.
- DEBUG = True
- TEMPLATE_DEBUG = DEBUG
- ADMINS = (
- # ('Your Name', 'your_email@domain.com'),
- )
- MANAGERS = ADMINS
- DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- DATABASE_NAME = 'bcgw' # Or path to database file if using sqlite3.
- DATABASE_USER = 'admin' # Not used with sqlite3.
- DATABASE_PASSWORD = 'xxxxx' # Not used with sqlite3.
- DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
- DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
Et lorsque je lance la commande
Code :
- python manage.py runserver
|
j'ai ce message d'erreur :
Code :
- Validating models...
- Unhandled exception in thread started by <function inner_run at 0x2a994a0320>
- Traceback (most recent call last):
- File "/usr/local/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
- self.validate(display_num_errors=True)
- File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 249, in validate
- num_errors = get_validation_errors(s, app)
- File "/usr/local/lib/python2.5/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
- from django.db import models, connection
- File "/usr/local/lib/python2.5/site-packages/django/db/__init__.py", line 41, in <module>
- backend = load_backend(settings.DATABASE_ENGINE)
- File "/usr/local/lib/python2.5/site-packages/django/db/__init__.py", line 17, in load_backend
- return import_module('.base', 'django.db.backends.%s' % backend_name)
- File "/usr/local/lib/python2.5/site-packages/django/utils/importlib.py", line 35, in import_module
- __import__(name)
- File "/usr/local/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 13, in <module>
- raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: /root/.python-eggs/MySQL_python-1.2.3c1-py2.6-linux-i686.egg-tmp/_mysql.so: cannot open shared object file: No such file or directory
|
Je suis sous RedHat EL 4
Avez-vous une idée de la solution ?
Merci |