From 5a8919b9a67516d7815d21aace0410462bcf765f Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 8 May 2024 14:07:03 +0200 Subject: [PATCH] renamed call_ by summons_ --- ...user_summons_display_entry_fee_and_more.py | 38 +++++++++++++++++++ tournaments/models/custom_user.py | 23 ++++++----- 2 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 tournaments/migrations/0039_rename_call_display_entry_fee_customuser_summons_display_entry_fee_and_more.py diff --git a/tournaments/migrations/0039_rename_call_display_entry_fee_customuser_summons_display_entry_fee_and_more.py b/tournaments/migrations/0039_rename_call_display_entry_fee_customuser_summons_display_entry_fee_and_more.py new file mode 100644 index 0000000..54473b6 --- /dev/null +++ b/tournaments/migrations/0039_rename_call_display_entry_fee_customuser_summons_display_entry_fee_and_more.py @@ -0,0 +1,38 @@ +# Generated by Django 4.2.11 on 2024-05-08 11:37 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0038_alter_event_club'), + ] + + operations = [ + migrations.RenameField( + model_name='customuser', + old_name='call_display_entry_fee', + new_name='summons_display_entry_fee', + ), + migrations.RenameField( + model_name='customuser', + old_name='call_display_format', + new_name='summons_display_format', + ), + migrations.RenameField( + model_name='customuser', + old_name='call_message_body', + new_name='summons_message_body', + ), + migrations.RenameField( + model_name='customuser', + old_name='call_message_signature', + new_name='summons_message_signature', + ), + migrations.RenameField( + model_name='customuser', + old_name='call_use_full_custom_message', + new_name='summons_use_full_custom_message', + ), + ] diff --git a/tournaments/models/custom_user.py b/tournaments/models/custom_user.py index 7e053c4..6fddf2b 100644 --- a/tournaments/models/custom_user.py +++ b/tournaments/models/custom_user.py @@ -14,13 +14,11 @@ class CustomUser(AbstractUser): licence_id = models.CharField(max_length=10, null=True, blank=True) country = models.CharField(max_length=40, null=True, blank=True) - #taille infini? - call_message_body = models.TextField(blank=True, null=True) - - call_message_signature = models.TextField(blank=True, null=True) - call_display_format = models.BooleanField(default=False) - call_display_entry_fee = models.BooleanField(default=False) - call_use_full_custom_message = models.BooleanField(default=False) + summons_message_body = models.TextField(blank=True, null=True) + summons_message_signature = models.TextField(blank=True, null=True) + summons_display_format = models.BooleanField(default=False) + summons_display_entry_fee = models.BooleanField(default=False) + summons_use_full_custom_message = models.BooleanField(default=False) match_formats_default_duration = models.JSONField(blank=True, null=True) @@ -28,11 +26,16 @@ class CustomUser(AbstractUser): group_stage_match_format_preference = models.IntegerField(default=enums.FederalMatchCategory.NINE_GAMES, choices=enums.FederalMatchCategory.choices, null=True, blank=True) loser_bracket_match_format_preference = models.IntegerField(default=enums.FederalMatchCategory.NINE_GAMES, choices=enums.FederalMatchCategory.choices, null=True, blank=True) + ### ### ### ### ### ### ### ### ### ### ### WARNING ### ### ### ### ### ### ### ### ### ### + ### WARNING : Any added field MUST be inserted in the method below: fields_for_update() ### + ### ### ### ### ### ### ### ### ### ### ### WARNING ### ### ### ### ### ### ### ### ### ### + def fields_for_update(): # returns the list of fields to update without password - return ['id', 'username', 'email', 'umpire_code', 'clubs', 'phone', 'first_name', 'last_name', 'licence_id', 'country', - 'call_message_body', 'call_message_signature', 'call_display_format', 'call_display_entry_fee', - 'call_use_full_custom_message', 'match_formats_default_duration', 'bracket_match_format_preference', + return ['id', 'username', 'email', 'umpire_code', 'clubs', 'phone', 'first_name', 'last_name', + 'licence_id', 'country', + 'summons_message_body', 'summons_message_signature', 'summons_display_format', 'summons_display_entry_fee', + 'summons_use_full_custom_message', 'match_formats_default_duration', 'bracket_match_format_preference', 'group_stage_match_format_preference', 'loser_bracket_match_format_preference'] def __str__(self):