CurrentSiteManager needs models.Manager() for admin to function.
|Reported by:||dean@…||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using the CurrentSiteManager in your objects you must include the models.Manager() for the admin interface to work. In the docs on the "sites" framework under The CurrentSiteManager the Photo object example is given. In this example the CurrentSiteManager and the models.Manager() are both explicitly defined so this works. If you do not define the models.Manager() when you use the CurrentSiteManager the admin interface will fail with a ChangeManipulator error (contrib/admin/views/main.py line 317). Nowhere in the docs does it state that you must define both. I think that this is an error since the models.Manager() should still be automatically created even if you use a CurrentSiteManager. A workaround is to define both as shown in the example.
Change History (5)
comment:4 Changed 8 years ago by Lakin Wecker <lakin@…>
- Resolution fixed deleted
- Status changed from closed to reopened