renamed call_ by summons_

clubs
Laurent 2 years ago
parent 77a22dae15
commit 5a8919b9a6
  1. 38
      tournaments/migrations/0039_rename_call_display_entry_fee_customuser_summons_display_entry_fee_and_more.py
  2. 23
      tournaments/models/custom_user.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',
),
]

@ -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):

Loading…
Cancel
Save