Skip to content

Commit

Permalink
Merge pull request #3 from StreetVoice/fix/handle-regex-end-position-…
Browse files Browse the repository at this point in the history
…anchor-Z

修正 Django 2.2 之後 path 的尾巴會長出 `\Z` 的問題
  • Loading branch information
cha798215 authored Mar 13, 2023
2 parents 285848d + 95a3ffd commit 75d26c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion djangojs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Django.js provide better integration of javascript into Django.
'''

__version__ = '2.0.1.2'
__version__ = '2.3.0'
__description__ = "Django JS Tools"

#: Packaged jQuery version
Expand Down
2 changes: 1 addition & 1 deletion djangojs/urls_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _get_urls_for_pattern(pattern, prefix='', namespace=None):
if namespace:
pattern_name = ':'.join((namespace, pattern_name))
full_url = prefix + pattern.pattern.regex.pattern
for char in ['^', '$']:
for char in ['^', '$', '\Z']:
full_url = full_url.replace(char, '')
# remove optionnal non capturing groups
opt_grp_matches = RE_OPT_GRP.findall(full_url)
Expand Down

0 comments on commit 75d26c4

Please sign in to comment.