As the comments mention, it would be good to see your full traceback as well as the error, because it's not obvious what part of your code is attempting to call a module.
The two things I can think of based on your code that might be causing your issue are (1) referring to the UserModel
directly, and (2) including a semi-colon after .save(). (Python does allow semi-colons, but you should avoid them unless they're needed for the specific purpose of separating statements - I have removed it from your code for now).
Regarding (1), you may be able to avoid the error by using get_user_model
as below:
from django.contrib.auth import get_user_model
from django.contrib.auth.hashers import make_password
def UserData(apps, schema):
UserModel = get_user_model()
UserModel(
username="username",
email_address="user@gmail.com",
is_active=1,
password=make_password("12345aA!")
).save()
If this doesn't work, please post your full traceback and more of your code.