From 7960db3a092963e61838e3f262966f309fb02d85 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 4 Dec 2023 15:39:09 +0100 Subject: [PATCH] New User.kind choice: INDIVIDUAL --- .../0008_alter_tracker_user_kind.py | 27 ++++++++++++++++++ lemarche/users/constants.py | 3 ++ .../users/migrations/0032_alter_user_kind.py | 28 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 lemarche/stats/migrations/0008_alter_tracker_user_kind.py create mode 100644 lemarche/users/migrations/0032_alter_user_kind.py diff --git a/lemarche/stats/migrations/0008_alter_tracker_user_kind.py b/lemarche/stats/migrations/0008_alter_tracker_user_kind.py new file mode 100644 index 000000000..e16c87f73 --- /dev/null +++ b/lemarche/stats/migrations/0008_alter_tracker_user_kind.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.2 on 2023-12-04 14:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("stats", "0007_tracker_siae_kind_and_contact_email"), + ] + + operations = [ + migrations.AlterField( + model_name="tracker", + name="user_kind", + field=models.CharField( + blank=True, + choices=[ + ("SIAE", "Structure"), + ("BUYER", "Acheteur"), + ("PARTNER", "Partenaire"), + ("INDIVIDUAL", "Particulier"), + ("ADMIN", "Administrateur"), + ], + max_length=20, + ), + ), + ] diff --git a/lemarche/users/constants.py b/lemarche/users/constants.py index 3d9dc091c..385a46567 100644 --- a/lemarche/users/constants.py +++ b/lemarche/users/constants.py @@ -4,6 +4,8 @@ KIND_BUYER_DISPLAY = "Acheteur" KIND_PARTNER = "PARTNER" KIND_PARTNER_DISPLAY = "Partenaire" +KIND_INDIVIDUAL = "INDIVIDUAL" +KIND_INDIVIDUAL_DISPLAY = "Particulier" KIND_ADMIN = "ADMIN" KIND_ADMIN_DISPLAY = "Administrateur" # Administrateur.trice @@ -11,6 +13,7 @@ (KIND_SIAE, KIND_SIAE_DISPLAY), (KIND_BUYER, KIND_BUYER_DISPLAY), (KIND_PARTNER, KIND_PARTNER_DISPLAY), + (KIND_INDIVIDUAL, KIND_INDIVIDUAL_DISPLAY), ) KIND_CHOICES_WITH_ADMIN = KIND_CHOICES + ((KIND_ADMIN, KIND_ADMIN_DISPLAY),) diff --git a/lemarche/users/migrations/0032_alter_user_kind.py b/lemarche/users/migrations/0032_alter_user_kind.py new file mode 100644 index 000000000..cc035f5ed --- /dev/null +++ b/lemarche/users/migrations/0032_alter_user_kind.py @@ -0,0 +1,28 @@ +# Generated by Django 4.2.2 on 2023-12-04 14:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("users", "0031_user_rename_buyer_kind_detail_display"), + ] + + operations = [ + migrations.AlterField( + model_name="user", + name="kind", + field=models.CharField( + blank=True, + choices=[ + ("SIAE", "Structure"), + ("BUYER", "Acheteur"), + ("PARTNER", "Partenaire"), + ("INDIVIDUAL", "Particulier"), + ("ADMIN", "Administrateur"), + ], + max_length=20, + verbose_name="Type", + ), + ), + ]