Hi Chris,
maybe it's the best to just do what the error message suggest:
"Please fill out DATABASE_NAME in the settings module before using the
database. "
Put in something like '/home/chris/projects/django-tutorial/db/db.db'
You can create your own name. Django just wants to know where it
should store the database.
No need to install MySQL for your local sandboxes :)
Greets,
Martin
On 21 Dez., 12:40, Chris wrote:
> Okay... I'm on part two of the tut now and I am attemping to use
> Python's built-in SQLite Database just to get a feel for Django.
> However, the tutorial confuses me in part one when it defines
> DATABASE_NAME, "The name of your database. If you're using SQLite, the
> database will be a file on your computer; in that case, DATABASE_NAME
> should be the full absolute path, including filename, of that file. If
> the file doesn't exist, it will automatically be created when you
> synchronize the database for the first time (see below)."
>
> It say, "see below," but all that is below is the reference, "If
> you're using SQLite, you don't need to create anything beforehand -
> the database file will be created automatically when it is needed."
> which is wonderful, but I recieve the error shown below when I try to
> run the admin interface, as I haven't specified the DATABASE_NAME. How
> can I if I don't know where it was created?
>
> Anyway, here's my error. Running almost any other command at the promt
> gives me an error ending with "ImproperlyConfigured: Please fill out
> DATABASE_NAME in the settings module before using the database.", but
> the error shown when I try to run the admin is included below...
>
> ---
>
> Traceback (most recent call last):
>
> File "/Library/Python/2.5/site-packages/django/core/servers/
> basehttp.py", line 278, in run
> self.result = application(self.environ, self.start_response)
>
> File "/Library/Python/2.5/site-packages/django/core/servers/
> basehttp.py", line 635, in __call__
> return self.application(environ, start_response)
>
> File "/Library/Python/2.5/site-packages/django/core/handlers/
> wsgi.py", line 243, in __call__
> response = middleware_method(request, response)
>
> File "/Library/Python/2.5/site-packages/django/contrib/sessions/
> middleware.py", line 35, in process_response
> request.session.save()
>
> File "/Library/Python/2.5/site-packages/django/contrib/sessions/
> backends/db.py", line 52, in save
> session_key = self.session_key,
>
> File "/Library/Python/2.5/site-packages/django/contrib/sessions/
> backends/base.py", line 152, in _get_session_key
> self._session_key = self._get_new_session_key()
>
> File "/Library/Python/2.5/site-packages/django/contrib/sessions/
> backends/base.py", line 144, in _get_new_session_key
> if not self.exists(session_key):
>
> File "/Library/Python/2.5/site-packages/django/contrib/sessions/
> backends/db.py", line 25, in exists
> Session.objects.get(session_key=session_key)
>
> File "/Library/Python/2.5/site-packages/django/db/models/
> manager.py", line 93, in get
> return self.get_query_set().get(*args, **kwargs)
>
> File "/Library/Python/2.5/site-packages/django/db/models/query.py",
> line 304, in get
> num = len(clone)
>
> File "/Library/Python/2.5/site-packages/django/db/models/query.py",
> line 160, in __len__
> self._result_cache = list(self.iterator())
>
> File "/Library/Python/2.5/site-packages/django/db/models/query.py",
> line 275, in iterator
> for row in self.query.results_iter():
>
> File "/Library/Python/2.5/site-packages/django/db/models/sql/
> query.py", line 206, in results_iter
> for rows in self.execute_sql(MULTI):
>
> File "/Library/Python/2.5/site-packages/django/db/models/sql/
> query.py", line 1733, in execute_sql
> cursor = self.connection.cursor()
>
> File "/Library/Python/2.5/site-packages/django/db/backends/
> __init__.py", line 56, in cursor
> cursor = self._cursor(settings)
>
> File "/Library/Python/2.5/site-packages/django/db/backends/sqlite3/
> base.py", line 139, in _cursor
> raise ImproperlyConfigured, "Please fill out DATABASE_NAME in the
> settings module before using the database."
>
> ImproperlyConfigured: Please fill out DATABASE_NAME in the settings
> module before using the database.
>
> ---
>
> Pretty much the same as the errors I'm getting at the command line...
> Any insight would be appreciated - I think I'll just install MySQL
> locally and use that, as SQLite sounds like a limiting pain in the
> ass... Verification on this? Anyway, any help is greatly appreciated -
> you Django people are awesome.
>
> Best,
>
> Chris
>
> On Dec 21, 2:20 am, Chris wrote:
>
> > Thanks Jeff - I've figured it out no