Skip to content

Commit

Permalink
Clarified field visibility in members admin
Browse files Browse the repository at this point in the history
Co-authored-by: Baptiste Mispelon <bmispelon@gmail.com>
  • Loading branch information
mxsasha and bmispelon committed Jun 9, 2024
1 parent c1e817c commit 267fc36
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2024-06-09 07:32

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('members', '0008_auto_20181001_1031'),
]

operations = [
migrations.AlterField(
model_name='individualmember',
name='reason_for_leaving',
field=models.TextField(blank=True, help_text='⚠️ This reason is publicly displayed on the website. <strong>Do not include confidential details.</strong>'),
),
]
9 changes: 8 additions & 1 deletion members/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.safestring import mark_safe
from django.views.generic.dates import timezone_today
from django_hosts import reverse
from sorl.thumbnail import ImageField, get_thumbnail
Expand Down Expand Up @@ -38,7 +39,13 @@ class IndividualMember(models.Model):
email = models.EmailField(unique=True)
member_since = models.DateField(default=timezone_today)
member_until = models.DateField(null=True, blank=True)
reason_for_leaving = models.TextField(blank=True)
reason_for_leaving = models.TextField(
blank=True,
help_text=mark_safe(
"⚠️ This reason is publicly displayed on the website. "
"<strong>Do not include confidential details.</strong>"
),
)

class Meta:
ordering = ["name"]
Expand Down

0 comments on commit 267fc36

Please sign in to comment.