Django cms install bootstrap 5 error
After installing bootstrap 5 on django cms, the required message appeared.
DoesNotExist at /admin
Site matching query does not exist.
Request Method: GET
Request URL: http://192.168.4.5/admin
Django Version: 3.1.14
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location: /var/www/dvtkenv/lib/python3.9/site-packages/django/db/models/query.py, line 429, in get
Python Executable: /var/www/dvtkenv/bin/python3
Python Version: 3.9.2
Python Path:
['/var/www/dvtk',
'/var/www/dvtkenv/bin',
'/usr/lib/python39.zip',
'/usr/lib/python3.9',
'/usr/lib/python3.9/lib-dynload',
'/var/www/dvtkenv/lib/python3.9/site-packages']
Server time: Thu, 30 Jun 2022 16:37:34 +1000
Help me fix it please.
TRACEBACK:
Environment:
Request Method: GET
Request URL: http://192.168.4.5/admin
Django Version: 3.1.14
Python Version: 3.9.2
Installed Applications:
['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',
'cms',
'menus',
'sekizai',
'treebeard',
'djangocms_text_ckeditor',
'filer',
'easy_thumbnails',
'djangocms_bootstrap5',
'djangocms_bootstrap5.contrib.bootstrap5_alerts',
'djangocms_bootstrap5.contrib.bootstrap5_badge',
'djangocms_bootstrap5.contrib.bootstrap5_card',
'djangocms_bootstrap5.contrib.bootstrap5_carousel',
'djangocms_bootstrap5.contrib.bootstrap5_collapse',
'djangocms_bootstrap5.contrib.bootstrap5_content',
'djangocms_bootstrap5.contrib.bootstrap5_grid',
'djangocms_bootstrap5.contrib.bootstrap5_jumbotron',
'djangocms_bootstrap5.contrib.bootstrap5_link',
'djangocms_bootstrap5.contrib.bootstrap5_listgroup',
'djangocms_bootstrap5.contrib.bootstrap5_media',
'djangocms_bootstrap5.contrib.bootstrap5_picture',
'djangocms_bootstrap5.contrib.bootstrap5_tabs',
'djangocms_bootstrap5.contrib.bootstrap5_utilities',
'djangocms_file',
'djangocms_icon',
'djangocms_link',
'djangocms_picture',
'djangocms_style',
'djangocms_googlemap',
'djangocms_video',
'dvtk']
Installed Middleware:
['cms.middleware.utils.ApphookReloadMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware']
Traceback (most recent call last):
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/utils/deprecation.py", line 113, in __call__
response = self.process_request(request)
File "/var/www/dvtkenv/lib/python3.9/site-packages/cms/middleware/toolbar.py", line 99, in process_request
request.toolbar = CMSToolbar(request)
File "/var/www/dvtkenv/lib/python3.9/site-packages/cms/toolbar/toolbar.py", line 168, in __init__
toolbar = toolbars[key](
File "/var/www/dvtkenv/lib/python3.9/site-packages/cms/toolbar_base.py", line 16, in __init__
self.current_site = get_current_site()
File "/var/www/dvtkenv/lib/python3.9/site-packages/cms/utils/__init__.py", line 15, in get_current_site
return Site.objects.get_current()
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/contrib/sites/models.py", line 58, in get_current
return self._get_site_by_id(site_id)
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/contrib/sites/models.py", line 30, in _get_site_by_id
site = self.get(pk=site_id)
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/var/www/dvtkenv/lib/python3.9/site-packages/django/db/models/query.py", line 429, in get
raise self.model.DoesNotExist(
Exception Type: DoesNotExist at /admin
Exception Value: Site matching query does not exist.