I am writing a custom django model field which has serialize and unserialize operations, on unserialize, I am using the import_by_path to get the class and initialise an instance.
On the opposite, I need to serialize an instance to the database, in my case all I need to get the dot notation of the module.
What I am asking is, how I can, eg I have the datetime module
from datetime import datetime
how to output datetime
in dot notation to string "datetime.datetime"
?