Re: [Django] #2715: Uploads from Flash 8 cannot be parsed in Python 2.3

0 views
Skip to first unread message

Django

unread,
2:20 AM (20 hours ago) 2:20 AM
to django-...@googlegroups.com
#2715: Uploads from Flash 8 cannot be parsed in Python 2.3
------------------------------+-------------------------------------------
Reporter: frederik@… | Owner: Adrian Holovaty
Type: defect | Status: closed
Component: Core (Other) | Version: dev
Severity: normal | Resolution: wontfix
Keywords: upload http | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------------------------
Comment (by Sanghyuk Jeong):

I'd like to work on this ticket.
As Tim suggested in comment:3, I'm taking the deprecation path approach
rather than simply adding None guards.
**Changes:**
- `AdminForm.__init__` and `AdminReadonlyField.__init__` now emit
`RemovedInDjango70Warning` when `model_admin=None`, with a fallback to
`AdminSite.empty_value_display` (default `"-"`) so existing code doesn't
crash immediately.
- `AdminReadonlyField.get_admin_url` gracefully handles `model_admin=None`
by passing `current_app=None` to `reverse()`.
- Fixed `django/contrib/auth/admin.py` (the change password form) to pass
`model_admin=self` instead of relying on the `None` default, as noted in
comment:4 by Shawn Zivontsis.
This sets up a clean path toward making `model_admin` a required argument
in Django 7.0.
I'll submit a PR shortly.
--
Ticket URL: <https://code.djangoproject.com/ticket/2715#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages