sphinxcontrib-django icon indicating copy to clipboard operation
sphinxcontrib-django copied to clipboard

Add support for Django 5.x choices

Open sevdog opened this issue 1 year ago • 0 comments

Motivation

Django 5.0 introduces new methods to define choices (see Django 5.0 announcement, now choices may be:

  • an old style list/tuple
  • a dict
  • a class which inherits from Choice
  • a callable which return one of the previous

Proposed Solution

The method get_field_details should check which kind of choices are available on the field before using it.

sevdog avatar Sep 16 '24 13:09 sevdog