I am using this example to create a custom User model. I want to test this through django shell.
When I create a user from django shell using MyUser.objects.create(email='[email protected]', data_of_birth=datetime.date.today(), password='somepassword'), the password doesn't get hashed and is stored in the database as plaintext.
But if I create a user through django admin portal, it gets stored as a hash.
What do I need to do so that it gets stored as hash even through shell? Do I need to implement some function of my own?
Django version 1.7.3