Caught AttributeError while rendering: 'Template' object has no attribute 'origin' #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes TemplateDebugPanel iterating over an unknown template without origin or name
Some applications render Templates that are dynamically generated using
Template
object, those don't have origin or name, so I guess the best is to skip them as they are usually used for small things. Somebody reported this here:http://code.google.com/p/django-endless-pagination/issues/detail?id=7#c2
It breaks with current django-uni-form master too.
I was willing to add a test for this bug, but the middleware is broken in current master branch (test_middleware fails) and it turned out to be a nightmare. I think testing should be more isolated. Panels get loaded with the information of the project within you run tests. Maybe having test_settings and a small test_project would help.
Regards,
Miguel