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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
rev: "1.22.2"
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
args: [--target-version, "5.1"]
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
Expand Down
12 changes: 0 additions & 12 deletions accounts/hashers.py

This file was deleted.

15 changes: 2 additions & 13 deletions accounts/migrations/0002_migrate_sha1_passwords.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
from django.db import migrations

from ..hashers import PBKDF2WrappedSHA1PasswordHasher


def forwards_func(apps, schema_editor):
User = apps.get_model("auth", "User")
users = User.objects.filter(password__startswith="sha1$")
hasher = PBKDF2WrappedSHA1PasswordHasher()
for user in users:
algorithm, salt, sha1_hash = user.password.split("$", 2)
user.password = hasher.encode_sha1_hash(sha1_hash, salt)
user.save(update_fields=["password"])


class Migration(migrations.Migration):

Expand All @@ -21,5 +9,6 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunPython(forwards_func),
# See git history of this file for why this migration is empty
migrations.RunPython(migrations.RunPython.noop),
]
21 changes: 0 additions & 21 deletions accounts/test_hashers.py

This file was deleted.

2 changes: 1 addition & 1 deletion aggregator/migrations/0004_add_local_django_community.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ class Migration(migrations.Migration):
),
migrations.AddConstraint(
model_name='localdjangocommunity',
constraint=models.CheckConstraint(check=models.Q(models.Q(('event_site_url__isnull', False), ('website_url__isnull', False)), models.Q(('event_site_url__isnull', False), ('website_url__isnull', True)), models.Q(('event_site_url__isnull', True), ('website_url__isnull', False)), _connector='OR'), name='website_url_and_or_event_site_url'),
constraint=models.CheckConstraint(condition=models.Q(models.Q(('event_site_url__isnull', False), ('website_url__isnull', False)), models.Q(('event_site_url__isnull', False), ('website_url__isnull', True)), models.Q(('event_site_url__isnull', True), ('website_url__isnull', False)), _connector='OR'), name='website_url_and_or_event_site_url'),
),
]
2 changes: 1 addition & 1 deletion aggregator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Meta:
verbose_name_plural = _("Local Django Communities")
constraints = [
models.CheckConstraint(
check=(
condition=(
models.Q(website_url__isnull=False, event_site_url__isnull=False)
| models.Q(website_url__isnull=True, event_site_url__isnull=False)
| models.Q(website_url__isnull=False, event_site_url__isnull=True)
Expand Down
5 changes: 0 additions & 5 deletions djangoproject/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@
"django_hosts.middleware.HostsResponseMiddleware",
]

PASSWORD_HASHERS = [
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"accounts.hashers.PBKDF2WrappedSHA1PasswordHasher",
]

ROOT_URLCONF = "djangoproject.urls.www"

SECRET_KEY = str(SECRETS["secret_key"])
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-push @ git+https://github.com/brutasse/django-push.git@22fda99641cfbd2f30
django-read-only==1.18.0
django-recaptcha==4.0.0
django-registration-redux==2.13
Django==5.0.11
Django==5.1.5
docutils==0.21.2
feedparser==6.0.11
Jinja2==3.1.5
Expand Down
1 change: 1 addition & 0 deletions tracdb/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def _replace_primary_key_field_with_autofield(model, schema_editor):
new `testid` autofield. This makes the models easier to manipulate in the tests.
"""
old_pk_field = _get_pk_field(model)
del old_pk_field.unique
new_pk_field = deepcopy(old_pk_field)
new_pk_field.primary_key = False
schema_editor.alter_field(
Expand Down
Loading