Tuesday, December 16, 2014

I started to work on #44. Seems easier than expected. It is clear that lino.modlib.polls is still very simplistic.

Should questions be numbered? Yes they should. Added new field Question.number.

I started to think that we need another model Section instead of the is_heading checkbox. But what about simple polls with just one section? It would be a pity to have a QuestionsByPoll with only one line for these polls. Maybe rather “background sections” as in Writer. The AnswersByResponse table then becomes even more virtual since it adds rows for these background sections.

Side effects:

I started to move documentation content back from the narrative API to the generated API. (Because the maintenance of a narrative API is utopic, because lino.dd and lino.rt are not everybody’s taste, because…)

Mahmoud reported several problems in https://www.lino-framework.org/tutorials/polls/mysite/index.html, which I updated. For example the input_mask_test was not the right thing to show in a beginner’s tutorial. I moved it on its own tutorial page https://www.lino-framework.org/tutorials/input_mask/index.html. This revealed a bug in lino.core.kernel.Kernel.get_generic_related() (which occured only when lino.modlib.contenttypes is not installed).

Mahmoud also reported that the requirements.txt is confusing. I read Donald Stufft’s article setup.py vs requirements.txt and then decided that indeed this file is useless for Lino. Another useless file was genapidoc.py which, by the way, was 11 years old.