#34531: Rendering form throws deprecation warning
-------------------------------+--------------------------------------
Reporter: Petr DlouhĂ˝ | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Natalia Bidart):
* status: new => closed
* resolution: => invalid
Comment:
Hello Petr! I believe the warning is necessary because Django users
updating from Django 4.2 to Django 5 should take an explicit action
regarding forms. If no action is taken, existing Django 4.2 projects risk
to have rendering issues for existing forms.
The action is simple: the Django user has to either define `template_name`
in their form, or render the form in a template explicitly showing a
format. So, if you change your example to any of the `as_p`, `as_table`,
`as_div`, etc:
```python
t = Template("{{ form.as_p }}")
```
the warning is resolved and no issues are reported. I'll close as invalid
considering the above.
--
Ticket URL: <https://code.djangoproject.com/ticket/34531#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070187dd972536-bcd618d5-1254-4525-a88a-7535e30673d6-000000%40eu-central-1.amazonses.com.