The Django contrib.auth.hashers
module already supports plain, unsalted MD5 passwords:
# Ancient versions of Django created plain MD5 passwords and accepted
# MD5 passwords with an empty salt.
if ((len(encoded) == 32 and '$' not in encoded) or
(len(encoded) == 37 and encoded.startswith('md5$$'))):
algorithm = 'unsalted_md5'
So, if your hashes are length 32 (a hex representation of the hash), and contains no $
character (which would indicate there is a hash signature prefix), or the hash is 37 characters long and starts with md5$$
then your hashes are already supported.
Even better: any user successfully authenticating will have their password hash automatically updated to the current preferred scheme. Your users will themselves migrate your database.