Error when loading templates from Python eggs
|Reported by:||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The template loader for using templates included in Python eggs (
django.template.loaders.eggs.load_template_source) has a bug that raises an exception when a template, thus the loader never finds an existent template and always raises the
The bug was introduced in changeset  (see the diff), when the decode function is called on the tuple that should be returned, not on the template string that is returned by the resource_string function.
If the template exists in a egg, instead of return it, an exception is raised with the following message:
'tuple' object has no attribute 'decode'
I attach here a patch that calls the function correctly.