diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index 21d5ab6e37..b5ae024866 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -6,12 +6,12 @@ {% for js in bound_manipulator.javascript_imports %}{% include_admin_script js %}{% endfor %} {% endblock %} {% block coltype %}{{ bound_manipulator.coltype }}{% endblock %} -{% block bodyclass %}{{app_label}}-{{bound_manipulator.object_name.lower}} change-form{% endblock %} +{% block bodyclass %}{{ app_label }}-{{ bound_manipulator.object_name.lower }} change-form{% endblock %} {% block breadcrumbs %}{% if not is_popup %} {% endif %}{% endblock %} {% block content %}
@@ -20,7 +20,7 @@ {% if bound_manipulator.has_absolute_url %}
  • {% trans "View on site" %}
  • {% endif%} {% endif %}{% endif %} -
    {% block form_top %}{%endblock%} +{% block form_top %}{% endblock %} {% if is_popup %}{% endif %} {% if bound_manipulator.save_on_top %}{% submit_row bound_manipulator %}{% endif %} {% if form.error_dict %} @@ -29,12 +29,12 @@

    {% endif %} {% for bound_field_set in bound_manipulator.bound_field_sets %} -
    - {% if bound_field_set.name %}

    {{bound_field_set.name }}

    {% endif %} +
    + {% if bound_field_set.name %}

    {{ bound_field_set.name }}

    {% endif %} {% for bound_field_line in bound_field_set %} - {% admin_field_line bound_field_line %} + {% admin_field_line bound_field_line %} {% for bound_field in bound_field_line %} - {% filter_interface_script_maybe bound_field %} + {% filter_interface_script_maybe bound_field %} {% endfor %} {% endfor %}
    @@ -50,24 +50,24 @@ {% endif %} {% endif %} {% for related_object in bound_manipulator.inline_related_objects %}{% edit_inline related_object %}{% endfor %} -{% block after_related_objects%}{%endblock%} +{% block after_related_objects %}{% endblock %} {% submit_row bound_manipulator %} {% if add %} - + {% endif %} {% if bound_manipulator.auto_populated_fields %} {% endif %} {% if change %} {% if bound_manipulator.ordered_objects %} {% if form.order_objects %}
      {% for object in form.order_objects %} -
    • - {{ object|truncatewords:"5" }} -
    • - {% endfor%} +
    • + {{ object|truncatewords:"5" }} +
    • + {% endfor %}
    {% endif %} {% endif %} {% endif %} diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index a2dcc91d7d..ccc3990519 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -2,19 +2,19 @@ {% load i18n %} {% extends "admin/base_site" %} {% block bodyclass %}change-list{% endblock %} -{% if not is_popup %}{% block breadcrumbs %}{% endblock %}{% endif %} +{% if not is_popup %}{% block breadcrumbs %}{% endblock %}{% endif %} {% block coltype %}flex{% endblock %} {% block content %}
    -{%if has_add_permission %} - +{% if has_add_permission %} + {% endif %} -
    -{% search_form cl%} -{% date_hierarchy cl%} +
    +{% search_form cl %} +{% date_hierarchy cl %} {% filters cl %} -{% result_list cl%} -{% pagination cl%} +{% result_list cl %} +{% pagination cl %}
    -{%endblock%} +{% endblock %} diff --git a/django/contrib/admin/templates/admin/change_list_results.html b/django/contrib/admin/templates/admin/change_list_results.html index 2df3a5a74f..92e06c5fff 100644 --- a/django/contrib/admin/templates/admin/change_list_results.html +++ b/django/contrib/admin/templates/admin/change_list_results.html @@ -1,17 +1,13 @@ -{% for header in result_headers %} -{%if header.sortable%}{%endif%} -{{header.text|capfirst}} -{%if header.sortable %}{% endif %}{% endfor %} +{% for header in result_headers %} +{% if header.sortable %}{% endif %} +{{ header.text|capfirst }} +{% if header.sortable %}{% endif %}{% endfor %} -{%for result in results %} - - {%for item in result %} - {{item }} - {%endfor%} - -{%endfor%} +{% for result in results %} +{% for item in result %}{{ item }}{% endfor %} +{% endfor %}
    diff --git a/django/contrib/admin/templates/admin/date_hierarchy.html b/django/contrib/admin/templates/admin/date_hierarchy.html index 7c6df3d3ca..a53d810f93 100644 --- a/django/contrib/admin/templates/admin/date_hierarchy.html +++ b/django/contrib/admin/templates/admin/date_hierarchy.html @@ -1,9 +1,9 @@ {% if show %}

    diff --git a/django/contrib/admin/templates/admin/edit_inline_stacked.html b/django/contrib/admin/templates/admin/edit_inline_stacked.html index 49c4441db3..5e5ea8c0fc 100644 --- a/django/contrib/admin/templates/admin/edit_inline_stacked.html +++ b/django/contrib/admin/templates/admin/edit_inline_stacked.html @@ -1,5 +1,5 @@
    - {% for fcw in bound_related_object.form_field_collection_wrappers %} + {% for fcw in bound_related_object.form_field_collection_wrappers %}

    {{ bound_related_object.relation.opts.verbose_name|capfirst }} #{{ forloop.counter }}

    {% if bound_related_object.show_url %}{% if fcw.obj.original %}

    View on site

    @@ -11,5 +11,5 @@ {% admin_field_line bound_field %} {% endif %} {% endfor %} - {%endfor%} + {% endfor %}
    \ No newline at end of file diff --git a/django/contrib/admin/templates/admin/edit_inline_tabular.html b/django/contrib/admin/templates/admin/edit_inline_tabular.html index d14f37beb6..c06ee05df8 100644 --- a/django/contrib/admin/templates/admin/edit_inline_tabular.html +++ b/django/contrib/admin/templates/admin/edit_inline_tabular.html @@ -1,33 +1,32 @@
    -

    {{bound_related_object.relation.opts.verbose_name_plural|capfirst}}

    +

    {{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}

    {% for fw in bound_related_object.field_wrapper_list %} {% if fw.needs_header %} - {{fw.field.verbose_name|capfirst}} + {{ fw.field.verbose_name|capfirst }} {% endif %} {% endfor %} - {% for fcw in bound_related_object.form_field_collection_wrappers %} - + {% for fcw in bound_related_object.form_field_collection_wrappers %} {% if change %}{% if original_row_needed %} {% if fcw.obj.original %} - + {% endif %} {% endif %}{% endif %} {% if fcw.obj.errors %} - {% endif %} {% for bound_field in fcw.bound_fields %} {% if not bound_field.hidden %} - {% endif %} {% endfor %} {% if bound_related_object.show_url %}{% endif %} @@ -35,10 +34,9 @@ {% for fcw in bound_related_object.form_field_collection_wrappers %} {% for bound_field in fcw.bound_fields %} - {% if bound_field.hidden %} + {% if bound_field.hidden %} {% field_widget bound_field %} {% endif %} {% endfor %} {% endfor %} - diff --git a/django/contrib/admin/templates/admin/field_line.html b/django/contrib/admin/templates/admin/field_line.html index 0513d33da2..5e526e6fd6 100644 --- a/django/contrib/admin/templates/admin/field_line.html +++ b/django/contrib/admin/templates/admin/field_line.html @@ -3,19 +3,19 @@ {% for bound_field in bound_fields %} {% if bound_field.has_label_first %} {% field_label bound_field %} - {% endif %} + {% endif %} {% field_widget bound_field %} {% if not bound_field.has_label_first %} {% field_label bound_field %} {% endif %} {% if change %} {% if bound_field.field.primary_key %} - {{ bound_field.original_value }} - {% endif %} + {{ bound_field.original_value }} + {% endif %} {% if bound_field.raw_id_admin %} {% if bound_field.existing_display %} {{ bound_field.existing_display|truncatewords:"14" }}{% endif %} - {% endif %} + {% endif %} {% endif %} - {% if bound_field.field.help_text %}

    {{bound_field.field.help_text}}

    {% endif %} + {% if bound_field.field.help_text %}

    {{ bound_field.field.help_text }}

    {% endif %} {% endfor %} diff --git a/django/contrib/admin/templates/admin/filter.html b/django/contrib/admin/templates/admin/filter.html index e79a14a2ce..385b1824f2 100644 --- a/django/contrib/admin/templates/admin/filter.html +++ b/django/contrib/admin/templates/admin/filter.html @@ -1,7 +1,7 @@ -

    {%blocktrans%} By {{title}} {%endblocktrans%}

    - \ No newline at end of file +

    {% blocktrans %} By {{ title }} {% endblocktrans %}

    + diff --git a/django/contrib/admin/templates/admin/filters.html b/django/contrib/admin/templates/admin/filters.html index e3a34655d7..b3c6a25831 100644 --- a/django/contrib/admin/templates/admin/filters.html +++ b/django/contrib/admin/templates/admin/filters.html @@ -2,4 +2,4 @@

    Filter

    {% for spec in cl.filter_specs %} {% filter cl spec %} -{% endfor %}{% endif %} \ No newline at end of file +{% endfor %}{% endif %} diff --git a/django/contrib/admin/templates/admin/pagination.html b/django/contrib/admin/templates/admin/pagination.html index d46044b271..5d80ecdcc4 100644 --- a/django/contrib/admin/templates/admin/pagination.html +++ b/django/contrib/admin/templates/admin/pagination.html @@ -1,13 +1,9 @@ -

    -{% if pagination_required %} -{%for i in page_range %} - {% paginator_number cl i %} -{%endfor%} -{%endif%} -{{cl.result_count}} {% ifequal cl.result_count 1 %}{{cl.opts.verbose_name}}{%else%}{{cl.opts.verbose_name_plural}}{%endifequal%} -{% if show_all_url %}  Show all{%endif%} - +{% if pagination_required %} +{% for i in page_range %} + {% paginator_number cl i %} +{% endfor %} +{% endif %} +{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %} +{% if show_all_url %}  Show all{% endif %}

    - - \ No newline at end of file diff --git a/django/contrib/admin/templates/admin/search_form.html b/django/contrib/admin/templates/admin/search_form.html index c80a00d00c..19b6b7eb95 100644 --- a/django/contrib/admin/templates/admin/search_form.html +++ b/django/contrib/admin/templates/admin/search_form.html @@ -1,14 +1,14 @@ -{%if cl.lookup_opts.admin.search_fields %} +{% if cl.lookup_opts.admin.search_fields %}
    - - + + -{%if show_result_count %} - {{cl.result_count}} result{{cl.result_count|pluralize}} ({{cl.full_result_count}} total) -{%endif%} +{% if show_result_count %} + {{ cl.result_count }} result{{ cl.result_count|pluralize }} ({{ cl.full_result_count }} total) +{% endif %} {% for pair in cl.params.items %} - {%ifnotequal pair.0 search_var%}{%endifnotequal%} + {% ifnotequal pair.0 search_var %}{% endifnotequal %} {% endfor %}
    -{%endif%} \ No newline at end of file +{% endif %} diff --git a/django/contrib/admin/templates/admin/submit_line.html b/django/contrib/admin/templates/admin/submit_line.html index 64ca864890..25f581963e 100644 --- a/django/contrib/admin/templates/admin/submit_line.html +++ b/django/contrib/admin/templates/admin/submit_line.html @@ -1,8 +1,8 @@ {% load i18n %}
    {% if show_delete_link %}

    {% trans "Delete" %}

    {% endif %} -{% if show_save_as_new %}{%endif%} -{% if show_save_and_add_another %}{% endif %} -{% if show_save_and_continue %}{% endif %} -{% if show_save %}{% endif %} +{% if show_save_as_new %}{%endif%} +{% if show_save_and_add_another %}{% endif %} +{% if show_save_and_continue %}{% endif %} +{% if show_save %}{% endif %}
    {{ fcw.obj.original }}
    {{ fcw.obj.original }}
    +
    {{ fcw.obj.html_combined_error_list }}
    + {% field_widget bound_field %} - {% if fcw.obj.original %}View on site{% endif %} + {% if fcw.obj.original %}View on site{% endif %}