Fix report form to use appropriate templates
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -226,9 +226,6 @@ class ReportRecord(models.Model):
|
||||
# If this report is urgent or not
|
||||
urgent = models.BooleanField(default=False)
|
||||
|
||||
# def urgent(self) -> bool:
|
||||
# return self.report_set().aggregate(
|
||||
|
||||
|
||||
class Report(models.Model):
|
||||
"""
|
||||
@@ -263,8 +260,25 @@ def report_created(sender, instance, created, **kwargs):
|
||||
instance.record.save()
|
||||
|
||||
|
||||
# class BanTemplate(models.Model):
|
||||
# board =
|
||||
|
||||
|
||||
class RangeBan(models.Model):
|
||||
# Starting IP address of the ban
|
||||
start = models.GenericIPAddressField()
|
||||
# Ending IP address of the ban
|
||||
end = models.GenericIPAddressField()
|
||||
# The reason for this ban
|
||||
ban_reason = models.TextField(blank=False)
|
||||
# The time that this ban was created.
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
# Expiration date of this ban. If it is null, it is permanent.
|
||||
expires = models.DateTimeField(null=True)
|
||||
|
||||
|
||||
class Ban(models.Model):
|
||||
# IP address of the reporter
|
||||
# IP address of the ban
|
||||
ip = models.GenericIPAddressField()
|
||||
# The reason for this ban
|
||||
ban_reason = models.TextField(blank=False)
|
||||
@@ -274,8 +288,8 @@ class Ban(models.Model):
|
||||
board = models.ForeignKey("Board", on_delete=models.CASCADE, null=True)
|
||||
# The time that this ban was created.
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
# Expiration date of this ban.
|
||||
expires = models.DateTimeField()
|
||||
# Expiration date of this ban. If it is null, it is permanent.
|
||||
expires = models.DateTimeField(null=True)
|
||||
|
||||
|
||||
class BanTemplate(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user