:date: 2017-10-27

========================
Friday, October 27, 2017
========================

Rename lino_startup to something else
=====================================

While triaging tickets I created :ticket:`2131` (Rename lino_startup
to something else) and then "just did it": I renamed the
:mod:`lino.modlib.lino_startup` plugin to just :mod:`lino`.  It's the
kind of things nobody would ever do, except me. I guess.


In the beginning this plugin contained a hack for implementing a kind
of startup signal which caused :meth:`lino.core.site.Site.startup` to
be called automatically when Django starts up.  It was called
`lino.modlib.lino`.  At some moment (Django 1.7 or so) this caused a
"name is already used" exception. That's why it was called
:mod:`lino.modlib.lino_startup`.  After Django 1.8 or so it became
merely:

- a hook for defining the :class:`lino.AppConfig` class which
  calls :meth:`lino.core.site.Site.startup` and
- the root of the the :xfile:`management`, :xfile:`config` and
  :xfile:`locale` subdirs.

All these things are still there, but I moved them to the root,
i.e. the full plugin name is now :mod:`lino`.  I have the feeling that
this makes things much more straightforward.

To be observed: In :mod:`lino.core.urls` we had this::

    # we must explicitly call django.setup() because when running under
    # mod_wsgi this is not done automatically as with runserver (or at
    # least it seems so)
    lino.site_startup()

I removed that call to :func:`site_startup`.  We will see whether the
comment was true or not.  This is maybe related to our :ticket:`1173`.


Miscellaneous
=============

I removed :mod:`lino.modlib.database_ready` plugin and the
`database_ready` signal because they were not used.

I worked in the :ref:`lino.dev`.