Skip to content

Commit 810f4d5

Browse files
authored
Merge pull request #187 from 07SUJITH/fix-140-login-required-import
Fix Missing Import for @login_required Decorator (#140)
2 parents 680c004 + b7c1b51 commit 810f4d5

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

en/homework_create_more_models/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ You'll need to import `Comment` at the top of the file:
300300

301301
```python
302302
from .models import Post, Comment
303+
from django.contrib.auth.decorators import login_required
303304
```
304305

305306
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.

es/homework_create_more_models/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ Necesitas importar `Comment` al comienzo del archivo:
293293

294294
```python
295295
from .models import Post, Comment
296+
from django.contrib.auth.decorators import login_required
296297
```
297298

298299
¡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.

fa/homework_create_more_models/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def comment_remove(request, pk):
292292

293293
```python
294294
from .models import Post, Comment
295+
from django.contrib.auth.decorators import login_required
295296
```
296297

297298
همه چیز کار می‌کند! فقط یک تغییر کوچک باقی مانده که انجام بدهیم. در صفحه لیست پست‌ها، ما تعداد همه کامنت‌هایی که هر پست دریافت کرده را می‌بینیم. بیایید آن را به تعداد کامنت‌های *تأییدشده* تغییر بدهیم.

ja/homework_create_more_models/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def comment_remove(request, pk):
292292

293293
```python
294294
from .models import Post, Comment
295+
from django.contrib.auth.decorators import login_required
295296
```
296297

297298
すべて動作します!私たちにできる小さな微調整があります。投稿一覧ページ(の投稿の下)には、現在、投稿が受け取ったすべてのコメントの数が表示されます。*承認された* コメントの数を表示するように変更しましょう。

ko/homework_create_more_models/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ def comment_remove(request, pk):
300300

301301
```python
302302
from .models import Post, Comment
303+
from django.contrib.auth.decorators import login_required
303304
```
304305

305306
모든 것이 잘 작동되네요! 하지만 마지막 한 가지가 남았어요. 현재 post_list 페이지에서는 등록된 모든 댓글의 개수가 보이는데요. *승인된* 댓글의 개수만 보이게 수정해봅시다.

0 commit comments

Comments
 (0)