#34725 closed Bug (needsinfo)

get_containing_app_config does not find an object in a module imported with an absolute path from project root

Reported by: piscvau Owned by: nobody
Component: Uncategorized Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

in a test file where I need to import a Model module with an absolute path of type :
<base_dir>.<app_dir>.<models>.<module>

the get_containing_appconfig(self, object_name) of registry does not find the app_config, because the object name does not start with the appname.
consequently, an exception is raised indicating that the model is not in an application in INSTALLED_APPS which is incorrect

Change History (1)

comment:1 by Natalia Bidart, 16 months ago

Resolution: needsinfo
Status: newclosed

Hello,

Could you please provide a sample test app that showcases the exception? We would need concrete instructions on how to reproduce the issue.

At first, with the provided details, this seems to be a configuration issue in your project, so you could also seek for help using any of the user support channels from this link.

Note: See TracTickets for help on using tickets.
Back to Top