cubicweb #1438736 add a data_url() method on Request object [resolved]

I couldn't find an helper method to build an url for a static resource. The standard way seems to be:

self._cw.datadir_url + 'whatever.jpg'

which i find ugly (imo) and inconsistent with:

self._cw.external_resource('MY_RESOURCE')
self._cw.build_url('foo')
data('whatever.jpg') # in uiprops.py

I'd like datadir_url to become a private attribute and have a data_url method.

priorityminor
typeenhancement
done in3.11.3
load0.100
load left0.000
closed by<not specified>