##// END OF EJS Templates
Made ban object show IP in 'str' method instead of 'unicode' which was user...
neko259 -
r798:a4412d93 decentral
parent child Browse files
Show More
@@ -1,20 +1,20 b''
1 1 from django.db import models
2 2
3 3 __author__ = 'neko259'
4 4
5 5 BAN_REASON_AUTO = 'Auto'
6 6 BAN_REASON_MAX_LENGTH = 200
7 7
8 8
9 9 class Ban(models.Model):
10 10
11 11 class Meta:
12 12 app_label = 'boards'
13 13
14 14 ip = models.GenericIPAddressField()
15 15 reason = models.CharField(default=BAN_REASON_AUTO,
16 16 max_length=BAN_REASON_MAX_LENGTH)
17 17 can_read = models.BooleanField(default=True)
18 18
19 def __unicode__(self):
19 def __str__(self):
20 20 return self.ip
General Comments 0
You need to be logged in to leave comments. Login now