[Solved] Django Models Error: Manager isn‘t accessible via UserInfo instances

Error content: manager isn’t accessible via userinfo instances

Error reason: it is because the variable name is used instead of the object name (model class) when calling the model object, for example:

user = UserInfo()
user_Li = User. Objects. Filter (uname = username), this error will be reported in this call

Solution: call the objects method with the object name

user = UserInfo()
user_li = UserInfo.objects.filter(uname=username)

Read More: