mirror of
https://github.com/django/django.git
synced 2024-12-23 17:46:27 +00:00
7331788300
This change preserves backwards-compatibility for a very common misuse of render_to_response which even occurred in the official documentation. It fixes that misuse wherever it happened in the code base and docs. Context.__init__ is documented as accepting a dict and nothing else. Since Context is dict-like, Context(Context({})) could work to some extent. However, things get complicated with RequestContext and that gets in the way of refactoring the template engine. This is the real rationale for this change.
19 lines
995 B
Python
19 lines
995 B
Python
from django.conf.urls import url
|
|
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
url(r'^render_to_response/$', views.render_to_response_view),
|
|
url(r'^render_to_response/request_context/$', views.render_to_response_view_with_request_context),
|
|
url(r'^render_to_response/content_type/$', views.render_to_response_view_with_content_type),
|
|
url(r'^render_to_response/dirs/$', views.render_to_response_view_with_dirs),
|
|
url(r'^render_to_response/context_instance_misuse/$', views.render_to_response_with_context_instance_misuse),
|
|
url(r'^render/$', views.render_view),
|
|
url(r'^render/base_context/$', views.render_view_with_base_context),
|
|
url(r'^render/content_type/$', views.render_view_with_content_type),
|
|
url(r'^render/dirs/$', views.render_with_dirs),
|
|
url(r'^render/status/$', views.render_view_with_status),
|
|
url(r'^render/current_app/$', views.render_view_with_current_app),
|
|
url(r'^render/current_app_conflict/$', views.render_view_with_current_app_conflict),
|
|
]
|