Returns the unique hash key for this template name.
(self, name, filename=None)
| 164 | """ |
| 165 | |
| 166 | def get_cache_key(self, name, filename=None): |
| 167 | """Returns the unique hash key for this template name.""" |
| 168 | hash = sha1(name.encode('utf-8')) |
| 169 | if filename is not None: |
| 170 | filename = '|' + filename |
| 171 | if isinstance(filename, text_type): |
| 172 | filename = filename.encode('utf-8') |
| 173 | hash.update(filename) |
| 174 | return hash.hexdigest() |
| 175 | |
| 176 | def get_source_checksum(self, source): |
| 177 | """Returns a checksum for the source.""" |
no test coverage detected