Thanks :-)
On Dec 22, 4:01 am, leveille <[email protected]> wrote:
> You're 14. You recognize that you're having a problem and you post to
> the Django group for help. You're not stupid at all. I would say
> you're very intelligent!
>
> On Dec 21, 2:43 pm, Chris <[email protected]> wrote:
>
> > Oh shit, that's awesome! Thanks! I thought it had already created the
> > DB and wanted me to fill in that info... I'm so stupid sometimes.
> > Thanks a bunch mrtot...
>
> > On Dec 21, 3:50 am, mrtot <[email protected]> wrote:
>
> > > 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 <[email protected]> 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 <[email protected]> wrote:
>
> > > > > Thanks Jeff - I've figured it out now... I'm new to Python - I'm 14...
> > > > > Anyway, it's not the UNIX that was screwing me up, it's that I hadn't
> > > > > installed Django properly - just dragged it into site-packages without
> > > > > setting a symlink. Again, thanks for replying - no doubt I'll have
> > > > > more questions for you guys!
>
> > > > > Best,
>
> > > > > Chris
>
> > > > > On Dec 21, 12:41 am, Jeff Anderson <[email protected]> wrote:
>
> > > > > > Chris wrote:
> > > > > > > it says it can't find django-admin.py
>
> > > > > > I didn't see that for my most recent reply. Your problem is that
> > > > > > django-admin.py isn't on your PATH. Either put it in your PATH or
> > > > > > run it
> > > > > > with a full path: /path/to/django-admin.py
>
> > > > > > If you're unfamiliar with this terminology, you need to read up on
> > > > > > some
> > > > > > unix basics. There are many tutorials about the unix shell out
> > > > > > there. I
> > > > > > can't recommend one because I would just google for an introduction
> > > > > > to
> > > > > > the unix/linux/macos terminal.
>
> > > > > > Jeff Anderson
>
> > > > > > signature.asc
> > > > > > < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---