Skip to content

_delegate_text was removed in Django 5. #9274

Closed

Description

@jayden-arrai

Checklist

  • Raised initially as discussion #...
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
  • I have reduced the issue to the simplest possible case.

if isinstance(value, Promise) and value._delegate_text:
value = force_str(value)

force_str has a built in parameter called strings_only. So the version number should be checked, and then if it is django 5, it should do the following instead of using delegate_text.

        value = force_str(value, strings_only=True)

Activity

  1. jayden-arrai commented on Mar 6, 2024

    @jayden-arrai
    Author

    I'd make a pull request, if I had time, but you might get to this before I can, since it is relatively simple.

  2. auvipy commented on Mar 7, 2024

    @auvipy
    Collaborator

    would be helpful If you could come with a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions