django-geckoboard を使用してインストールしeasy_install django-geckoboard
、コメント (number_widget) をカウントするカスタム ウィジェットを作成していますが、インポート エラーが表示されますcannot import name simplejson
コードを添付しています。
from datetime import date, time, datetime
from django.contrib.comments.models import Comment
from django_geckoboard.decorators import number_widget
@number_widget(format='xml')
def comment_count(request):
midnight = datatime.combine(date.today(), time.min)
return Comment.objects.filter(submit_data__get=midnight).count()`