1

How to unregister django-evolution from admin?

admin.site.unregister( something )
Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
frnhr
  • 12,354
  • 9
  • 63
  • 90

1 Answers1

1

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!

Bernhard Vallant
  • 49,468
  • 20
  • 120
  • 148