On 04.04.2013 19:52, Alexis Roda wrote:

> Sounds like you're using two DBs ... does not make much sense since I'd
> expect you're using the same settings.py in both cases, so the same
> database. In the testserver it looks like an in memory database which is
> destroyed upon restart.
> 

yes, of course. same settings.py, at least it should be. (see below).

here the relevant part:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'nacc.db',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}


> Out of curiosity, what happens to the data created through the shell
> after starting/stoping the testserver, it's still there?

yes, the shell-added data is still available.

> In order to diagnose what the problem really is I'd suggest to add a
> print to some of your views:

databases {'default': {'ENGINE': 'django.db.backends.sqlite3',
'TEST_MIRROR': None, 'NAME': ':memory:', 'TEST_CHARSET': None,
'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'OPTIONS': {}, 'HOST': '',
'USER': '', 'TEST_NAME': None, 'PASSWORD': '', 'PORT': ''}

> and in the shell just:

the shell output:
databases {'default': {'ENGINE': 'django.db.backends.sqlite3',
'TEST_MIRROR': None, 'NAME': 'nacc.db', 'TEST_CHARSET': None,
'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'OPTIONS': {}, 'HOST': '',
'USER': '', 'TEST_NAME': None, 'PASSWORD': '', 'PORT': ''}}


so the name does not match. Do I miss something to import?

bg,
Johannes

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


Reply via email to