See Sjoerd's code in a later reply to this thread, let's start experimenting there. /E
On Tuesday, 13 September 2016 22:17:34 UTC+2, Ares Ou wrote: > > Emil, > > Please count me in if you'd like to start a new DEP. I'm also > very interested to take this new challenge. And maybe we > should dive into the code of URL resolver part of Django before > we actually kick off? > > Anyway, I myself as a experienced user also like this idea. But as > Tim and Ludovic mentioned, we might better research a bit first. > Understanding how third-party libraries implemented this kind of > simple URL could be very helpful. > > Thanks. > > Best regards, > Ares Ou > > *Software Engineer / Full-Stack Python Developer* > > *Blog:* http://aresou.net | *Github:* https://github.com/aresowj > *Stack Overflow:* http://stackoverflow.com/users/5183727/ares-ou > > Ares Ou > > On Tue, Sep 13, 2016 at 12:54 PM, ludovic coues <cou...@gmail.com > <javascript:>> wrote: > >> There is third party module providing third party url function. Surlex >> [1] have been mentionned. But any third party solution will need to >> provide function compatible with django.conf.urls.url. >> Line 64 of django/urls/revolvers.py is get_resolver. This function >> return a RegexURLResolver, using is argument or the setting >> ROOT_URLCONF as argument. >> >> This make impossible, for exemple, to have resolver giving to the view >> an int argument. >> >> [1] http://codysoyland.com/2009/sep/6/introduction-surlex/ >> >> 2016-09-13 21:40 GMT+02:00 Tim Graham <timog...@gmail.com <javascript:>>: >> > 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-develop...@googlegroups.com <javascript:>. >> > To post to this group, send email to django-d...@googlegroups.com >> <javascript:>. >> > 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/37e44d86-696d-4b36-803a-0089232eedf9%40googlegroups.com >> . >> > >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> >> Cordialement, Coues Ludovic >> +336 148 743 42 >> >> -- >> 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-develop...@googlegroups.com <javascript:>. >> To post to this group, send email to django-d...@googlegroups.com >> <javascript:>. >> 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/CAEuG%2BTa-d_RsMqj5HbspEBdKUKemfBPvjBh2%2BdJmQjU04b-V7w%40mail.gmail.com >> . >> For more options, visit 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/c1e4d7a7-0a0e-4cf7-ae2f-ab9986a3a856%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.