You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/homework_create_more_models/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -300,6 +300,7 @@ You'll need to import `Comment` at the top of the file:
300
300
301
301
```python
302
302
from .models import Post, Comment
303
+
from django.contrib.auth.decorators import login_required
303
304
```
304
305
305
306
Everything works! There is one small tweak we can make. In our post list page -- under posts -- we currently see the number of all the comments the blog post has received. Let's change that to show the number of *approved* comments there.
Copy file name to clipboardExpand all lines: es/homework_create_more_models/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,6 +293,7 @@ Necesitas importar `Comment` al comienzo del archivo:
293
293
294
294
```python
295
295
from .models import Post, Comment
296
+
from django.contrib.auth.decorators import login_required
296
297
```
297
298
298
299
¡Todo funciona! Hay un pequeño cambio que podemos hacer. en nuestra página de lista -- debajo de posts -- actualmente vemos el número de los comentarios que el post ha recibifo. Vamos a cambiar esto para ver el número de comentarios aprobados.
from django.contrib.auth.decorators import login_required
295
296
```
296
297
297
298
همه چیز کار میکند! فقط یک تغییر کوچک باقی مانده که انجام بدهیم. در صفحه لیست پستها، ما تعداد همه کامنتهایی که هر پست دریافت کرده را میبینیم. بیایید آن را به تعداد کامنتهای *تأییدشده* تغییر بدهیم.
0 commit comments