Olá pessoal, boa tarde!
Estimo que estejam tudo bem com vocês.
Por gentileza, alguém poderia me ajuda?
Na parte quando dou o comando python manage.py runserver
File "C:\Users\Alans\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\Alans\Documents\Alura\Django autenticação de formulários e alerta\projetos\alura_space\usuarios\urls.py", line 2, in <module>
from usuarios.views import login, cadastro
File "C:\Users\Alans\Documents\Alura\Django autenticação de formulários e alerta\projetos\alura_space\usuarios\views.py", line 3, in <module>
from usuarios.forms import LoginForms, CadastroForms
ImportError: cannot import name 'CadastroForms' from 'usuarios.forms' (C:\Users\Alans\Documents\Alura\Django autenticação de formulários e alerta\projetos\alura_space\usuarios\forms.py)
Apresenta esse erro!
urls.py
from django.urls import path
from usuarios.views import login, cadastro
urlpatterns = [
path('login', login, name='login'),
path('cadastro', cadastro, name='cadastro')
]
views.py
from django.shortcuts import render
from usuarios.forms import LoginForms, CadastroForms
def login(request):
form = LoginForms()
return render(request, "usuarios/login.html", {"form": form})
def cadastro(request):
form = CadastroForms()
return render(request, "usuarios/cadastro.html", {"form": form})
Obrigado!!!