+1 Tom’s proposal and Jacob’s comments.

-- 
Aymeric.

> On 03 Oct 2016, at 16:39, Jacob Kaplan-Moss <ja...@jacobian.org> wrote:
> 
> Hi Tom -
> 
> Thanks for putting this together! Overall, +1 from me as well: I've taught 
> Django to a bunch of beginners, and URLs are one of the major pain points. 
> I'd love to make them easier, and your proposal looks pretty dang great.
> 
> Some specific feedback:
> 
> 1. I'm not too thrilled on the "is this a regex or not?" auto-detection: my 
> experience has been that every time we try to be clever like that, we end up 
> regretting it down the line. "Explicit is better than implicit", and all 
> that. It's more awkward, but I'd prefer different calls/constructors for 
> URLs. I think this also lets us set up a better upgrade/transition path. My 
> suggestion is that we move towards `url()` giving "new style" patterns, and 
> have another helper ("url_regex"? "urlr"?) that provides regex resolving. We 
> could also take this opportunity to simplify import paths, so:
> 
> - `from django.urls import url` <--- new-style resolver
> - `from django.urls import url_regex` <--- old-style resolver
> - `from django.conf.urls import url` <--- old-style resolver, with 
> PendingDeprecation/DeprecationWarning, then deleted - as per normal upgrade 
> path.
> 
> 2. Huge +1 on copying Flask's converters and API. Flask nailed the routing 
> syntax, no need to reinvent the wheel!
> 
> 3. Documentation: I suggest introducing the new syntax immediately in all the 
> documentation. It's better for like 90% of the cases.
> 
> Thanks again, I'm stoked to see some motion here.
> 
> Jacob
> 
> On Mon, Oct 3, 2016 at 3:24 AM, Tom Christie <christie....@gmail.com 
> <mailto:christie....@gmail.com>> wrote:
> Hi folks,
> 
> I wanted to push forward the consideration of introducing a simpler URLs 
> syntax, plus support for URL parameter type conversion.
> 
> A pre-proposal is available here: 
> https://gist.github.com/tomchristie/cb388f0f6a0dec931c611775f32c5f98 
> <https://gist.github.com/tomchristie/cb388f0f6a0dec931c611775f32c5f98>
> 
> At this point I'm seeking feedback, before hopefully iterating on the 
> proposal, and making a formal submission.
> 
> I'm not making any assumptions right now about where this might get too, or 
> who'd be involved if it does make it to the DEP stage, and would very much 
> welcome outside involvement. I'm also aware that while there's been some 
> positive reception, it's not yet clear if we'll reach a consensus on 
> inclusion in core.
> 
> Personally I'm very firmly +1 on this, as I feel that the existing syntax is 
> a rather glaring and unnecessary pain point.
> 
> Thanks to everyone who's started to kick this off, in particular Emil 
> Stenström for raising the original thread, and Sjoerd Job Postmus for their 
> work on the Django Simple URL 
> <https://github.com/sjoerdjob/django-simple-url> package.
> 
>   - Tom
> 
> -- 
> 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 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-developers@googlegroups.com 
> <mailto:django-developers@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers 
> <https://groups.google.com/group/django-developers>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/1450171a-be2b-41e8-b221-91bfe656d039%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-developers/1450171a-be2b-41e8-b221-91bfe656d039%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 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 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-developers@googlegroups.com 
> <mailto:django-developers@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers 
> <https://groups.google.com/group/django-developers>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/CAK8PqJEbne2fp9X3Q1Dgr7OG3Ns54A1gqdndwCD5FXNT8j%3DXTw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/django-developers/CAK8PqJEbne2fp9X3Q1Dgr7OG3Ns54A1gqdndwCD5FXNT8j%3DXTw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/D5256C17-164F-4123-B07C-7A62100AE7F1%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to