Add a simple CommaSeparatedValuesField for DB models.

Review Request #13560 — Created Feb. 20, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

We're running into some trouble that the old django-multiselectfield
project is unmaintained and does not support Django 4.x+. There's a
third-party fork which has had some updates, but no releases of that
that we can consume.

django-multiselectfield itself isn't very big, and of what it offers, we
don't actually use very much. This change adds a new field type to
Djblets to do the database serialization/deserialization to join and
split comma-separated values. It doesn't support the validation that
django-multiselectfield does, but we don't actually care about that
functionality.

  • Ran unit tests.
  • Used this in Review Board and tested the functionality of the
    WebHookTarget admin form.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add a simple CommaSeparatedValuesField for DB models.
We're running into some trouble that the old django-multiselectfield project is unmaintained and does not support Django 4.x+. There's a third-party fork which has had some updates, but no releases of that that we can consume. django-multiselectfield itself isn't very big, and of what it offers, we don't actually use very much. This change adds a new field type to Djblets to do the database serialization/deserialization to join and split comma-separated values. It doesn't support the validation that django-multiselectfield does, but we don't actually care about that functionality. Testing Done: - Ran unit tests. - Used this in Review Board and tested the functionality of the WebHookTarget admin form.
fbc676d02586ff11aca50a6b4abe84c38dd04195 David Trowbridge
djblets/db/fields/__init__.py
djblets/db/fields/comma_separated_values_field.py
djblets/db/tests/test_comma_separated_values_field.py
Loading...