=== modified file 'django/template/response.py'
|
|
|
54 | 54 | |
55 | 55 | return obj_dict |
56 | 56 | |
57 | | def __getattr__(self, name): |
58 | | if name in self.rendering_attrs: |
59 | | raise DiscardedAttributeError('The %s attribute was discarded ' |
60 | | 'when this %s class was pickled.' % |
61 | | (name, self.__class__.__name__)) |
62 | | return super(SimpleTemplateResponse, self).__getattr__(name) |
| 57 | def __getattribute__(self, name): |
| 58 | try: |
| 59 | return super(SimpleTemplateResponse, self).__getattribute__(name) |
| 60 | except AttributeError: |
| 61 | if name in self.rendering_attrs: |
| 62 | raise DiscardedAttributeError('The %s attribute was discarded ' |
| 63 | 'when this %s class was pickled.' % |
| 64 | (name, self.__class__.__name__)) |
| 65 | raise |
| 66 | |
| 67 | |
63 | 68 | |
64 | 69 | def resolve_template(self, template): |
65 | 70 | "Accepts a template object, path-to-template or list of paths" |