Skip to content

Commit c632d1e

Browse files
authored
Merge pull request #1384 from opengisch/QF-6361-remove-django-cryptography-dependency
chore: drop `django_cryptography` dependency
2 parents 572f33f + 1fcd188 commit c632d1e

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

docker-app/qfieldcloud/core/migrations/0052_secret.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import django.core.validators
44
import django.db.models.deletion
5-
import django_cryptography.fields
65
from django.db import migrations, models
76

87

@@ -65,7 +64,7 @@ class Migration(migrations.Migration):
6564
to="core.user",
6665
),
6766
),
68-
("value", django_cryptography.fields.encrypt(models.TextField())),
67+
("value", models.TextField()),
6968
],
7069
),
7170
]

docker-app/qfieldcloud/core/migrations/0086_secret_new_value.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Generated by Django 4.2.19 on 2025-07-14 09:01
22

3-
import django_cryptography.fields
43
from django.db import migrations, models
54
from encrypted_fields.fields import EncryptedTextField
65

@@ -47,9 +46,7 @@ class Migration(migrations.Migration):
4746
migrations.AlterField(
4847
model_name="secret",
4948
name="old_value",
50-
field=django_cryptography.fields.encrypt(
51-
models.TextField(blank=True, null=True)
52-
),
49+
field=models.TextField(blank=True, null=True),
5350
),
5451
migrations.RunPython(
5552
migrations.RunPython.noop,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated by Django 4.2.25 on 2025-10-15 06:35
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("core", "0089_remove_project_is_locked_project_locked_at"),
9+
]
10+
11+
operations = [
12+
migrations.RemoveField(
13+
model_name="secret",
14+
name="old_value",
15+
),
16+
]

docker-app/qfieldcloud/core/models.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from typing import TYPE_CHECKING, Any, cast
1111
from uuid import uuid4
1212

13-
import django_cryptography.fields
1413
from deprecated import deprecated
1514
from django.conf import settings
1615
from django.contrib.auth.models import AbstractUser
@@ -2590,12 +2589,6 @@ class Type(models.TextChoices):
25902589

25912590
created_at = models.DateTimeField(auto_now_add=True)
25922591

2593-
# TODO Remove with QF-6361 Remove legacy `django_cryptography`'s encrypted field support
2594-
# legacy field to store the encrypted value of the secret.
2595-
old_value = django_cryptography.fields.encrypt(
2596-
models.TextField(blank=True, null=True)
2597-
)
2598-
25992592
# encrypted value of the secret.
26002593
value = EncryptedTextField()
26012594

docker-app/requirements/requirements.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ django-common-helpers==0.9.2
1111
django-constance==4.3.2
1212
django-countries==7.6.1
1313
django-cron==0.6.0
14-
django-cryptography==1.1
1514
django-currentuser==0.9.0
1615
django-debug-toolbar==6.0.0
1716
django-extensions==4.1

docker-app/requirements/requirements.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ charset-normalizer==3.4.3
3636
# via requests
3737
cryptography==45.0.6
3838
# via
39-
# django-cryptography
4039
# django-fernet-encrypted-fields
4140
# pyjwt
4241
deprecated==1.2.18
@@ -45,14 +44,12 @@ django==4.2.25
4544
# via
4645
# -r /requirements/requirements.in
4746
# django-allauth
48-
# django-appconf
4947
# django-auditlog
5048
# django-axes
5149
# django-bootstrap4
5250
# django-classy-tags
5351
# django-common-helpers
5452
# django-cron
55-
# django-cryptography
5653
# django-currentuser
5754
# django-debug-toolbar
5855
# django-extensions
@@ -76,8 +73,6 @@ django==4.2.25
7673
# jsonfield
7774
django-allauth[socialaccount]==65.11.1
7875
# via -r /requirements/requirements.in
79-
django-appconf==1.1.0
80-
# via django-cryptography
8176
django-auditlog==3.2.1
8277
# via -r /requirements/requirements.in
8378
django-axes==7.0.2
@@ -96,8 +91,6 @@ django-countries==7.6.1
9691
# via -r /requirements/requirements.in
9792
django-cron==0.6.0
9893
# via -r /requirements/requirements.in
99-
django-cryptography==1.1
100-
# via -r /requirements/requirements.in
10194
django-currentuser==0.9.0
10295
# via -r /requirements/requirements.in
10396
django-debug-toolbar==6.0.0

0 commit comments

Comments
 (0)