점프 투 장고 질문 상세 서버 구동 오류

점프 투 장고 질문 상세 구현하기에서 나오는 코드들을 작성하고, 'python manage.py runserver'로 서버를 구동시키려고 하면 오류가
납니다.

pybo -> urls.py
from django.urls import path

from . import views

urlpatterns = [
path('', views.index),
]


pybo -> views.py
from django.shortcuts import render
from .models import Question

def index(request):
question_list = Question.objects.order_by('-create_date')
context = {'question_list': question_list}
return render(request, 'pybo/question_list.html', context)

def detail(request, question_id):
question = Question.objects.get(id=question_id)
context = {'question': question}
return render(request, 'pybo/question_detail.html', context)


html 부분을 여기서 입력하면 글을 등록하면 이상하게 변해서 구글 문서에 썼습니다.
https://docs.google.com/document/d/1-_FR8sRXml9Jv54KbrHnC_WN7L_9wSWiuY1Aj8Exv-4/edit?usp=sharing

이전 단계 실습은 잘 됬습니다.

오류 메세지
Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Program Files\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Program Files\Python311\Lib\threading.py", line 975, in run
self._target(self._args, self._kwargs)
File "C:\h.c website\website\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(
args, **kwargs)
File "C:\h.c website\website\Lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run self.check(display_num_errors=True)
File "C:\h.c website\website\Lib\site-packages\django\core\management\base.py", line 485, in check
all_issues = checks.run_checks(
^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\urls\resolvers.py", line 494, in check
for pattern in self.url_patterns:
^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
^^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "C:\h.c website\website\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\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 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\h.c website\config\urls.py", line 19, in
from . import views
ImportError: cannot import name 'views' from 'config' (C:\h.c website\config__init__.py)

hc 1458

M 2023년 10월 12일 7:37 오후

오류 내용을 보여주세요 - 박응용님, 2023년 10월 12일 7:32 오후 추천 , 대댓글
오류 메세지도 수정해서 포함시켰습니다. - hc님, 2023년 10월 12일 7:44 오후 추천 , 대댓글
+1 그리고 vscode로 작성했습니다. - hc님, 2023년 10월 12일 9:15 오후 추천 , 대댓글
무슨 문제 인지 알 수 있을까요? - hc님, 2023년 10월 13일 3:53 오후 추천 , 대댓글
+1 @hc님 작성하신 코드와 책에 안내되어 있는 소스코드를 비교해 보세요. - 박응용님, 2023년 10월 14일 11:23 오전 추천 , 대댓글
목록으로