Skip to content

Commit 4f24800

Browse files
correct expected code regarding include function
The example code of what to expect in your mysite/urls.py file erroneously included the include import, This change fixes that and updates the reference below to explicitly mention which line to add the include to.
1 parent ad78d77 commit 4f24800

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

en/django_urls/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Let's open up the `mysite/urls.py` file in your code editor of choice and see wh
2121
2222
[...]
2323
"""
24-
from django.urls import path, include
2524
from django.contrib import admin
25+
from django.urls import path
2626

2727
urlpatterns = [
2828
path('admin/', admin.site.urls),
@@ -49,7 +49,7 @@ Time to create our first URL! We want 'http://127.0.0.1:8000/' to be the home pa
4949

5050
We also want to keep the `mysite/urls.py` file clean, so we will import URLs from our `blog` application to the main `mysite/urls.py` file.
5151

52-
Go ahead, add a line that will import `blog.urls`. You will also need to change the first line because we are using the `include` function here, so you will need to add that import to the line.
52+
Go ahead, add a line that will import `blog.urls`. You will also need to change the `from django.urls…` line because we are using the `include` function here, so you will need to add that import to the line.
5353

5454
Your `mysite/urls.py` file should now look like this:
5555

0 commit comments

Comments
 (0)