Try this:

>> DATABASES = {
>>     'default': {
>>         'ENGINE': 'django.db.backends.sqlite3',  # Add
>> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
>>         'NAME': '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.
>>     }

> 




Best Regards,

Stanwin Siow



On Feb 13, 2012, at 9:03 PM, ajohnston wrote:

> Try changing the slashes form \ to /
> 
> On Feb 13, 4:50 am, Marcus Maximus <marcus.pres...@gmail.com> wrote:
>> Hey guys,
>> 
>> i am using sqlite3 for my django app. BUT I have problems installing
>> it. Here are my configs:
>> 
>> DATABASES = {
>>     'default': {
>>         'ENGINE': 'django.db.backends.sqlite3',  # Add
>> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
>>         'NAME': 'C:\Users\Maximus\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 tried this:
>> 
>>>>> from django.db import connection
>>>>> cursor = connection.cursor()
>> 
>> But I got this error:
>> 
>> Traceback (most recent call last):
>>   File "<console>", line 1, in <module>
>>   File "C:\Python27\lib\site-packages\django\db\backends\__init__.py",
>> line 250,
>>  in cursor
>>     cursor = self.make_debug_cursor(self._cursor())
>>   File "C:\Python27\lib\site-packages\django\db\backends
>> \sqlite3\base.py", line
>> 207, in _cursor
>>     self.connection = Database.connect(**kwargs)
>> OperationalError: unable to open database file
>> 
>> Can sb pls help me?
>> 
>> greetings
>> 
>> Maximus
>> 
>> PS.: I created my sqlite3 file like that:
>> 
>>    >sqlite3 test.db
>> ...>
>> ...>
>> ...>);
>> ...>Syntax error
>>    >
>> 
>> Can sb show me a better way to create an empty sqlite3 db file?
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to