doc/changes/3.20.rst
author Laurent Peuch <cortex@worlddomination.be>
Wed, 12 Jun 2019 19:58:00 +0200
changeset 12741 90348f847b4b
parent 10504 3755cd64fff8
child 12792 e2cdb1be6bd9
permissions -rw-r--r--
[pyramid/debug] on every request display request path and selected controller This will display lines like: 2019-06-12 16:26:57 - (cubicweb.pyramid.bwcompat) INFO: REQUEST [view] '/wiki/334037' selected controller <cubicweb.web.views.basecontrollers.ViewController object at 0x7f133802ae90> at /root/.virtualenvs/abreton/local/lib/python2.7/site-packages/cubicweb/web/views/basecontrollers.py:120 2019-06-12 16:26:59 - (cubicweb.pyramid.bwcompat) INFO: REQUEST [data] '/data/ea5eb3b6f89fba0ff4b671093c88d3dd/images/cartouche-mur.jpg' selected controller <cubicweb.web.views.staticcontrollers.DataController object at 0x7f1332a84d50> at /root/.virtualenvs/abreton/local/lib/python2.7/site-packages/cubicweb/web/views/staticcontrollers.py:179 The make debugging easier as this isn't done already. Most other web frameworks do something similar for the developper to be able to understand what is happening right now. Closes #17219741

3.20 (06/01/2015)
=================

New features
------------

* virtual relations: a new ComputedRelation class can be used in
  schema.py; its `rule` attribute is an RQL snippet that defines the new
  relation.

* computed attributes: an attribute can now be defined with a `formula`
  argument (also an RQL snippet); it will be read-only, and updated
  automatically.

  Both of these features are described in `CWEP-002`_, and the updated
  "Data model" chapter of the CubicWeb book.

* cubicweb-ctl plugins can use the ``cubicweb.utils.admincnx`` function
  to get a Connection object from an instance name.

* new 'tornado' wsgi backend

* session cookies have the HttpOnly flag, so they're no longer exposed to
  javascript

* rich text fields can be formatted as markdown

* the edit controller detects concurrent editions, and raises a ValidationError
  if an entity was modified between form generation and submission

* cubicweb can use a postgresql "schema" (namespace) for its tables

* "cubicweb-ctl configure" can be used to set values of the admin user
  credentials in the sources configuration file

* in debug mode, setting the _cwtracehtml parameter on a request allows tracing
  where each bit of output is produced

.. _CWEP-002: http://hg.logilab.org/review/cwep/file/tip/CWEP-002.rst


API Changes
-----------

* ``ucsvreader()`` and ``ucsvreader_pb()`` from the ``dataimport`` module have
  2 new keyword arguments ``delimiter`` and ``quotechar`` to replace the
  ``separator`` and ``quote`` arguments respectively. This makes the API match
  that of Python's ``csv.reader()``.  The old arguments are still supported
  though deprecated.

* the migration environment's ``remove_cube`` function is now called ``drop_cube``.

* cubicweb.old.css is now cubicweb.css.  The previous "new"
  cubicweb.css, along with its cubicweb.reset.css companion, have been
  removed.

* the jquery-treeview plugin was updated to its latest version


Deprecated Code Drops
----------------------

* most of 3.10 and 3.11 backward compat is gone; this includes:

  - CtxComponent.box_action() and CtxComponent.build_link()
  
  - cubicweb.devtools.htmlparser.XMLDemotingValidator
  
  - various methods and properties on Entities, replaced by cw_edited
    and cw_attr_cache
  
  - 'commit_event' method on hooks, replaced by 'postcommit_event'
  
  - server.hook.set_operation(), replaced by
    Operation.get_instance(...).add_data()
  
  - View.div_id(), View.div_class() and View.create_url()
  
  - `*VComponent` classes
  
  - in forms, Field.value() and Field.help() must take the form and
    the field itself as arguments
  
  - form.render() must get `w` as a named argument, and
    renderer.render() must take `w` as first argument
  
  - in breadcrumbs, the optional `recurs` argument must be a set, not
    False
  
  - cubicweb.web.views.idownloadable.{download_box,IDownloadableLineView}
  
  - primary views no longer have `render_entity_summary` and `summary`
    methods
  
  - WFHistoryVComponent's `cell_call` method is replaced by
    `render_body`
  
  - cubicweb.dataimport.ObjectStore.add(), replaced by create_entity
  
  - ManageView.{folders,display_folders}