[Answer]-Django customize model.Manager so it accepts arguments

1👍

You need to add a __call__ method to your manager which accepts this argument and returns a different query set then the default manager (or another manager based on the argument).

You’re better off writing custom query set methods and returning them. Querysets are designed to be chained, so you shouldn’t have to continue to pass the same argument.

If you add your specific use case, I can show you how to construct it using a custom Manager and/or QuerySet classes.

Leave a comment