In this part of Writing your first Django app, part 2 we have to include the polls app in included app so I put that in
INSTALLED_APPS = [
'polls.apps.PollsConfig'
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
but when I makemigrations I get an error as follows:
Traceback (most recent call last):
File “C:\param\ven1\sports_fest\manage.py”, line 22, in
main()
File “C:\param\ven1\sports_fest\manage.py”, line 18, in main
execute_from_command_line(sys.argv)
File “C:\param\ven1\Lib\site-packages\django\core\management_init_.py”, line 442, in execute_from_command_line
utility.execute()
File “C:\param\ven1\Lib\site-packages\django\core\management_init_.py”, line 416, in execute
django.setup()
File “C:\param\ven1\Lib\site-packages\django_init_.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “C:\param\ven1\Lib\site-packages\django\apps\registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\param\ven1\Lib\site-packages\django\apps\config.py”, line 193, in create
import_module(entry)
File “C:\Users\rames\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1126, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1126, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1135, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘polls.apps.PollsConfigdjango’; ‘polls.apps’ is not a package
I am unable to understand why is it showing ModuleNotFoundError when I have updated the entry correctly in settings.py. Please help me with resolving this.