🔨(backend) make the 'language' attribute on the User model nullable

- allow the language on the user to be unset
- set the default language to be unset
- helps us determine that the user has yet to set a language preference
This commit is contained in:
rvveber
2025-02-25 15:08:59 +01:00
committed by Samuel Paccoud
parent b24acd14e2
commit 9a79b09b07
2 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
# Generated by Django 5.1.5 on 2025-03-04 12:23
from django.db import migrations, models
import core.models
class Migration(migrations.Migration):
dependencies = [
("core", "0018_update_blank_title"),
]
operations = [
migrations.AlterModelManagers(
name="user",
managers=[
("objects", core.models.UserManager()),
],
),
migrations.AlterField(
model_name="user",
name="language",
field=models.CharField(
blank=True,
choices=[
("en-us", "English"),
("fr-fr", "Français"),
("de-de", "Deutsch"),
],
default=None,
help_text="The language in which the user wants to see the interface.",
max_length=10,
null=True,
verbose_name="language",
),
),
]