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.
|closed by||<not specified>|
- cubicweb #5414757 [dataimport] more api specification
- cubicweb #2363313 _cw gets hosed after a .commit()
- 1 to 1 relationships and subresources in REST APIs | Technology on Heels with Lyst Engineering (http://developers.lyst.com/2015/02/20/1-to-1-relationships-and-subresources-in-rest-apis/)
- cubicweb-blog #1337569 Implement the Metaweblog API
- Exploring the datafeed API in CubicWeb