Skip to content

Commit bcb568a

Browse files
committed
definite article for django url resolver
1 parent 4d94db1 commit bcb568a

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
@@ -87,7 +87,7 @@ urlpatterns = [
8787
]
8888
```
8989

90-
As you can see, we're now assigning a `view` called `post_list` to the root URL. This url pattern will match an empty string and Django URL resolver will ignore the domain name (i.e., http://127.0.0.1:8000/) that prefix the full url path. This pattern will tell Django that `views.post_list` is the right place to go if someone enters your website at the 'http://127.0.0.1:8000/' address.
90+
As you can see, we're now assigning a `view` called `post_list` to the root URL. This url pattern will match an empty string and the Django URL resolver will ignore the domain name (i.e., http://127.0.0.1:8000/) that prefix the full url path. This pattern will tell Django that `views.post_list` is the right place to go if someone enters your website at the 'http://127.0.0.1:8000/' address.
9191

9292
The last part, `name='post_list'`, is the name of the URL that will be used to identify the view. This can be the same as the name of the view but it can also be something completely different. We will be using the named URLs later in the project, so it is important to name each URL in the app. We should also try to keep the names of URLs unique and easy to remember.
9393

@@ -97,4 +97,4 @@ If you try to visit http://127.0.0.1:8000/ now, then you'll find some sort of 'w
9797

9898
Your console is showing an error, but don't worry – it's actually pretty useful: It's telling you that there is __no attribute 'post_list'__. That's the name of the *view* that Django is trying to find and use, but we haven't created it yet. At this stage, your `/admin/` will also not work. No worries – we will get there.
9999

100-
> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/2.0/topics/http/urls/
100+
> If you want to know more about Django URLconfs, look at the official documentation: https://docs.djangoproject.com/en/2.0/topics/http/urls/

0 commit comments

Comments
 (0)