So, I want to make some changes in the database using python outsite Django, but I am unable to.
I'm trying to import the model from models.py but i'm unable to.
from models import NumberInfo
There is this error:
Traceback (most recent call last):
File "/home/sagan/p/matematika/matematika/mnumbers/prime_insert.py", line 1, in <module>
from models import NumberInfo
File "/home/sagan/p/matematika/matematika/mnumbers/models.py", line 5, in <module>
class NumberInfo(models.Model):
File "/home/sagan/.local/lib/python3.9/site-packages/django/db/models/base.py", line 108, in __new__
app_config = apps.get_containing_app_config(module)
File "/home/sagan/.local/lib/python3.9/site-packages/django/apps/registry.py", line 253, in get_containing_app_config
self.check_apps_ready()
File "/home/sagan/.local/lib/python3.9/site-packages/django/apps/registry.py", line 135, in check_apps_ready
settings.INSTALLED_APPS
File "/home/sagan/.local/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__
self._setup(name)
File "/home/sagan/.local/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/home/sagan/.local/lib/python3.9/site-packages/django/conf/__init__.py", line 170, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'matematika'```