0

I have installed django-geckoboard using easy_install django-geckoboard and i am creating a custom widget to count comment (number_widget) but is displaying import error cannot import name simplejson

I am attaching the code.

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()`
Thomas Orozco
  • 53,284
  • 11
  • 113
  • 116
Bharat Kotwani
  • 119
  • 1
  • 8

0 Answers0