Skip to content

Commit d492ec9

Browse files
committed
Merge pull request DjangoGirls#662 from agagata/codeblock
Missing python code blocks in extend_your_application chapter
2 parents b62a56e + 3b7fb4a commit d492ec9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

en/extend_your_application/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,17 @@ Ok, time to add a *view* to our `views.py` file!
9999

100100
We should open `blog/views.py` and add the following code:
101101

102-
from django.shortcuts import render, get_object_or_404
102+
```python
103+
from django.shortcuts import render, get_object_or_404
104+
```
103105

104106
Near other `from` lines. And at the end of the file we will add our *view*:
105107

106-
def post_detail(request, pk):
107-
post = get_object_or_404(Post, pk=pk)
108-
return render(request, 'blog/post_detail.html', {'post': post})
108+
```python
109+
def post_detail(request, pk):
110+
post = get_object_or_404(Post, pk=pk)
111+
return render(request, 'blog/post_detail.html', {'post': post})
112+
```
109113

110114
Yes. It is time to refresh the page: http://127.0.0.1:8000/
111115

0 commit comments

Comments
 (0)