Great initiative! I really think you should use the flask syntax instead of the rails one that I first suggested. Seems this is the consensus from this thread, and that makes it more likely to get it to core one day.
/Emil On Wednesday, 14 September 2016 11:02:23 UTC+2, Sjoerd Job Postmus wrote: > > Hi all, > > Since it seemed like an interesting idea to me, I started development of a > third-party plugin. > > It's currently at: > https://github.com/sjoerdjob/django-simple-url > > Since I only started today, I have no readme/setup.py yet. Will come later > this week I hope. > > Current usage is > > from django_simple_url import simple_url > > urlpatterns = [ > simple_url('hello/world/', hello_world_view), > simple_url(':year/:month/', posts_for_month_view), > ] > > It works proper with includes (not adding a $ to the URL), and leaf views > (adding a $ to the URL). > > Maybe this week, or early next week I will also add support for the > '<int:year>' syntax. > > Kind regards, > Sjoerd Job > > On Tuesday, September 13, 2016 at 9:40:47 PM UTC+2, Tim Graham wrote: >> >> I would like to see if this could be done as a third-party project (allow >> "pluggable URLs" which could use any syntax). If not, then let's accept a >> patch to Django to support it. Over time, if there's some strong consensus >> about a particular third-party package, then we could bring it in to core. >> I think this approach is less controversial then Django adopting some new, >> untested syntax right now. >> >> On Tuesday, September 13, 2016 at 3:33:25 PM UTC-4, Emil Stenström wrote: >>> >>> So it looks to me that the consensus is that this IS in fact a good >>> idea, to supply a simpler, regex-free method to define URL:s. >>> >>> It also seems that the best liked version is something that's similar to >>> what flask uses: /articles/<int:year>/<int:month>/. >>> >>> I've never written a DEP before, but it sounds like a fun challenge. >>> I'll try to look at existing DEPs for a pattern and then apply that. >>> >>> Does anyone have something in particular that they would like to add to >>> the DEP? I figure I'll try to keep this first version as simple as >>> possible, while maintaining extension points for features that can be added >>> later on. >>> >>> -- 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/512b0eab-807f-45e2-9225-93a0e1a64686%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.