Problemas con syncdb

162 views
Skip to first unread message

DIEGO CENZANO PRADO

unread,
Apr 3, 2012, 9:28:06 AM4/3/12
to django...@googlegroups.com
I am trying to do the tutorial and I get an error doing 'python manage.py syncdb'. I am using the DATABASES as it is created and I've try to use sqlite3 and mysql backends. I tried it in windows and in unix. Rasult is always the same:
 raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
But settings.py is:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'polls.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.
    }
}
¿Any idea?
Message has been deleted

Andre Terra

unread,
Apr 3, 2012, 10:13:02 AM4/3/12
to django...@googlegroups.com
I guess you could check if you're actually looking at the right file.

$ python manage.py shell

>>> import settings

>>> print settings.__file__

 


Cheers,
AT


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Yl-oyPgbgLYJ.
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.

Sandro Dutra

unread,
Apr 3, 2012, 10:16:22 AM4/3/12
to django...@googlegroups.com
# Or path to database file if using sqlite3.

2012/4/3 DIEGO CENZANO PRADO <diego....@bbva.com>

--

DIEGO CENZANO PRADO

unread,
Apr 3, 2012, 10:29:09 AM4/3/12
to django...@googlegroups.com
Thank you for your feedback. I was using django 1.4. I have changed to the previous version and it is working. Maybe a bug in the new version?

El martes 3 de abril de 2012 16:12:04 UTC+2, imarcelolz escribió:
Try to setup the absolute path on "NAME".

Um Abraço!
Ivo Marcelo Leonardi Zaniolo
2012/4/3 DIEGO CENZANO PRADO <diego....@bbva.com>
I am trying to do the tutorial and I get an error doing 'python manage.py syncdb'. I am using the DATABASES as it is created and I've try to use sqlite3 and mysql backends. I tried it in windows and in unix. Rasult is always the same:

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Yl-oyPgbgLYJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
Message has been deleted

webipy

unread,
May 2, 2012, 7:23:26 PM5/2/12
to django...@googlegroups.com
@Ivo Marcelo Leonardi Zaniolo

Where have you created or put your database file while using 1.4 version ,
because I too have got this error and have been struggling to run it :( but
now reverted to 1.3 and it works.

--
View this message in context: http://python.6.n6.nabble.com/Problemas-con-syncdb-tp4681998p4947768.html
Sent from the django-users mailing list archive at Nabble.com.

Joel Goldstick

unread,
May 3, 2012, 10:06:10 AM5/3/12
to django...@googlegroups.com
> --
> 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.
>
According to the documentation:
https://docs.djangoproject.com/en/1.4/ref/settings/#name

Default: '' (Empty string)

The name of the database to use. For SQLite, it's the full path to the
database file. When specifying the path, always use forward slashes,
even on Windows (e.g. C:/homes/user/mysite/sqlite3.db).

So you should have a full path to the file, not just its name
--
Joel Goldstick
Reply all
Reply to author
Forward
0 new messages