title: Django Model Password Field Security
body: <p>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:</p>
  
  <pre><code>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'
  </code></pre>
  
  <p>I have had a search on stackoverflow and found the following:</p>
  
  <p><a href="https://stackoverflow.com/questions/17523263/how-to-create-password-field-in-model-django">How to create Password Field in Model django</a></p>
  
  <p>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 <code>forms.PasswordInput</code> is the part that is doing all the "magic" regards security.</p>
  
  <p>Any advice on this security issue would be appreciated.</p>