0
votes
  1. (ll_env) C:\learning_log>python manage.py test Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management__init__.py", line 381, in execute_from_command_line utility.execute() File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\test.py", line 23, in run_from_argv super().run_from_argv(argv) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py", line 315, in run_from_argv parser = self.create_parser(argv[0], argv[1]) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py", line 289, in create_parser self.add_arguments(parser) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\test.py", line 44, in add_arguments test_runner_class = get_runner(settings, self.test_runner) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\test\utils.py", line 303, in get_runner test_runner_class = test_runner_class or settings.TEST_RUNNER File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 79, in getattr self._setup(name) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 66, in _setup self._wrapped = Settings(settings_module) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 157, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import
    File "", line 983, in _find_and_load
    File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\learning_log\learning_log\settings.py", line 16, in django.setup() File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django__init__.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 79, in getattr self._setup(name) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 66, in _setup self._wrapped = Settings(settings_module) File "C:\Users\Allen\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\conf__init__.py", line 176, in init raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

1
Can you share the traceback? The error may have been caused by another error in your settingsIain Shelvington
hello there ok this is my wsgi.py import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'learning_log.settings') application = get_wsgi_application()Allen Suárez
Can you share the full traceback - the errorIain Shelvington
Yes, I will once I learn how can I do that.Allen Suárez
Please provide the entire error message, as well as a minimal reproducible example.AMC

1 Answers

0
votes

Error has nothing to do with your model or admin site. You are running your Django Program with a settings file that doesn't have a SECRET_KEY