mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-11 09:36:24 +01:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user