2012-06-18 2 views
1

je Django 1.4 et Python 2.6.6 Lorsque j'utilise « django-amdin.py startproject DJ Project » suivez les étapes page web https://www.ibm.com/developerworks/cn/linux/l-django/#resources Et je reçois fichiers comme suit:manage.py et les fichiers other.py ne sont pas dans un même fichier niveau

djproject/ 
|-- djproject 
| |-- __init__.py 
| |-- settings.py 
| |-- urls.py 
| `-- wsgi.py 
`-- manage.py 

Remarque: les fichiers manage.py et other.py ne se trouvent pas dans le même dossier de niveau, pourquoi?

++++++

DATABASES = { 
    'default': { 
     'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 
     'NAME': 'db/tdata.db',      # Or path to database file if using sqlite3. 
     'USER': '',      # Not used with sqlite3. 
     'PASSWORD': '',     # Not used with sqlite3. 
     'HOST': '',      # Set to empty string for localhost. Not used with sqlite3. 
     'PORT': '',      # Set to empty string for default. Not used with sqlite3. 
    } 
} 

Lorsque je configure 'MOTEUR' comme 'sqlite3' au lieu de 'django.db.backends.sqlite3', je suis l'erreur:

django.core.exceptions.ImproperlyConfigured: 'sqlite3' isn't an available database backend. 
Try using django.db.backends.sqlite3 instead. 
Error was: No module named base  

Est-ce aussi un nouveau personnage de 1.4?

Répondre

3

Cela a été changé in Django 1.4:

Django 1.4 ships with an updated default project layout and manage.py file for the startproject management command. These fix some issues with the previous manage.py handling of Python import paths that caused double imports, trouble moving from development to deployment, and other difficult-to-debug path issues.

Questions connexes