Commit 3b115ee
Konstantinos Bairaktaris
Don't do mutations to TNode during
https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/#thread-safety-considerations
Copying from the code's comments:
> `self` is not supposed to mutate between invocations of `render`
> because Django may parse the template once per thread and reuse the
> nodes between renders ("parse" = "process text into nodes").render
1 parent 03606ea commit 3b115ee
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
233 | 241 | | |
| 242 | + | |
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
| |||
0 commit comments