Skip to content

Commit 90000b6

Browse files
committed
Formatting
1 parent 24aa6f5 commit 90000b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

en/extend_your_application/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ We will start with adding a link inside `blog/templates/blog/post_list.html` fil
3939

4040
{% raw %}Time to explain the mysterious `{% url 'post_detail' pk=post.pk %}`. As you might suspect, the `{% %}` notation means that we are using Django template tags. This time we will use one that will create a URL for us!{% endraw %}
4141

42-
The `post_detail` part means that Django will be expecting a URL in `blog/urls.py` with name=post_detail
42+
The `post_detail` part means that Django will be expecting a URL in `blog/urls.py` with `name=post_detail`.
4343

4444
And how about `pk=post.pk`? `pk` is short for primary key, which is a unique identifier for each record in a database. Every Django model has a field which serves as its primary key, and whatever other name it has, it can also be referred to as "pk". Because we didn't specify a primary key in our `Post` model, Django creates one for us (by default, a field named "id" holding a number that increases for each record, i.e. 1, 2, 3) and adds it as a field to each of our posts. We access the primary key by writing `post.pk`, the same way we access other fields (`title`, `author`, etc.) in our `Post` object!
4545

0 commit comments

Comments
 (0)