Search code examples
djangodjango-admindjango-evolution

how to remove django evolution from admin?


How to unregister django-evolution from admin?

admin.site.unregister( something )

Solution

  • Yes admin.site has also an unregister() method, you need to pass it the model class of the admin you want to unregister!

    from django_evolution.models import Version, Evolution
    admin.site.unregister(Version)
    admin.site.unregister(Evolution)
    

    Put it in any module that is loaded on startup after the evolution app, for example in admin.py of an app that comes in INSTALLED_APPS AFTER evolution!