Pycharm is used for a Django project with GoogleAppEngine. The project settings.py file is properly configured, i.e. INSTALLED_APPS and AUTHENTICATION_BACKENDS properly defined. A class UserProfile(models.Model) is defined, and not sure this is relevant.
The authentication and login work correctly with: python manage.py runserver. Running this through Pycharm I get that the user model does not exist.
in auth/backends.py it gets to the line:
user = UserModel._default_manager.get_by_natural_key(username) in the following snippet,
....user = UserModel._default_manager.get_by_natural_key(username)
and returns the exception UserModel.DoesNotExist.
When in the shell, however, this same line returns the appropriate user and the check_password returns true.
What is confusing is that it works in the shell, but not in the IDE. Are there any suggestions?