Skip to content

Commit

Permalink
New User.kind choice: INDIVIDUAL
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Dec 4, 2023
1 parent 6791d58 commit 7960db3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lemarche/stats/migrations/0008_alter_tracker_user_kind.py
Original file line number Diff line number Diff line change
@@ -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,
),
),
]
3 changes: 3 additions & 0 deletions lemarche/users/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
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

KIND_CHOICES = (
(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),)

Expand Down
28 changes: 28 additions & 0 deletions lemarche/users/migrations/0032_alter_user_kind.py
Original file line number Diff line number Diff line change
@@ -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",
),
),
]

0 comments on commit 7960db3

Please sign in to comment.