Vous n'êtes pas identifié(e).
Bonjour
j'ai installe "django 1.7 et python3.4"
j'ai installe "libapache2-mod-wsgi-py3"
my settings.py est :
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'WebSite.urls'
WSGI_APPLICATION = 'WebSite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.7/r … #databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'systemes_reseaux',
'USER' : 'root',
'PASSWORD' : 'xxxxxxx',
'HOST' : '127.0.0.1',
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'fr-fr'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/h … tic-files/
STATIC_URL = '/static/'
le resultat de la commande "python3.4 manage.py runserver" est :
/opt/WebSite# python3.4 manage.py runserver
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py", line 14, in <module>
import MySQLdb as Database
ImportError: No module named 'MySQLdb'
Quel est le probleme?
Merci pour votre aide
T.
Hors ligne
Bonjour,
Il faut installer le paquet mysql pour python.
Hors ligne