Updating some models to use max_length instead of the deprecated maxlength.
This commit is contained in:
parent
57d7a8f41a
commit
ea88ace9fa
3 changed files with 12 additions and 12 deletions
|
|
@ -5,8 +5,8 @@ class CommandAlias(models.Model):
|
||||||
Command aliases. If the player enters the value equal to user_input, the
|
Command aliases. If the player enters the value equal to user_input, the
|
||||||
command denoted by equiv_command is used instead.
|
command denoted by equiv_command is used instead.
|
||||||
"""
|
"""
|
||||||
user_input = models.CharField(maxlength=50)
|
user_input = models.CharField(max_length=50)
|
||||||
equiv_command = models.CharField(maxlength=50)
|
equiv_command = models.CharField(max_length=50)
|
||||||
|
|
||||||
class Admin:
|
class Admin:
|
||||||
list_display = ('user_input', 'equiv_command',)
|
list_display = ('user_input', 'equiv_command',)
|
||||||
|
|
@ -19,7 +19,7 @@ class ConfigValue(models.Model):
|
||||||
"""
|
"""
|
||||||
Experimental new config model.
|
Experimental new config model.
|
||||||
"""
|
"""
|
||||||
conf_key = models.CharField(maxlength=100)
|
conf_key = models.CharField(max_length=100)
|
||||||
conf_value = models.TextField()
|
conf_value = models.TextField()
|
||||||
|
|
||||||
class Admin:
|
class Admin:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ class HelpEntry(models.Model):
|
||||||
"""
|
"""
|
||||||
A generic help entry.
|
A generic help entry.
|
||||||
"""
|
"""
|
||||||
topicname = models.CharField(maxlength=255)
|
topicname = models.CharField(max_length=255)
|
||||||
entrytext = models.TextField(blank=True, null=True)
|
entrytext = models.TextField(blank=True, null=True)
|
||||||
staff_only = models.BooleanField(default=0)
|
staff_only = models.BooleanField(default=0)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ class Attribute(models.Model):
|
||||||
storing them directly. The added benefit is that we can add/remove
|
storing them directly. The added benefit is that we can add/remove
|
||||||
attributes on the fly as we like.
|
attributes on the fly as we like.
|
||||||
"""
|
"""
|
||||||
attr_name = models.CharField(maxlength=255)
|
attr_name = models.CharField(max_length=255)
|
||||||
attr_value = models.CharField(maxlength=255)
|
attr_value = models.CharField(max_length=255)
|
||||||
attr_hidden = models.BooleanField(default=0)
|
attr_hidden = models.BooleanField(default=0)
|
||||||
attr_object = models.ForeignKey("Object")
|
attr_object = models.ForeignKey("Object")
|
||||||
|
|
||||||
|
|
@ -88,8 +88,8 @@ class Object(models.Model):
|
||||||
We eventually want to find some way to implement object parents via loadable
|
We eventually want to find some way to implement object parents via loadable
|
||||||
modules or sub-classing.
|
modules or sub-classing.
|
||||||
"""
|
"""
|
||||||
name = models.CharField(maxlength=255)
|
name = models.CharField(max_length=255)
|
||||||
ansi_name = models.CharField(maxlength=255)
|
ansi_name = models.CharField(max_length=255)
|
||||||
owner = models.ForeignKey('self', related_name="obj_owner", blank=True, null=True)
|
owner = models.ForeignKey('self', related_name="obj_owner", blank=True, null=True)
|
||||||
zone = models.ForeignKey('self', related_name="obj_zone", blank=True, null=True)
|
zone = models.ForeignKey('self', related_name="obj_zone", blank=True, null=True)
|
||||||
home = models.ForeignKey('self', related_name="obj_home", blank=True, null=True)
|
home = models.ForeignKey('self', related_name="obj_home", blank=True, null=True)
|
||||||
|
|
@ -797,10 +797,10 @@ class CommChannel(models.Model):
|
||||||
"""
|
"""
|
||||||
The CommChannel class represents a comsys channel in the vein of MUX/MUSH.
|
The CommChannel class represents a comsys channel in the vein of MUX/MUSH.
|
||||||
"""
|
"""
|
||||||
name = models.CharField(maxlength=255)
|
name = models.CharField(max_length=255)
|
||||||
ansi_name = models.CharField(maxlength=255)
|
ansi_name = models.CharField(max_length=255)
|
||||||
owner = models.ForeignKey(Object, related_name="chan_owner")
|
owner = models.ForeignKey(Object, related_name="chan_owner")
|
||||||
description = models.CharField(maxlength=80)
|
description = models.CharField(max_length=80)
|
||||||
req_grp = models.ManyToManyField(Group, blank=True, null=True)
|
req_grp = models.ManyToManyField(Group, blank=True, null=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
@ -861,7 +861,7 @@ class CommChannelMessage(models.Model):
|
||||||
A single logged channel message.
|
A single logged channel message.
|
||||||
"""
|
"""
|
||||||
channel = models.ForeignKey(CommChannel, related_name="msg_channel")
|
channel = models.ForeignKey(CommChannel, related_name="msg_channel")
|
||||||
message = models.CharField(maxlength=255)
|
message = models.CharField(max_length=255)
|
||||||
date_sent = models.DateTimeField(editable=False, auto_now_add=True)
|
date_sent = models.DateTimeField(editable=False, auto_now_add=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue