def get_forum(self):
        """ Returns the considered forum. """
        pk = self.kwargs.get(self.forum_pk_url_kwarg, None)
        if not pk:  # pragma: no cover
            # This should never happen
            return
        if not hasattr(self, '_forum'):
            self._forum = get_object_or_404(Forum, pk=pk)
        return self._forum
def get_forum ( self ) : pk = self . kwargs . get ( self . forum_pk_url_kwarg , None ) if not pk : return if not hasattr ( self , '_forum' ) : self . _forum = get_object_or_404 ( Forum , pk = pk ) return self . _forum
Returns the considered forum.