AttributeError at /gantt/gantt/'Gantt' object has no attribute 'get'Request Method: GETRequest URL: http://localhost/gantt/gantt/Django Version: 3.1.2Exception Type: AttributeErrorException Value:'Gantt' object has no attribute 'get'

2021. 1. 16. 12:02파이썬/Django

views.py

def gantt(request) :
    return HttpResponse('Hello World')

urls.py

urlpatterns = [
    path('gantt/', views.Gantt, name='gantt'),
]

http://localhost/gantt/gantt/ 호출시 에러 발생

urls.py에서 'views.Gantt''가 오타 'views.gantt'로 변경하면 해결됨