My questions is whether or not I can have multiple model represntations in Django. More specifically I am using a post_save signal to do something after a model has been saved. The problem is that the signal passes an instance of the saved model but that’s only the unicode representation. This is because I have overriden the unicode method. I want to keep this method for the admin panel but for other purposes I need access to full representation of the model.
So how can I pass a different representation for the model in the signal and different in the admin panel?
Django
post_savesignal carries actual instance that has been saved.See the implementation for reference.
If you’re sure it is unicode, please share django version.