django-ninja-extra icon indicating copy to clipboard operation
django-ninja-extra copied to clipboard

How to disable pagination for ModelControllerBase with ModelConfig

Open Bouni opened this issue 4 months ago • 3 comments

I have this controller and do not want pagination on it

@api_controller("/tools")
class ToolModelController(ModelControllerBase):
    model_config = ModelConfig(model=Tool, schema_config=ModelSchemaConfig(depth=1))

How can I achive this?

Bouni avatar Dec 01 '25 12:12 Bouni

@Bouni

@api_controller("/tools")
class ToolModelController(ModelControllerBase):
    model_config = ModelConfig(model=Tool, schema_config=ModelSchemaConfig(depth=1), pagination=None)

eadwinCode avatar Dec 09 '25 11:12 eadwinCode

Will update the documents for that

eadwinCode avatar Dec 09 '25 12:12 eadwinCode

Nice will try when I'm back in the office. Thank you for the quick help!

Bouni avatar Dec 09 '25 12:12 Bouni