Forums

no such table: django_session

please help to solve the problem.

I moved the project to your hosting, but the browser displays the following error message:

no such table: django_session

I tried to register the absolute path in the config file:

DATABASES = {
    'default':
        {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': 'project.db',
            #'NAME': os.path.join(BASE_DIR,'kinopom.project.db'),
            #'NAME': '/home/kinopomoika/kinopomoika/kinopom/project.db',
            'HOST': 'localhost',
            'USER': '',
            'PASSWORD': '',
            'PORT': ''
        }
}

just tried syncdb:

17:32 ~/kinopomoika (master)$ python manage.py syncdb                                                                                                                  
Syncing...
Creating tables ...
Creating table django_summernote_attachment
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > djangocms_admin_style
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.admin
 > django.contrib.sites
 > django.contrib.sitemaps
 > django.contrib.staticfiles
 > django.contrib.messages
 > mptt
 > south
 > sekizai
 > django_summernote
 > app_accounts
 > app_video

Not synced (use migrations):
 - djangocms_text_ckeditor
 - cms
 - menus
 - djangocms_style
 - djangocms_column
 - djangocms_file
 - djangocms_flash
 - djangocms_googlemap
 - djangocms_inherit
 - djangocms_link
 - djangocms_picture
 - djangocms_teaser
 - djangocms_video
 - reversion
 - kinopom
 - app_comments
 - app_menu
(use ./manage.py migrate to migrate these)
17:35 ~/kinopomoika (master)$ python manage.py migrate                                                                                                                 
Running migrations for djangocms_text_ckeditor:
- Nothing to migrate.
 - Loading initial data for djangocms_text_ckeditor.
Installed 0 object(s) from 0 fixture(s)
Running migrations for cms:
- Nothing to migrate.
 - Loading initial data for cms.
Installed 0 object(s) from 0 fixture(s)
Running migrations for menus:
- Nothing to migrate.
 - Loading initial data for menus.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_style:
- Nothing to migrate.
 - Loading initial data for djangocms_style.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_column:
- Nothing to migrate.
 - Loading initial data for djangocms_column.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_file:
- Nothing to migrate.
 - Loading initial data for djangocms_file.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_flash:
- Nothing to migrate.
 - Loading initial data for djangocms_flash.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_googlemap:
- Nothing to migrate.
 - Loading initial data for djangocms_googlemap.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_inherit:
- Nothing to migrate.
 - Loading initial data for djangocms_inherit.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_link:
- Nothing to migrate.
 - Loading initial data for djangocms_link.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_picture:
- Nothing to migrate.
 - Loading initial data for djangocms_picture.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_teaser:
- Nothing to migrate.
 - Loading initial data for djangocms_teaser.
Installed 0 object(s) from 0 fixture(s)
Running migrations for djangocms_video:
- Nothing to migrate.
 - Loading initial data for djangocms_video.
Installed 0 object(s) from 0 fixture(s)
Running migrations for reversion:
- Nothing to migrate.
 - Loading initial data for reversion.
Installed 0 object(s) from 0 fixture(s)
Running migrations for kinopom:
- Nothing to migrate.
 - Loading initial data for kinopom.
Installed 0 object(s) from 0 fixture(s)
Running migrations for app_comments:
- Nothing to migrate.
 - Loading initial data for app_comments.
Installed 0 object(s) from 0 fixture(s)
Running migrations for app_menu:
- Nothing to migrate.
 - Loading initial data for app_menu.
Installed 0 object(s) from 0 fixture(s)
17:35 ~/kinopomoika (master)$

but it does not solve the problem

Did you reload the web app (from the "Web" tab) after you set the absolute path in the settings.py?

yes yes

OK. Can I take a look at your code? (I can see it from our side, but we never look without permission.)

Yes. please see

OK, so you have the database file set to /home/kinopomoika/kinopomoika/kinopom/project.db. That file is zero bytes long, so perhaps you had a different setting when you did the python manage.py syncdb? Try running it again, that should fix it.

Alternatively, I see you have a project.db inside /home/kinopomoika/kinopomoika/ -- so you could instead just move that file into the kinopom subdirectory.

thank you! the problem is solved. I'm not careful

Great, thanks for confirming!