[Fixed]-What does deconstructible do in Python?


By using Google I managed to find that it is part of Django:


As long as all of the arguments to your class’ constructor are themselves serializable, you can use the @deconstructible class decorator from django.utils.deconstruct to add the deconstruct() method


def deconstructible(*args, **kwargs):
    Class decorator that allow the decorated class to be serialized
    by the migrations subsystem.

    Accepts an optional kwarg `path` to specify the import path.

Leave a comment