Changes between Initial Version and Version 1 of Ticket #31069, comment 3
- Timestamp:
- Dec 6, 2019, 6:47:48 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31069, comment 3
initial v1 1 error is caused by missing ? at end 1 error is caused by missing ? at end of re_path 2 3 4 {{{ 5 from django.urls import re_path 6 7 def view(request, optional1, optional2): ... 8 9 urlpatterns = [ 10 re_path(r'^(?P<optional1>\w+/)(?:(?P<optional2>\w+)/)?', view) 11 ] 12 }}} 13 14 15 works