How can I see my databases in SQlite for Django.
I am following the django tutorial on ubuntu.
Now its working fine except. After running
python manage.py sql polls
then
python manage.py syncdb
So then I thought I would check out the daabase and tables but this is where the issue is:
sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main
1 temp
There is no mysite database.
How can i see the database?
your
mysitedatabase will be in the file system itself in the root of your project (top most folder of your django project), if this is how yoursettings.pylooks like:-If you enabled your django admin, and write the appropriate admin.py files for your polls app, you should be able to add, edit, delete or view your polls data in django admin.
You can of course load up your
mysitedatabase in your django project root (top folder) and view the data in it using something like http://sqlitebrowser.sourceforge.net/In command line in your ubuntu terminal, if you did do your syncdb correctly, you should be seeing something similar to this:-
You mentioned you already run your
./manage.py syncdbcorrectly, so you should be able access your sqlite database by executingsqlite mysite, like this:-And the
.tablescommand in your sqlite shell will give you:-