def getall(self):
        try:
            spec = {'data': {'$exists': 1}}
            fields = {'_id': 0}
            sort = [('tid', 1)]
            cur = self.db.docs.find(spec, fields, sort=sort)
        except Exception as e:
            raise DatabaseException(e)
        return [Document(**row) for row in cur]
def deadline_for_course(cls, course_key):
        """
        Retrieve the verification deadline for a particular course.

        Arguments:
            course_key (CourseKey): The identifier for the course.

        Returns:
            datetime or None

        """
        try:
            deadline = cls.objects.get(course_key=course_key)
            return deadline.deadline
        except cls.DoesNotExist:
            return None