cubicweb/web/wdoc/custom_view_en.rst
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Fri, 28 Apr 2017 09:49:37 +0200
changeset 12183 af5d0a3c3f1a
parent 11057 0b59724cb3f2
permissions -rw-r--r--
[req] fix find() generating non-rewritable rql on non final relations When filtering on a relation, find() was generating rql like 'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it should probably not), but when applying some rewrite (eg. permissions) it raise in rqlrewrite code. def _use_orig_term(self, snippet_varname, term): ... > self.rewritten[key] = term.name E AttributeError: 'Constant' object has no attribute 'name' Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.

Once you have read the `RQL tutorial`_ and you know the application'`schema`_,
you're ready to define your own views. Just type the RQL query retreiving data
you're interested in in the search field. If the view used to display them
doesn't fit your need, choose another one in the possible views box (this box
isn't displayed by default, but you can activate it in your `user
preferences`_). Once you're satified, add a `bookmark`_ if you want to reuse
this view later.

.. _`RQL tutorial`: tut_rql
.. _`schema`: ../schema
.. _`user preferences`: ../myprefs
.. _`bookmark`: bookmarks


Below are some example of what can be acheived...

.. winclude:: custom_view_last_update
.. winclude:: custom_view_rss