On Tuesday, 13 September 2016 21:54:49 UTC+2, ludovic coues 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/ 
>

I fully agree that this is a problem. If you write "/articles/<int:year>/" 
I think the expectation is that year will be sent in as an int, not a 
string. So the int serves as two different things: a validator and a 
typecast.

Tim Graham: Does this change your view that this should be done outside of 
core? Do you buy the argument that beginners are unlikely to install third 
party packages when learning django? 

-- 
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/211d1691-0e13-4c3d-bf08-a24f9aa48432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to