================================== 20140117 (Friday, 17 January 2014) ================================== Tidying up :mod:`rstgen.sphinxconf` ------------------------------------ I didn't checkin yesterday's changes because one "detail" was missing: "sphinxcontrib.dailyblog" would have been the wrong name for this project. Because the "daily blog" things were in "sphinxcontrib.dailyblog.blog". The name should rather have been something like "Luc's Sphinx Extensions". But after a night of sleep I discovered another "detail": if anyway the new project would always depend on atelier, why then split it into a separate project? So I decided to undo most changes, i.e. to not move :mod:`rstgen.sphinxconf` into a separate module. Only one change remains: atelier now supports namespace packages (and thus the fablib command :cmd:`fab summary` no longer prints "old" and "new" version because that would require the Distribution object (returned from `pkg_resources.get_distribution`) which afaics makes problems for namespace packages. And of course the thing which caused all these evolutions: the new :rst:dir:`refstothis` directive, which I finally implemented in a new Sphinx extension module :mod:`rstgen.sphinxconf.refstothis`. TODO: continue to tidy up. Opened new ticket :srcref:`docs/tickets/89`. The modules :mod:`rstgen.sphinxconf.insert_input`, :mod:`rstgen.sphinxconf.dirtables`, :mod:`rstgen.sphinxconf.base` and :mod:`rstgen.sphinxconf.refstothis` are now standalone Sphinx extensions. New setting :setting:`contacts.hide_region` ------------------------------------------- A visitor of the :ref:`cosi` demo site had caused the following :ref:`ise`:: AttributeError at /api/contacts/Persons 'Person' object has no attribute 'city_zip_code' This bug occurred only for Partners with a non-empty `region` field. This is not yet well tested. Until now, every :mod:`lino_cosi.models` did the following code:: @dd.when_prepared('contacts.Person', 'contacts.Company') def hide_region(model): model.hide_elements('region') Which made it basically impossible to run a "non-Belgian" :ref:`cosi` site. Now this is done using the :setting:`contacts.hide_region` plugin setting, and :ref:`cosi` by default no longer hides the field. I also tried to add the MergeAction unconditionally to every Person and Company, but that turned out to not be so easy. See :srcref:`docs/tickets/90`. TODO: The `few_cities` fixture doesn't yet set the `parent` field for Eupen, Kettenis and other places.