Anyone help?

70 views
Skip to first unread message

It's ShAdAn

unread,
Oct 15, 2022, 5:01:26 PM10/15/22
to Django users
  Got error


/usr/bin/python3.9 /home/user/PycharmProjects/pythonProject4/mycham/abcd/models.py
Traceback (most recent call last):
  File "/home/user/PycharmProjects/pythonProject4/mycham/abcd/models.py", line 4, in <module>
    class Person(models.Model):
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 108, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 253, in get_containing_app_config
    self.check_apps_ready()
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 135, in check_apps_ready
    settings.INSTALLED_APPS
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 63, in _setup
    raise ImproperlyConfigured(
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.

Process finished with exit code 1


Sunday Ajayi

unread,
Oct 15, 2022, 5:16:34 PM10/15/22
to django...@googlegroups.com
Hi 

Can you share your settings file content or screenshot?

Regards,



--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/591dc7a3-2a13-4bc5-9ecb-b939a5688f34n%40googlegroups.com.

Thomas Lockhart

unread,
Oct 15, 2022, 7:48:23 PM10/15/22
to django...@googlegroups.com
You don’t run model files directly, but rather through manage.py which references your settings.py file.

./manage.py

hth

- Tom

It's ShAdAn

unread,
Oct 16, 2022, 6:37:40 PM10/16/22
to Django users


how i run model through manage.py

Muhammad Juwaini Abdul Rahman

unread,
Oct 16, 2022, 10:57:32 PM10/16/22
to django...@googlegroups.com
You can try ./manage.py shell

Then you can run:

from abcd.models import Person

subin

unread,
Oct 18, 2022, 1:44:00 PM10/18/22
to django...@googlegroups.com
I will continue learning more about via.gov.

subin

unread,
Oct 18, 2022, 1:50:54 PM10/18/22
to django...@googlegroups.com
Please let me know if you need to reschedule.

subin

unread,
Oct 18, 2022, 1:51:41 PM10/18/22
to django...@googlegroups.com
Thank you for your recent purchase from ! Please contact us if you have any questions or visit our website:

subin

unread,
Oct 18, 2022, 1:53:12 PM10/18/22
to django...@googlegroups.com
I will continue learning more about .

subin

unread,
Oct 18, 2022, 1:54:06 PM10/18/22
to django...@googlegroups.com
Thank you for your immediate response.

On Sat, Oct 15, 2022 at 10:01 PM It's ShAdAn <shadan...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages