mirror of
https://github.com/Hopiu/django.git
synced 2026-03-26 19:00:24 +00:00
As CharField.to_python() now always calls str(), assigning bytes to a
CharField is no longer correct usage. Doing so results in a warning:
django/db/models/fields/__init__.py:1061: BytesWarning: str() on a bytes instance
Use a unique constraint violation to trigger the database error instead.
Warning introduced in
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| models.py | ||
| tests.py | ||