diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index 5e565f7..a1bd406 100644
a
|
b
|
class RegexURLPattern(object):
|
156 | 156 | |
157 | 157 | return ResolverMatch(self.callback, args, kwargs, self.name) |
158 | 158 | |
| 159 | def _get_possibilities(self): |
| 160 | """ |
| 161 | Returns a list of possible regexp matches for this pattern. |
| 162 | |
| 163 | This method is intended as a stopgap until the URL resolution system is |
| 164 | completely revamped. Hence it is marked private, even though it will be |
| 165 | used outside this class. |
| 166 | """ |
| 167 | return normalize(self.regex.pattern) |
| 168 | |
159 | 169 | def _get_callback(self): |
160 | 170 | if self._callback is not None: |
161 | 171 | return self._callback |
… |
… |
class RegexURLResolver(object):
|
215 | 225 | for app_name, namespace_list in pattern.app_dict.items(): |
216 | 226 | apps.setdefault(app_name, []).extend(namespace_list) |
217 | 227 | else: |
218 | | bits = normalize(p_pattern) |
| 228 | if hasattr(pattern, '_get_possibilities'): |
| 229 | bits = pattern._get_possibilities() |
| 230 | else: |
| 231 | bits = normalize(p_pattern) |
219 | 232 | lookups.appendlist(pattern.callback, (bits, p_pattern)) |
220 | 233 | if pattern.name is not None: |
221 | 234 | lookups.appendlist(pattern.name, (bits, p_pattern)) |