sqlite3 error

8 views
Skip to first unread message

Marcus Maximus

unread,
Feb 12, 2012, 9:31:45 AM2/12/12
to Django users
Hey guys,

i am trying to configure sqlite3(cause it seems to be easier than
postgresql) for django:

my setting.py file is:

DATABASES = {
'default': {
'ENGINE': 'sqlite3', #'django.db.backends.', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'C:\Users\PythonUser\Desktop\Webseite\Django\sqlite-
shell-win32-x86-3071000\test.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.
}
}

I am getting this error:
[quote]

>>> from django.db import connection
>>> cursor = connection.cursor()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Python27\lib\site-packages\django\db\backends\dummy
\base.py", line 15
, in complain
raise ImproperlyConfigured("You haven't set the database ENGINE
setting yet.
")
ImproperlyConfigured: You haven't set the database ENGINE setting yet.

[/quote]

I tried to change the setting.py on line 'ENGINE': 'sqlite3', but
this seems ok in my eyes...

so whats wrong?

grettings and a BIG THX in advance

Reinout van Rees

unread,
Feb 12, 2012, 9:42:52 AM2/12/12
to django...@googlegroups.com
On 12-02-12 15:31, Marcus Maximus wrote:
> I tried to change the setting.py on line 'ENGINE': 'sqlite3', but
> this seems ok in my eyes...
>
> so whats wrong?

Try the full dotted path, so including django.db.backends:

'ENGINE': 'django.db.backends.sqlite3',

Just "sqlite3" by itself was fine in older django versions, so you might
have picked up an example from there.

Reinout

--
Reinout van Rees http://reinout.vanrees.org/
rei...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"

Nevio Vesic

unread,
Feb 12, 2012, 9:36:14 AM2/12/12
to django...@googlegroups.com
Try:

django.db.backends.sqlite3

instead of just

sqlite3


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




--
Nevio Vesić
Web Application Developer @ TelTech Systems, Inc.
IT Consulting | Coaching | Mentoring
Executive Board Member at WeeYou.


Skype: 
nevio.vesic

Mobile: 
(Croatia) 00385 91-525-6970 
(US)        001 (310) 510-6911 

----------------------------------

This e-mail contains confidential data. Treat it as such. Do not forward it nor share with anyone without my permission. If you choose so, you are violating my rules and breaking my privacy. 

Reply all
Reply to author
Forward
0 new messages