Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Coverage differs depending on location of name-clashed template #61

Open
jambonrose opened this issue Sep 5, 2018 · 0 comments
Open
Labels

Comments

@jambonrose
Copy link
Collaborator

This is a fairly odd setup, and therefore probably not high-priority.

If a Django app has a template that shares the same namespace as a core template (say, Django Admin's registration/password_reset_done.html), then it is only used if the app appears before the Admin in the INSTALLED_APPS setting. Coverage for the local template should be 0% if the app is listed below the Admin, as it is not used by the project.

Coverage for such a template is correctly reported if such a template exists in an app template directory (e.g. app_name/templates/registration/password_reset_done.html) but not if it exists in directory specified in the TEMPLATES[0][DIRS] setting (e.g. project_templates/registration/password_reset_done.html).

An immediate workaround is to make sure you don't have a namespace clash in your templates. 😄

This may be a wont-fix, as we may not have the ability to tell these templates apart.

For more information and example output, please refer to my post here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant