Alguém sabe como resolver isso pessoal? Estou com esse bug, mas aparentemente fiz as coisas tal como o professor explica. Seguem fotos e o log completo:
LOG:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 4.1
Python Version: 3.10.13
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback (most recent call last):
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\utils\module_loading.py", line 25, in import_string
module_path, class_name = dotted_path.rsplit(".", 1)
The above exception (not enough values to unpack (expected 2, got 1)) was the direct cause of the following exception:
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\core\handlers\exception.py", line 55, in inner
response = get_response(request)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\dimmy\Documents\Repos\alura_space\galeria\views.py", line 4, in index
return render(request, 'index.html')
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\loader.py", line 62, in render_to_string
return template.render(context, request)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\backends\django.py", line 62, in render
return self.template.render(context)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\base.py", line 173, in render
with context.bind_template(self):
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\context.py", line 251, in bind_template
processors = template.engine.template_context_processors + self._processors
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\utils\functional.py", line 57, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\engine.py", line 116, in template_context_processors
return tuple(import_string(path) for path in context_processors)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\template\engine.py", line 116, in <genexpr>
return tuple(import_string(path) for path in context_processors)
File "C:\Users\dimmy\anaconda3\envs\django_studies\lib\site-packages\django\utils\module_loading.py", line 27, in import_string
raise ImportError("%s doesn't look like a module path" % dotted_path) from err
Exception Type: ImportError at /
Exception Value: galeria doesn't look like a module path