I am a new Django user and am setting up my first site on a local MAMP server. Django is running, but when I run `python manage.py makemigrations` I get the following error:
------------------------------------------- Traceback (most recent call last): File "/Applications/MAMP/htdocs/flashcards/manage.py", line 22, in <module> main() File "/Applications/MAMP/htdocs/flashcards/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/core/management/base.py", line 427, in run_from_argv connections.close_all() File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/db/utils.py", line 212, in close_all for alias in self: File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/utils/connection.py", line 73, in __iter__ return iter(self.settings) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/utils/functional.py", line 49, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/utils/connection.py", line 45, in settings self._settings = self.configure_settings(self._settings) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/db/utils.py", line 148, in configure_settings databases = super().configure_settings(databases) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/utils/connection.py", line 50, in configure_settings settings = getattr(django_settings, self.settings_name) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/conf/__init__.py", line 87, in __getattr__ self._setup(name) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/conf/__init__.py", line 74, in _setup self._wrapped = Settings(settings_module) File "/Applications/MAMP/htdocs/flashcards/flenv/lib/python3.9/site-packages/django/conf/__init__.py", line 183, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/opt/homebrew/Cellar/python@3.9/3.9.18_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named 'mysite' ------------------------------ This is my wsgi.py file: """ WSGI config for flashcards project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/ """ import os import sys from django.core.wsgi import get_wsgi_application path = '/Applications/MAMP/htdocs/flashcards/flashcards' if path not in sys.path: sys.path.insert(0,path) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(BASE_DIR) os.environ['DJANGO_SETTINGS_MODULE'] = 'flashcards.settings' os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'flashcards.settings') application = get_wsgi_application() I have searched my entire hard drive for a related config file referencing "mysite" and cannot find one. I'm unable to find anything online that points to where the error is coming from. The words, "mysite" do not exist on my hard drive except in some very old and archived php files in a completely different directory area. Does anyone have any ideas? Thanks so much, Sherrie -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ec322336-f97e-4ba6-a4a6-823ad576f989n%40googlegroups.com.