1đź‘Ť
I didn’t tested this yet, but probably the problem is, that you’ve overridden the default manager.
From the Django docs: Default managers
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_queryset() results in an inability to retrieve objects you’d like to work with.
So using your “UnrestrictedManager” first and your Custom Manager as second should do the trick.
1đź‘Ť
I solved this issue by creating a proxy model with a simple manager.
class UnrestrictedMyModel(MyModel):
objects = models.Manager()
class Meta:
proxy = True
site.register(UnrestrictedMyModel, MyModelAdmin)
But I am still looking for a better solution.
- [Django]-How to add placeholder for search field in admin.py
- [Django]-Django – inline formset validation
1đź‘Ť
Check if you have all list_display
as list_editable
.
You can:
- make one of
list_editable
field to be a non-editable link by adding it tolist_display_links
- add
id
intolist_display
- [Django]-Appengine ACL with Google Authentication
- [Django]-Directory '.' is not installable. File 'setup.py' not found. error
- [Django]-Why won't this override of the Model.save() function in Django work?
- [Django]-Parameters for class CharField()
- [Django]-Django – inline formset validation