diff --git a/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py b/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py
new file mode 100644
index 00000000..6d086c89
--- /dev/null
+++ b/allianceauth/groupmanagement/migrations/0015_make_descriptions_great_again.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.1.2 on 2020-10-25 11:09
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("groupmanagement", "0014_auto_20200918_1412"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="authgroup",
+ name="description",
+ field=models.TextField(
+ blank=True,
+ help_text="Short description (max. 512 characters) of the group shown to users.",
+ max_length=512,
+ null=True,
+ ),
+ ),
+ ]
diff --git a/allianceauth/groupmanagement/models.py b/allianceauth/groupmanagement/models.py
index 035b9ba2..e36f7e2d 100644
--- a/allianceauth/groupmanagement/models.py
+++ b/allianceauth/groupmanagement/models.py
@@ -55,7 +55,6 @@ class RequestLog(models.Model):
return user.profile.main_character
-
class AuthGroup(models.Model):
"""
Extends Django Group model with a one-to-one field
@@ -76,46 +75,75 @@ class AuthGroup(models.Model):
Open - Users are automatically accepted into the group
Not Open - Users requests must be approved before they are added to the group
"""
+
group = models.OneToOneField(Group, on_delete=models.CASCADE, primary_key=True)
- internal = models.BooleanField(default=True,
- help_text="Internal group, users cannot see, join or request to join this group.
"
- "Used for groups such as Members, Corp_*, Alliance_* etc.
"
- "Overrides Hidden and Open options when selected.")
- hidden = models.BooleanField(default=True,
- help_text="Group is hidden from users but can still join with the correct link.")
- open = models.BooleanField(default=False,
- help_text="Group is open and users will be automatically added upon request.
"
- "If the group is not open users will need their request manually approved.")
- public = models.BooleanField(default=False,
- help_text="Group is public. Any registered user is able to join this group, with "
- "visibility based on the other options set for this group.
Auth will "
- "not remove users from this group automatically when they are no longer "
- "authenticated.")
+ internal = models.BooleanField(
+ default=True,
+ help_text="Internal group, users cannot see, join or request to join this group.
"
+ "Used for groups such as Members, Corp_*, Alliance_* etc.
"
+ "Overrides Hidden and Open options when selected.",
+ )
+
+ hidden = models.BooleanField(
+ default=True,
+ help_text="Group is hidden from users but can still join with the correct link.",
+ )
+
+ open = models.BooleanField(
+ default=False,
+ help_text="Group is open and users will be automatically added upon request.
"
+ "If the group is not open users will need their request manually approved.",
+ )
+
+ public = models.BooleanField(
+ default=False,
+ help_text="Group is public. Any registered user is able to join this group, with "
+ "visibility based on the other options set for this group.
Auth will "
+ "not remove users from this group automatically when they are no longer "
+ "authenticated.",
+ )
+
# Group leaders have management access to this group
- group_leaders = models.ManyToManyField(User, related_name='leads_groups', blank=True,
- help_text="Group leaders can process group requests for this group "
- "specifically. Use the auth.group_management permission to allow "
- "a user to manage all groups.")
+ group_leaders = models.ManyToManyField(
+ User,
+ related_name="leads_groups",
+ blank=True,
+ help_text="Group leaders can process group requests for this group "
+ "specifically. Use the auth.group_management permission to allow "
+ "a user to manage all groups.",
+ )
+
# allow groups to be *group leads*
- group_leader_groups = models.ManyToManyField(Group, related_name='leads_group_groups', blank=True,
- help_text="Group leaders can process group requests for this group "
- "specifically. Use the auth.group_management permission to allow "
- "a user to manage all groups.")
+ group_leader_groups = models.ManyToManyField(
+ Group,
+ related_name="leads_group_groups",
+ blank=True,
+ help_text="Group leaders can process group requests for this group "
+ "specifically. Use the auth.group_management permission to allow "
+ "a user to manage all groups.",
+ )
- states = models.ManyToManyField(State, related_name='valid_states', blank=True,
- help_text="States listed here will have the ability to join this group provided "
- "they have the proper permissions.")
+ states = models.ManyToManyField(
+ State,
+ related_name="valid_states",
+ blank=True,
+ help_text="States listed here will have the ability to join this group provided "
+ "they have the proper permissions.",
+ )
- description = models.CharField(max_length=512, blank=True, help_text="Description of the group shown to users.")
+ description = models.TextField(
+ max_length=512,
+ null=True,
+ blank=True,
+ help_text="Short description (max. 512 characters) of the group shown to users.",
+ )
def __str__(self):
return self.group.name
class Meta:
- permissions = (
- ("request_groups", u"Can request non-public groups"),
- )
+ permissions = (("request_groups", u"Can request non-public groups"),)
default_permissions = tuple()
diff --git a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html
index c2291f7f..0aa53fac 100644
--- a/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html
+++ b/allianceauth/groupmanagement/templates/groupmanagement/groupmembership.html
@@ -25,7 +25,7 @@