On 29 Mar 2013, at 17:22, Bernhard Ja <[email protected]> wrote: > Hello together, > this is my first post to the Django developers list. Please let me know if > this topic is better placed on Django users :-) > > For i18n there is a javascript_catalog view we can use to access translations > in javascript. > Accessing django urls in javascript is IMHO an annoying task, but it cloud be > as simple as the translation thing. > > I wrote a small django app[1] that makes url handling easy for me. > I would love to see sth. like that in the django core. > > What's your opinion? > > Thanks for feedback and have a nice day, > Boerni > > [1] https://github.com/version2/django-js-reverse
I like the concept of this, because it's something I've often wanted myself. But I want to bring up a couple of points: 1) Some websites rely on the obscurity of some of their URLs as an additional security measure (i.e. have the admin at something other than /admin/). This is admittedly not a great measure, since a persistent attackers will probably get around it. But the key would be a way to manage which patterns get included in the javascript catalog, possibly even having it configurable at the the view level so that some templates can request a different subset of the patterns to others. 2) It'd be nice if it could be integrated with internationalisation, so that if you're using Django's i18n_patterns, the view automatically fills in the country segment based on the request's locale. Much like the translation string view only returns the strings for the request's language. Andy -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
