Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions django/contrib/admin/static/admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fieldset .inline-heading,
}

.aligned legend {
float: left;
float: inline-start;
}

.aligned legend,
Expand Down Expand Up @@ -148,15 +148,11 @@ form .aligned ul {
}

form .aligned div.radiolist {
display: inline-block;
display: block;
margin: 0;
padding: 0;
}

form .aligned fieldset div.help {
margin-left: 0;
}

form .aligned p.help,
form .aligned div.help {
margin-top: 0;
Expand Down
4 changes: 4 additions & 0 deletions django/contrib/admin/static/admin/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ input[type="submit"], button {
margin-top: 5px;
}

form .aligned fieldset div.flex-container {
display: unset;
}

/* Related widget */

.related-widget-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<div class="form-row">
{{ form.usable_password.errors }}
<fieldset class="flex-container">{{ form.usable_password.legend_tag }} {{ form.usable_password }}</fieldset>
<fieldset>{{ form.usable_password.legend_tag }} {{ form.usable_password }}</fieldset>
{% if form.usable_password.help_text %}
<div class="help"{% if form.usable_password.id_for_label %} id="{{ form.usable_password.id_for_label }}_helptext"{% endif %}>
<p>{{ form.usable_password.help_text|safe }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="form-row{% if line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
{% if line.fields|length == 1 %}{{ line.errors }}{% else %}<div class="flex-container form-multiline">{% endif %}
{% for field in line %}
{% if field.is_fieldset %}<fieldset class="flex-container"{% if field.field.help_text %} aria-describedby="{{ field.field.id_for_label }}_helptext"{% endif %}>{{ field.label_tag }}{% endif %}
{% if field.is_fieldset %}<fieldset{% if field.field.help_text %} aria-describedby="{{ field.field.id_for_label }}_helptext"{% endif %}>{{ field.label_tag }}{% endif %}
<div>
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}
<div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% endif %}{% if field.is_checkbox %} checkbox-row{% endif %}">
Expand Down
1 change: 1 addition & 0 deletions django/db/backends/sqlite3/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def max_query_params(self):
32766) or lowered per connection at run-time with
setlimit(SQLITE_LIMIT_VARIABLE_NUMBER, N).
"""
self.connection.ensure_connection()
return self.connection.connection.getlimit(sqlite3.SQLITE_LIMIT_VARIABLE_NUMBER)

@cached_property
Expand Down
1 change: 0 additions & 1 deletion docs/intro/tutorial02.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ database:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, polls, sessions
Running migrations:
Rendering model states... DONE
Applying polls.0001_initial... OK

The :djadmin:`migrate` command takes all the migrations that haven't been
Expand Down
7 changes: 7 additions & 0 deletions docs/releases/6.0.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ Bugfixes
* Fixed a bug where management command colorized help (introduced in
Python 3.14) ignored the :option:`--no-color` option and the
:envvar:`DJANGO_COLORS` setting (:ticket:`36376`).

* Fixed a regression in Django 6.0 that caused
:meth:`~django.db.models.query.QuerySet.bulk_create` to crash
when introspecting the connection on SQLite (:ticket:`36818`).

* Fixed a visual regression in Django 6.0 for admin form fields grouped under a
``<fieldset>`` in Safari (:ticket:`36807`).
1 change: 0 additions & 1 deletion docs/topics/migrations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ database to make sure they work as expected:
Operations to perform:
Apply all migrations: books
Running migrations:
Rendering model states... DONE
Applying books.0003_auto... OK

Once the migration is applied, commit the migration and the models change
Expand Down
3 changes: 1 addition & 2 deletions tests/auth_tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,7 @@ def test_user_with_usable_password_change_password(self):
# Usable password field.
self.assertContains(
response,
'<fieldset class="flex-container">'
"<legend>Password-based authentication:</legend>",
"<fieldset><legend>Password-based authentication:</legend>",
)
# Submit buttons
self.assertContains(response, '<input type="submit" name="set-password"')
Expand Down
11 changes: 11 additions & 0 deletions tests/backends/sqlite/test_features.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import sqlite3
from unittest import mock, skipUnless

Expand Down Expand Up @@ -29,3 +30,13 @@ def test_max_query_params_respects_variable_limit(self):
finally:
connection.connection.setlimit(limit_name, current_limit)
self.assertEqual(connection.features.max_query_params, current_limit)

def test_max_query_params_without_established_connection(self):
new_connection = connection.copy()
new_connection.settings_dict = copy.deepcopy(connection.settings_dict)
self.assertIsNone(new_connection.connection)
try:
result = new_connection.features.max_query_params
self.assertIsInstance(result, int)
finally:
new_connection._close()
2 changes: 0 additions & 2 deletions tests/model_fields/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,6 @@ class GeneratedModelNull(models.Model):
expression=Lower("name"),
output_field=models.CharField(max_length=10),
db_persist=True,
null=True,
)

class Meta:
Expand All @@ -649,7 +648,6 @@ class GeneratedModelNullVirtual(models.Model):
expression=Lower("name"),
output_field=models.CharField(max_length=10),
db_persist=False,
null=True,
)

class Meta:
Expand Down