J'essaie de suivre la procédure sur le site Web django et j'ai téléchargé sqlite et enregistré dans le dossier C:\Windows\System32
. Lorsque je modifie le fichier settings.py
, que dois-je mettre pour le champ Name
? Dois-je configurer une base de données? La littérature django dit que l'API devrait prendre soin de ça pour sqlite. Quand je cours python manage.py syncdb
je reçois juste un tas d'erreurs. Qu'est-ce que je fais mal?Configuration de Django avec sqlite3?
Jason & [email protected] ~/Desktop/mysite
$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line
443, in execute_from_command_line
utility.execute()
File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line
382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line
252, in fetch_command
app_name = get_commands()[subcommand]
File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line
101, in get_commands
apps = settings.INSTALLED_APPS
File "c:\Python27\lib\site-packages\django\utils\functional.py", line 184, in
inner
self._setup()
File "c:\Python27\lib\site-packages\django\conf\__init__.py", line 42, in _set
up
self._wrapped = Settings(settings_module)
File "c:\Python27\lib\site-packages\django\conf\__init__.py", line 93, in __in
it__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "c:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
port_module
__import__(name)
File "c:\Users\Jason & Casey\Desktop\mysite\mysite\settings.py", line 21
}
^
SyntaxError: invalid syntax
Comment coller le retraçage? Prendre une photo et l'afficher? – spitfiredd
Windows cmd right ?: Clic droit sur la barre de titre, éditer> marquer. Sélectionnez le texte et appuyez sur Entrée. Puis collez ici. –
Lol trop de caractères à coller ici. – spitfiredd