#25854: Bad warning when using template.render -------------------------------+-------------------------------------- Reporter: stephanm | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 1.9 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by aaugustin): Oops. Indeed, that part of the tutorial needs updating. Actually this change was made in Django 1.8. It emitted a `PendingDeprecationWarning` which is silent by default. Since Django 1.9 it emits a `DeprecationWarning` which is loud. As explained in the [https://docs.djangoproject.com/en/1.8/ref/templates/upgrading/#get- template-and-select-template upgrade guide] this code must be simplified to: {{{ template = loader.get_template('polls/index.html') return HttpResponse(template.render(context, request)) }}} -- Ticket URL: <https://code.djangoproject.com/ticket/25854#comment:2> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.b3a6ef04de2759dbcadccd14d39c2c6c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.