diff --git a/guild/migrations/0004_alter_playsession_options_player_address.py b/guild/migrations/0004_alter_playsession_options_player_address.py new file mode 100644 index 0000000..81c2c68 --- /dev/null +++ b/guild/migrations/0004_alter_playsession_options_player_address.py @@ -0,0 +1,25 @@ +# Generated by Django 4.2.1 on 2023-06-19 18:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("guild", "0003_character_status"), + ] + + operations = [ + migrations.AlterModelOptions( + name="playsession", + options={ + "ordering": ["-date"], + "verbose_name": "playsession", + "verbose_name_plural": "playsessions", + }, + ), + migrations.AddField( + model_name="player", + name="address", + field=models.TextField(blank=True, verbose_name="address"), + ), + ] diff --git a/guild/models.py b/guild/models.py index c1fc8c4..411a201 100644 --- a/guild/models.py +++ b/guild/models.py @@ -6,6 +6,8 @@ from django.utils.translation import gettext as _ class Player(models.Model): name = models.CharField(max_length=255, unique=True) + address = models.TextField(_("address"), blank=True) + class Meta: verbose_name = _("player") verbose_name_plural = _("players") diff --git a/guild/templates/guild/player_detail.html b/guild/templates/guild/player_detail.html index b940856..9a77efd 100644 --- a/guild/templates/guild/player_detail.html +++ b/guild/templates/guild/player_detail.html @@ -13,6 +13,10 @@ + +
{{ player.address|linebreaks }}
+