Answer the question
In order to leave comments, you need to log in
Why is this kind of error thrown on the python manage.py runserver command?
TypeError: view must be a callable or a list/tuple in the case of include().
also here is the code on
urls.py
from django import urls
from django.contrib import admin
from django.urls import path, include
app_name = 'learning_logs'
urlpatterns = [
path('admin/', admin.site.urls),
path('',('learning_logs.urls')),]
from django.urls import path
from learning_logs.views import views
urlpatterns = [
path('',views.index,name = 'index'),
path('topics/',views.topics, name='topics'),
path('topics/<int:topic_id>/',views.topic,name = 'topic'),
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question