문제

I'm having trouble pulling comments into my template using django comments. I'd like to test some things out in the shell - ie. pulling in an object and getting the set of comments for it - but I'm not sure how to do that.

Is there away to access a model's comments in the shell?

도움이 되었습니까?

해결책

python manage.py shell
from django.contrib.comments import Comment

c = Comment.objects.filter(...)

...
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top