2012-01-27 71 views
1

我无法使用django注释将注释带入我的模板。我想在shell中测试一些东西 - 即。拉入一个对象并获得一组评论 - 但我不知道该怎么做。Django在shell中的注释

有没有可以在shell中访问模型的注释?

+0

其实从未意识到 - 我只是注意到在django.contrib.comments中定义的评论模型。愚蠢的问题。 – 2012-01-27 21:05:08

回答

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

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

...