(relativeName string)
| 304 | } |
| 305 | |
| 306 | func (s *DjangoEngine) fromCache(relativeName string) *pongo2.Template { |
| 307 | if s.reload { |
| 308 | s.rmu.RLock() |
| 309 | defer s.rmu.RUnlock() |
| 310 | } |
| 311 | |
| 312 | if tmpl, ok := s.templateCache[relativeName]; ok { |
| 313 | return tmpl |
| 314 | } |
| 315 | return nil |
| 316 | } |
| 317 | |
| 318 | // ExecuteWriter executes a templates and write its results to the w writer |
| 319 | // layout here is useless. |