django admin site make CharField a PasswordInput
        Posted  
        
            by Paul
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Paul
        
        
        
        Published on 2010-05-11T13:20:27Z
        Indexed on 
            2010/05/11
            13:24 UTC
        
        
        Read the original article
        Hit count: 406
        
I have a Django site in which the site admin inputs their Twitter Username/Password in order to use the Twitter API. The Model is set up like this:
class TwitterUser(models.Model):
screen_name = models.CharField(max_length=100)
password = models.CharField(max_length=255)
def __unicode__(self):
    return self.screen_name
I need the Admin site to display the password field as a password input, but can't seem to figure out how to do it.   I have tried using a ModelAdmin class, a ModelAdmin with a ModelForm, but can't seem to figure out how to make django display that form as a password input...
© Stack Overflow or respective owner