diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 206d66f15d..f732682b1c 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -216,6 +216,9 @@ INSTALLED_APPS = [] TEMPLATES = [] +# Default form rendering class. +FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' + # Default email address to use for various automated correspondence from # the site managers. DEFAULT_FROM_EMAIL = 'webmaster@localhost' diff --git a/django/contrib/admin/templates/admin/widgets/clearable_file_input.html b/django/contrib/admin/templates/admin/widgets/clearable_file_input.html new file mode 100644 index 0000000000..327b8ad16a --- /dev/null +++ b/django/contrib/admin/templates/admin/widgets/clearable_file_input.html @@ -0,0 +1,6 @@ +{% if is_initial %}
{{ initial_text }}: {{ widget.value }}{% if not widget.required %}
+
+
+{% endif %}
+{{ input_text }}:{% endif %}
+{% if is_initial %}
+ {{ date_label }} {% with widget=widget.subwidgets.0 %}{% include widget.template_name %}{% endwith %}
+ {{ time_label }} {% with widget=widget.subwidgets.1 %}{% include widget.template_name %}{% endwith %}
+
{{ current_label }} {{ widget.value }}
{{ change_label }} {% endif %}{% include "django/forms/widgets/input.html" %}{% if widget.value %}
{} {}
{} {}
%s
' % forms.ClearableFileInput.template_with_initial - ) - template_with_clear = ( - '%s' % forms.ClearableFileInput.template_with_clear - ) + template_name = 'admin/widgets/clearable_file_input.html' def url_params_from_lookup_dict(lookups): @@ -141,17 +124,17 @@ class ForeignKeyRawIdWidget(forms.TextInput): A Widget for displaying ForeignKeys in the "raw_id" interface rather than in a