error `django.core.exceptions.ImproperlyConfigured

Hello, when trying to connect to the database via FastApi (or to be more precise, read the table name and return it to the user), an error occurred django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings, this is the first time I see such an error, who knows, can help

Welcome @SalahLinux005 !

Side Note: Please do not create a post with the full description in the title. The title should be a brief summary of the issue that you’re seeking help with. (I have taken the liberty of correcting this for you here.)

Please describe how you’re running your project and provide the details of exactly what you’re trying to do here.