#6068 (New feature for polls: USE_GFK_CHOICE)
by Sharif Mehedi · in Developers · assigned to Sharif Mehedi
Summary
Right now the polls plugin supports only questions with a small number of choices. Lino does not allow to write a poll to ask e.g. "who will be the next team leader", where the expected answer is to select a users.User or a contacts.Person (the content type should be configurable).
Children
Comments
- 1 year, 4 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : It is being used in welcht: there is a main menu "Polls" (last time I didn't find this). And it is broken under extjs: goto mathieu, sign in as robin, select a poll, double-click on a result: poof traceback saying AttributeError: 'NoneType' object has no attribute 'choice_type'. Same traceback when ...
- 1 year, 4 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : todo: where is this being used in welcht?
- 1 year, 4 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : todo: meditate. In a certain way we need a kind of combined field "answer" "answer_buttons". Try to show both columns, add an option "ChoiceSet.show_buttons", and change answer_button to stay empty when show_button is False.
- 1 year, 4 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : TODO: add a question "Who should become president?" in the demo data.
- 1 year, 5 months ago by Sharif Mehedi about #6068 (New feature for polls: USE_GFK_CHOICE) : I have some changes related to this ticket on lino, and xl.
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : I pushed my changes in lino and xl. No visible results but some internal improvements. I'd like to show this to @8lurry tomorrow and maybe he can take over this ticket.
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : TODO: The answer_choice(question) chooser now gets called, but the argument (question) is always None under React, and under extjs it is a string (while it should be a Question object). The react front end knows which parameters to pass to /choices by consulting the context parameters, which are sto...
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : One step done: it now displays the GFK id field as a combo. But the Choices view doesn't yet understand it.
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : I abandon once more. todo: why does Controllable.owner_id, which is a plain GenericForeignKeyIdField have a combobox even when there is no FOO_choices method?
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : I added a option USE_GFK_CHOICE and restored the old behaviour as default. My goal is to repair the welfare test suite. I adapted only one doctest in welfare: the ordering of the fields in uploads.Upload has changed, and I don't know why
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : As a first step I moved the tables in lino_xl.lib.polls from the models.py to a separate ui.py because it had become too big.
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : @8lurry I didn't yet find enough free brain space for swapping into this issue. Feel free to continue digging without me. I'll ping you when I start thinking at it.
- 1 year, 5 months ago by Luc Saffre about #6068 (New feature for polls: USE_GFK_CHOICE) : We are trying to implement AnswerChoiceField as a virtual GenericForeignKeyIdField. Sharif felt locked after a day of meditation. I tried for half an hour with @8lurry watching, also without result. We then decided that @8lurry will have another day on it. Maybe tomorrow I take the ticket for a whole day.
- 1 year, 5 months ago by Sharif Mehedi about #6068 (New feature for polls: USE_GFK_CHOICE) : Created new Ticket #6068 (optimize polls for GFK choice).