Hi,

I feel there is a use case that the `path()` function does not address and 
thus requires to switch over to `re_path()` which immediately adds a lot of 
additional and error-prone syntax.

Often there is a need to capture a URL parameter which can be optional into 
the view’s kwargs. In terms of path() syntax, this could be accomplished by 
simply allowing, e.g., <int:param?>. However, I am not sure how to handle 
the forward slash that would usually appear after the parameter, and I 
don’t know how difficult it would be to amend the current implementation to 
support this feature.

By the way, if there was a discussion about this before, I couldn’t find 
it. Please point me to it if there was.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/818f30d8-308b-4860-b861-7c7dde9b7aaan%40googlegroups.com.
  • Opt... Meiyer
    • ... Carlton Gibson
      • ... Meiyer
        • ... Matthew Pava
          • ... Meiyer
            • ... Carlton Gibson
              • ... 'Adam Johnson' via Django developers (Contributions to Django itself)

Reply via email to