Error Python NameError name include is not defined

0 votes

I'm currently developing a website with the framework django (I'm very beginner) but I have a problem with python : since I have created my templates, I can't run server anymore for this reason (Stacktrace points to a line in urls.py):

<stacktrace>
...
path('apppath/', include('myapp.urls')),
NameError: name 'include' is not defined

Where can I import include from?

Jul 1, 2020 in Python by kartik
• 37,520 points
9,520 views

1 answer to this question.

0 votes

Hello @kartik,

On the basis of your information provided in the question, i think you might have forget to add the following import in your urls.py file.

from django.conf.urls import include

Hope this works!!

Thank You!!

answered Jul 1, 2020 by Niroj
• 82,840 points

Related Questions In Python

0 votes
1 answer

Python argparse error "NameError: name 'file' is not defined"

The right datatype for destination in argpasrse module ...READ MORE

answered Nov 28, 2018 in Python by Omkar
• 69,220 points
13,706 views
0 votes
3 answers

Python error "NameError: name 'sr' is not defined"

NameError: name 'xx' is not defined Python knows ...READ MORE

answered Mar 19, 2020 in Python by rahul
• 360 points
42,577 views
0 votes
1 answer

Python error "Python NameError: global name 'Thread' is not defined"

There is a built-in function with the ...READ MORE

answered May 31, 2019 in Python by Riya
7,301 views
–1 vote
1 answer

Python error saying "NameError: name 'email' is not defined"

you need to define the variable email READ MORE

answered Nov 29, 2019 in Python by Casper
• 160 points
6,834 views
0 votes
1 answer

How to temporarily disable a foreign key constraint in MySQL?

Hello @kartik, To turn off foreign key constraint ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,840 points
2,449 views
0 votes
1 answer

How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,840 points
1,564 views
0 votes
1 answer

Input() error - NameError: name '…' is not defined

Hello @kartik, You should use raw_input if you are ...READ MORE

answered May 5, 2020 in Python by Niroj
• 82,840 points
23,152 views
0 votes
1 answer

Error:pip install mysql-python fails with EnvironmentError: mysql_config not found

Hello @kartik, It seems mysql_config is missing on ...READ MORE

answered May 5, 2020 in Python by Niroj
• 82,840 points
2,981 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP