Skip to content

Commit

Permalink
Fix for multiple IP addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyface committed Mar 24, 2020
1 parent c157e9a commit 3e74eba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions termsandconditions/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TermsVersionConverter:
"""
Registers Django URL path converter for Terms Version Numbers
"""

regex = "[0-9.]+"

def to_python(self, value):
Expand All @@ -27,7 +28,7 @@ def to_url(self, value):
return value


register_converter(TermsVersionConverter, 'termsversion')
register_converter(TermsVersionConverter, "termsversion")

urlpatterns = (
# View Unaccepted Terms
Expand All @@ -49,7 +50,9 @@ def to_url(self, value):
# Print Specific Version of Terms
path(
"print/<slug:slug>/<termsversion:version>/",
never_cache(TermsView.as_view(template_name="termsandconditions/tc_print_terms.html")),
never_cache(
TermsView.as_view(template_name="termsandconditions/tc_print_terms.html")
),
name="tc_print_page",
),
# Accept Terms
Expand Down

0 comments on commit 3e74eba

Please sign in to comment.