[Cubicweb] How to use jsonp controller ?

Yann Cointepas yann at cointepas.net
Thu Dec 18 09:56:34 CET 2014


Hi list,

I need to query a Cubicweb site from an independant web page in Javascript.
I tried (in a browser first) to use jsonp controller by simply changing
/view? in /jsonp? in an URL using jsonexport view. However, I get a page
that only contains the following Python traceback. Could you help me to
find my mistake(s) ?

URL = https://cati.cea.fr/database/jsonp?rql=Study+X&vid=jsonexport

Traceback (most recent call last):
  File "/home/cati/brainvisa/builds/catidb-trunk/lib/python2.7/site-packages/cubicweb/etwist/server.py",
line 128, in render_request
    return self._render_request(request)
  File "/home/cati/brainvisa/builds/catidb-trunk/lib/python2.7/site-packages/cubicweb/etwist/server.py",
line 153, in _render_request
    content = self.appli.handle_request(req, path)
  File "/home/cati/brainvisa/builds/catidb-trunk/lib/python2.7/site-packages/cubicweb/web/application.py",
line 423, in main_handle_request
    content = self.need_login_content(req)
  File "/home/cati/brainvisa/builds/catidb-trunk/lib/python2.7/site-packages/cubicweb/web/application.py",
line 599, in need_login_content
    return self.vreg['views'].main_template(req, 'login')
  File "/home/cati/brainvisa/builds/catidb-trunk/lib/python2.7/site-packages/cubicweb/cwvreg.py",
line 387, in main_template
    obj = self.select(oid, req, rset=rset, **kwargs)
  File "/usr/lib/pymodules/python2.7/logilab/common/registry.py", line
355, in select
    raise NoSelectableObject(args, kwargs, self[__oid] )
NoSelectableObject: args:
(<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at
0x7fd9ce227a90>,), kwargs: ['rset']
candidates: [<class 'cubicweb.web.views.basetemplates.LogInTemplate'>]


I am using Cubicweb 3.19.3. Authentication is done by Apache.

     Yann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20141218/287991bb/attachment-0126.html>


More information about the Cubicweb mailing list