code: def _first(self, **spec):
          
          for record in self._entries(spec).order_by(model.Entry.local_date,
                                                     model.Entry.id)[:1]:
              return entry.Entry(record)
          return None
docs: Get the earliest entry in this category, optionally including subcategories