Skip to content

[BUG] models.URLField serialized & validated as str #1157

Open
@mpeyfuss

Description

@mpeyfuss

Describe the bug
When using a URLField in a Django model and then using a ModelSchema for serialization/validation on a POST request, the url is just validated as a str. Most other fields are covered in Ninja, but this one seems to be missing.

Versions (please complete the following information):

  • Python version: [e.g. 3.6] 3.11.9
  • Django version: [e.g. 4.0] 5.0
  • Django-Ninja version: [e.g. 0.16.2] 1.1.0
  • Pydantic version: [e.g. 1.9.0] 2.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions