After installing fobi from https://pypi.org/project/django-fobi/ and try localhost:8000/admin getting error

I followed the https://pypi.org/project/django-fobi/ instalation instructions, and after pip install django-fobi into my venv I set my settings.py as follows

`

INSTALLED_APPS = [
    'dose.apps.DoseConfig',
    'django.contrib.admin',
    'django.contrib.contenttypes',
     # Used by fobi
    'django.contrib.auth',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework',
    'aiengine',
    'fobi',
    # `django-fobi` themes
    'fobi.contrib.themes.bootstrap3', # Bootstrap 3 theme
    'fobi.contrib.themes.foundation5', # Foundation 5 theme
    'fobi.contrib.themes.simple', # Simple theme
    # `django-fobi` form elements - fields
    'fobi.contrib.plugins.form_elements.fields.boolean',
    'fobi.contrib.plugins.form_elements.fields.checkbox_select_multiple',
    'fobi.contrib.plugins.form_elements.fields.date',
    'fobi.contrib.plugins.form_elements.fields.date_drop_down',
    'fobi.contrib.plugins.form_elements.fields.datetime',
    'fobi.contrib.plugins.form_elements.fields.decimal',
    'fobi.contrib.plugins.form_elements.fields.email',
    'fobi.contrib.plugins.form_elements.fields.file',
    'fobi.contrib.plugins.form_elements.fields.float',
    'fobi.contrib.plugins.form_elements.fields.hidden',
    'fobi.contrib.plugins.form_elements.fields.input',
    'fobi.contrib.plugins.form_elements.fields.integer',
    'fobi.contrib.plugins.form_elements.fields.ip_address',
    'fobi.contrib.plugins.form_elements.fields.null_boolean',
    'fobi.contrib.plugins.form_elements.fields.password',
    'fobi.contrib.plugins.form_elements.fields.radio',
    'fobi.contrib.plugins.form_elements.fields.regex',
    'fobi.contrib.plugins.form_elements.fields.select',
    'fobi.contrib.plugins.form_elements.fields.select_model_object',
    'fobi.contrib.plugins.form_elements.fields.select_multiple',
    'fobi.contrib.plugins.form_elements.fields.select_multiple_model_objects',
    'fobi.contrib.plugins.form_elements.fields.slug',
    'fobi.contrib.plugins.form_elements.fields.text',
    'fobi.contrib.plugins.form_elements.fields.textarea',
    'fobi.contrib.plugins.form_elements.fields.time',
    'fobi.contrib.plugins.form_elements.fields.url',
    # `django-fobi` form elements - content elements
    'fobi.contrib.plugins.form_elements.test.dummy',
    'easy_thumbnails', # Required by `content_image` plugin
    'fobi.contrib.plugins.form_elements.content.content_image',
    'fobi.contrib.plugins.form_elements.content.content_image_url',
    'fobi.contrib.plugins.form_elements.content.content_text',
    'fobi.contrib.plugins.form_elements.content.content_video',

    # `django-fobi` form handlers
    'fobi.contrib.plugins.form_handlers.db_store',
    'fobi.contrib.plugins.form_handlers.http_repost',
    'fobi.contrib.plugins.form_handlers.mail',
    'fobi.contrib.plugins.form_handlers.mail_sender',

]

and I edited mysite.urls.py

`

urlpatterns = [
    path('instruction/', InstructionListView.as_view()),
    path('dose/', include('dose.urls')),
    path('admin/', admin.site.urls),
    # View URLs
    re_path(r'^fobi/', include('fobi.urls.view')),

    # Edit URLs
    re_path(r'^fobi/', include('fobi.urls.edit')),
    # DB Store plugin URLs
    re_path(r'^fobi/plugins/form-handlers/db-store/',
        include('fobi.contrib.plugins.form_handlers.db_store.urls')),
    

` I get this error on runserver it was all working before installing fobi

`

  File "C:\Users\viter\base\dosehomev3\dosehome\venv\lib\site-packages\django\contrib\sites\models.py", line 39, in _get_site_by_request
    SITE_CACHE[host] = self.get(domain__iexact=host)
  File "C:\Users\viter\base\dosehomev3\dosehome\venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "C:\Users\viter\base\dosehomev3\dosehome\venv\lib\site-packages\django\db\models\query.py", 
line 650, in get
    raise self.model.DoesNotExist(
django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.

`

I expected to get a login window. It was working before installing fobi

but instead got this error screen I could not find any deviation from the fobi documentation.

DoesNotExist at /admin/login/ Site matching query does not exist. Request Method: GET Request URL: http://localhost:8000/admin/login/?next=/admin/ Django Version: 4.1 Exception Type: DoesNotExist Exception Value: Site matching query does not exist. Exception Location: C:\Users\viter\base\dosehomev3\dosehome\venv\lib\site-packages\django\db\models\query.py, line 650, in get Raised during: django.contrib.admin.sites.login Python Executable: C:\Users\viter\base\dosehomev3\dosehome\venv\Scripts\python.exe Python Version: 3.10.6 Python Path: ['C:\\Users\\viter\\base\\dosehomev3\\dosehome', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\\python310.zip', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\\DLLs', 'C:\\Program ' 'Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\\lib', 'C:\\Users\\viter\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0', 'C:\\Users\\viter\\base\\dosehomev3\\dosehome\\venv', 'C:\\Users\\viter\\base\\dosehomev3\\dosehome\\venv\\lib\\site-packages'] Server time: Fri, 09 Sep 2022 09:39:48 +0000

Back to Top