1đź‘Ť
The Django docs are quite explicit on this. Especially if you’re new to the world of Django, you should be wrapping yourself up in the docs like a warm blanket. Read through them if you have time (try to make time), but if you can’t, just search Google with “django” and whatever the issue you have is. 99% of the time, the first result is a page from the Django documentation and contains exactly the info you need.
That said, the docs say on this issue:
If you use custom Manager objects, take note that the first Manager Django encounters (in the order in which they’re defined in the model) has a special status. Django interprets the first Manager defined in a class as the “default” Manager, and several parts of Django (including dumpdata) will use that Manager exclusively for that model. As a result, it’s a good idea to be careful in your choice of default manager in order to avoid a situation where overriding get_query_set() results in an inability to retrieve objects you’d like to work with. (emphasis mine)
That’s exactly what you’re experiencing. Look again at the first sentence of the quote above. Django uses the first manager it encounters as the “default” manager for various parts of its machinery, including the admin. So the solution is to simply add a non-filtered manager before your custom manager. The best way to do that is to simply use the standard manager that Django adds automatically if you don’t provide your own.
objects = models.Manager()
product_manager = ProductManager()
Done. The admin will now list all products because it will use the first, standard manager as the default.