Opened 5 years ago

Closed 5 years ago

#31290 closed Uncategorized (invalid)

Unable to runserver - python manage.py runserver

Reported by: batistalucash Owned by: nobody
Component: Uncategorized Version: 3.0
Severity: Normal Keywords:
Cc: batistalucas@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When I run server, I get the following error:

raise TypeError('view must be a callable or a list/tuple in the case of include().')
TypeError: view must be a callable or a list/tuple in the case of include().

I have tried to add include to from django.urls import path, but it did not work. Please help.

More information below:

urls.py file

from django.contrib import admin
from django.urls import path

urlpatterns = [
    path('admin', admin.site.urls),
    path('index', 'store.views.index', name='index'),
]

(book1) C:\Users\LucasBatistadosSanto\Desktop\Python\bookstore>py -m django --version
3.0.3

(book1) C:\Users\LucasBatistadosSanto\Desktop\Python\bookstore>python -V
Python 3.7.3

Change History (1)

comment:1 by Carlton Gibson, 5 years ago

Resolution: invalid
Status: newclosed

This isn't a support channel. See TicketClosingReasons/UseSupportChannels.

Passing a string as the view to url() was deprecated in Django 1.8 https://docs.djangoproject.com/en/3.0/releases/1.8/#passing-a-string-as-view-to-url.

Review the django.urls docs: https://docs.djangoproject.com/en/3.0/ref/urls/

Note: See TracTickets for help on using tickets.
Back to Top