On 05/27/06 13:23, Christian Schneider wrote: > Hi all, > > can I specify that a certain model field should be displayed as <input > type="password" /> in the UI? > > I think I saw once how to do it but can't find it anymore. > > chris >
Hi Chris The following works for me: class PasswordField(models.CharField): def get_manipulator_field_objs(self): return [forms.PasswordField] def get_internal_type(self): return 'CharField' class MyModel(models.Model): ... password = PasswordField(_('Password'), maxlength=50) ... hth cheers Steven --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---