• 
      

    Add new helper methods to CommaSeparatedValuesField.

    Review Request #14210 — Created Oct. 19, 2024 and submitted

    Information

    Djblets
    release-5.x

    Reviewers

    CommaSeparatedValuesField now introduces two new methods to the parent
    model owning the field:

    • get_<fieldname>_list()
    • get_<fieldname>_display()

    These both return a version of the stored list using any display names
    provided by the choices= passed to the field.

    This field was largely written in order to replace
    django-multiselectfield, which provided these methods. We lacked
    these until now.

    The module was also missing from the codebase docs. It's now added.

    Unit tests pass.

    Summary ID
    Add new helper methods to CommaSeparatedValuesField.
    `CommaSeparatedValuesField` now introduces two new methods to the parent model owning the field: * `get_<fieldname>_list()` * `get_<fieldname>_display()` These both return a version of the stored list using any display names provided by the `choices=` passed to the field. This field was largely written in order to replace `django-multiselectfield`, which provided these methods. We lacked these until now. The module was also missing from the codebase docs. It's now added.
    e52696e3fe0f911241e43efd205c4ae90d2fcde7
    maubin
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.x (56dd714)