BibFormat: format_element initialisation fix

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-0.99' into maint-1.0

* maint-0.99:
  BibFormat: format_element initialisation fix
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  BibFormat: format_element initialisation fix
Merge branch 'maint-1.1'

* maint-1.1:
  BibFormat: format_element initialisation fix
Merge branch 'master' into next

* master:
  BibFormat: format_element initialisation fix
travis: initial configuration release
travis: nose and regression test addition

* Adds nose installation.

* Adds webmessage regression test.

* Adds database demosite command
travis: demosite create and populate fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
travis: make install-* and apache config

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebSession: reporting errors in *_user_settings.py

* Errors in `*_user_settings.py` files are logged in
  `CFG_LOGDIR/broken-user-settings.log`.  (closes #1570)

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: error code 401 on authorization failure

* Adds error code 401 when user is not authorized instead of just
  flashing an error message with a success code.

* Uses same `unauthorized` handler in Flask `login_manager` as 401 error
  handler.

* Fixes webstyle regression tests.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Co-authored-by: Konstantinos Ntemagkos <konstantinos.ntemagkos@cern.ch>
hashutils: initial release

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
hashutils: usage update in modules

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebAPIKey: initial Flask port

* Moves `web_api_key` logic to the model.

* Refactors functions to work with sqlalchemy and flask request.

* Refactors `web_api_key` to work with model functions.

* Updates `web_api_key_regression_tests`.

Signed-off-by: Konstantinos Ntemagkos <konstantinos.ntemagkos@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
mailutils: Flask-Email initial port

* Adds new configuration variable CFG_MAIL_BACKEND.  (closes #1531)

* Adds html and plaintext email templates.

* Adds unit tests for sending emails.

* Adds `mailtutils_backend_adminonly` for sending emails only to
  CFG_SITE_ADMIN_EMAIL.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
installation: jinja2utils and requirements upgrade

* Upgrades python dependencies to latest versions and fixes
  compatibility issues with Jinja2/MarkupSafe packages.
  (addresses #1476)

* NOTE run `pip install -r requirements-flask.txt --upgrade` and
  `pip install -r requirements-flask-ext.txt --upgrade`. You might need
  to clean pip cache and build directories
  (`rm -rf ~/.pip/cache/* ~/.pip/build/*`).

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibWorkflow: workflow query API initial release

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
inveniomanage: cache, bibrecord and runserver cmds

* Adds `cache` manager for reseting all record structure caches.

* Adds `bibrecord` manager for reseting `recstruct` caches.

* Adds expunge command to `bibformat` manager that removes
  static formats from bibfmt cache.  (addresses #1549)

* Uses host and port from config variable CFG_SITE_URL as default for
  `runserver` command.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Co-authored-by: Esteban J. G. Gabancho <esteban.gabancho@cern.ch>
WebSearch: CollectionExample demosite fixture fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
WebStyle: authorized decorator fix

* Addresses issues with authorized code different from 0 and 1.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>