thiagopena / djangoSIGE

Sistema Integrado de Gestão Empresarial baseado em Django
http://djangosige.com.br
MIT License
423 stars 252 forks source link

Não está encontrando os apps #126

Closed lugabrielbueno closed 2 years ago

lugabrielbueno commented 2 years ago

$ python3 manage.py migrate

Traceback (most recent call last): File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/apps/config.py", line 244, in create app_module = import_module(app_name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'base'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/gabriel-bueno/Projects/python/djangoSIGE/manage.py", line 23, in execute_from_command_line(sys.argv) File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/core/management/init.py", line 395, in execute django.setup() File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/home/gabriel-bueno/.local/lib/python3.10/site-packages/django/apps/config.py", line 246, in create raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Cannot import 'base'. Check that 'djangosige.apps.base.apps.BaseConfig.name' is correct.


Este é o primeiro dos apps instalados e ele reclama o erro acima. Alguém ja passou por isso ?

solvercpv commented 2 years ago

olá vai ter que fazer em todos as pastas dentro de djangosige/apps/ e alterar o apps.py: class BaseConfig(AppConfig): name = 'base' alterar para name = 'djangosige.apps.base'

lugabrielbueno commented 2 years ago

Correto, obrigado.