Пример #1
0
    def render(self, context):
        # resolv kwargs values
        items = self.kwargs.items()
        kwargs = dict([(key, value.resolve(context)) for key, value in items])
        kwargs.update(self.blocks)

        template = []
        if "with" in kwargs:
            template.append(kwargs["with"])

        rs = self.render_tag(context, kwargs["name"], kwargs["category"], template)
        return self.handle_result(context, kwargs, rs)
Пример #2
0
    def render(self, context):
        # resolv kwargs values
        items = self.kwargs.items()
        kwargs = dict([(key, value.resolve(context)) for key, value in items])
        kwargs.update(self.blocks)

        ctype = self.get_target_ctype_pk(context, kwargs["name"])
        qs = self.get_query_set(context, reviews.get_model(), ctype, kwargs["name"])

        template = []
        if "with" in kwargs:
            template.append(kwargs["with"])

        rs = self.render_tag(context, kwargs["name"], kwargs["category"], qs, template)
        return self.handle_result(context, kwargs, rs)