Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2879

Review SelectField in forms

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • None
    • None

    Description

      The SelectField in forms.py is behaving a bit counterintuitive, it receives a dictionary of choices, but uses only the keys of that dictionary to populate the options.

      We should revise what is the most common behavior we need and choose a more straight-forward behavior:

      • send directly a list of values to be used as label and value for the options
      • or send a dictionary but use both its keys and values as label and value for the options

      If the second option is better, TVB-2876 should be simplified by it. 

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                robert.vincze Robert Francisc Vincze
                paula.popa Paula Prodan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - 2 days
                    2d
                    Remaining:
                    Time Spent - 7 hours Remaining Estimate - 1 day, 1 hour
                    1d 1h
                    Logged:
                    Time Spent - 7 hours Remaining Estimate - 1 day, 1 hour
                    7h