extra_params

extra_params is used to provide extra parameters, on top of the parameters already provided by Django and the iommi path machinery:

def some_function(a, b):
    return a + b

class IommiPage(Page):
    class Meta:
        @staticmethod
        def extra_params(request, a, b):
            return dict(
                c=some_function(a, b),
            )

    content = Template('{{ params.a }} + {{ params.b }} = {{ params.c }}')

iommi_view = IommiPage().as_view()
▼ Hide result