Rename the default django table.
I can't change the default table name django_sessions
Could anyone help?
Thanks for listening
init.py
from django.contrib.sessions.models import Session
Session._meta.db_table = "my_session"
File "/webapps/desk/init.py", line 1, in | from django.contrib.sessions.models import Session | File "/usr/local/lib/python3.8/site-packages/django/contrib/sessions/models.py", line 1, in | from django.contrib.sessions.base_session import ( | File "/usr/local/lib/python3.8/site-packages/django/contrib/sessions/base_session.py", line 26, in | class AbstractBaseSession(models.Model): | File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 108, in new | app_config = apps.get_containing_app_config(module) | File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 253, in get_containing_app_config | self.check_apps_ready() |
File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 136, in check_apps_ready | raise AppRegistryNotReady("Apps aren't loaded yet.") | django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.