Boa tarde a todos e todas! Por gentileza: tentei executar o seguinte código no Pycharm e foi apresentado alguns vários erros. Poderiam me ajudar, por favor? Muito obrigado
Código que executei:
from django.contrib import admin
from django.urls import path, include
Erro que foi gerado:
C:\Users\Marta\showsenv\Scripts\python.exe C:/Users/Marta/PycharmProjects/igtiflixweb1/igtiflixweb1/urls.py
Traceback (most recent call last):
File "C:\Users\Marta\PycharmProjects\igtiflixweb1\igtiflixweb1\urls.py", line 5, in <module>
path('admin/', admin.site.urls),
File "C:\Users\Marta\showsenv\lib\site-packages\django\utils\functional.py", line 246, in inner
self._setup()
File "C:\Users\Marta\showsenv\lib\site-packages\django\contrib\admin\sites.py", line 561, in _setup
AdminSiteClass = import_string(apps.get_app_config('admin').default_site)
File "C:\Users\Marta\showsenv\lib\site-packages\django\apps\registry.py", line 154, in get_app_config
self.check_apps_ready()
File "C:\Users\Marta\showsenv\lib\site-packages\django\apps\registry.py", line 135, in check_apps_ready
settings.INSTALLED_APPS
File "C:\Users\Marta\showsenv\lib\site-packages\django\conf\__init__.py", line 82, in __getattr__
self._setup(name)
File "C:\Users\Marta\showsenv\lib\site-packages\django\conf\__init__.py", line 63, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.