I am creating a sports app which allows users to create their own leagues and invite their friends to play. Ideally I would like to password protect the league. This is the table as it currently stands:
class StraightRedPersonalLeague(models.Model):
seasonid = models.IntegerField(primary_key = True)
personalleaguelongname = models.CharField(max_length=36)
personalleagueshortname = models.CharField(max_length=24)
leaguepassword = ????
leagueispublic = models.NullBooleanField(null=True)
soccerseason = models.ForeignKey('straightred.StraightredSeason', db_column='soccerseasonid', related_name='personalleague_seasonUserSelection')
class Meta:
managed = True
db_table = 'straightred_personalleague'
I have had a search on stackoverflow and found the following:
How to create Password Field in Model django
The answer wasn't accepted but has had some upvotes. Is it safe to store the password as a charfield? If so I assume the forms.PasswordInput
is the part that is doing all the "magic" regards security.
Any advice on this security issue would be appreciated.