Tuesday, November 1, 2011

Django app, part 1, error with the database

Dear all,
I'm completly new to the world of django and python.
I'm trying to go through the tuto "Writing your first Django app, part
1" and of course I have an error.
This error happens in the step "database setup". I edited the settings
file, wrote 'django.db.backends.sqlite3' for engine and a path to a db
file (as it's said in the tuto that "If the file doesn't exist, it
will automatically be created when you synchronize the database for
the first time" I just set a path to an empty folder).
And then, I run manage.py syncdb and I get this :

C:\Python27\Lib\site-packages\django\bin\mysite>manage.py syncdb
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\django\bin\mysite\manage.py",
line 9, in <
module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management
\__init__.py", line
422, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management
\__init__.py", line
361, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management
\__init__.py", line
234, in fetch_command
app_name = get_commands()[subcommand]
File "C:\Python27\lib\site-packages\django\core\management
\__init__.py", line
102, in get_commands
apps = settings.INSTALLED_APPS
File "C:\Python27\lib\site-packages\django\utils\functional.py",
line 185, 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
90, 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:\Python27\Lib\site-packages\django\bin\mysite\mysite
\settings.py", lin
e 15
'NAME': 'C:/Users/songbird/Desktop/bdd/' # Or path to database
file if using sqlite3.
^
SyntaxError: invalid syntax

I'm on windows 7.
So, my question is simple: what am I doing wrong?
Thanks a lot in advance.
Best
-Nicolas-

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment