Add datetime to auditlog entries.

Also, change ordering, add pagination, and stripe the table for increased readability.

Action column now also reads "Removed" when a user is removed from a group. Note that this does not change anything on the back-end, so if you use this data for anything else, be aware that while the template is explicit, the data isn't as explicit.
This commit is contained in:
colcrunch
2019-03-12 09:53:43 +00:00
committed by Basraah
parent 7dec4deb70
commit f72f539516
7 changed files with 83 additions and 29 deletions

View File

@@ -4,6 +4,7 @@ from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from allianceauth.authentication.models import State
from datetime import datetime
class GroupRequest(models.Model):
@@ -30,6 +31,7 @@ class RequestLog(models.Model):
request_info = models.CharField(max_length=254)
action = models.BooleanField(default=0)
request_actor = models.ForeignKey(User, on_delete=models.CASCADE)
date = models.DateTimeField(auto_now_add=datetime.utcnow())
def requestor(self):
return self.request_info.split(":")[0]