I am writing tests for a django program and I keep getting this error when I run it through the command line (Windows): django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
When I try running one of the test functions through PyCharm it says: Error running 'Unittests for test_models.UserTest': Can't get importable name for PyFile:test_models.py. Is it a python file in project?
I know the problem has something to do with configuration settings, but I don't understand how to set these up properly. I'm relatively new to PyCharm (and coding, in general) so any help would be much appreciated. Thank you.