Ticket #10472: thread-safe-urlresolvers.diff
File thread-safe-urlresolvers.diff, 1.7 KB (added by , 16 years ago) |
---|
-
django/core/urlresolvers.py
154 154 155 155 def _get_reverse_dict(self): 156 156 if not self._reverse_dict: 157 _reverse_dict = {} 157 158 for pattern in reversed(self.url_patterns): 158 159 p_pattern = pattern.regex.pattern 159 160 if p_pattern.startswith('^'): … … 165 166 new_matches = [] 166 167 for piece, p_args in parent: 167 168 new_matches.extend([(piece + suffix, p_args + args) for (suffix, args) in matches]) 168 self._reverse_dict.appendlist(name, (new_matches, p_pattern + pat))169 _reverse_dict.appendlist(name, (new_matches, p_pattern + pat)) 169 170 else: 170 171 bits = normalize(p_pattern) 171 self._reverse_dict.appendlist(pattern.callback, (bits, p_pattern)) 172 self._reverse_dict.appendlist(pattern.name, (bits, p_pattern)) 172 _reverse_dict.appendlist(pattern.callback, (bits, p_pattern)) 173 _reverse_dict.appendlist(pattern.name, (bits, p_pattern)) 174 self._reverse_dict = _reverse_dict 173 175 return self._reverse_dict 174 176 reverse_dict = property(_get_reverse_dict) 175 177 -
AUTHORS
449 449 Mykola Zamkovoi <nickzam@gmail.com> 450 450 Jarek Zgoda <jarek.zgoda@gmail.com> 451 451 Cheng Zhang 452 Travis Terry <tdterry7@gmail.com> 452 453 453 454 A big THANK YOU goes to: 454 455