Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Hide the password field
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 31, 2021
1 parent 7bc8325 commit f09817a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/paperless_mail/admin.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
from django.contrib import admin
from django import forms
from paperless_mail.models import MailAccount, MailRule

from django.utils.translation import gettext_lazy as _


class MailAccountAdminForm(forms.ModelForm):

"""Metadata classes uset in Django admin to display the form."""

class Meta:

"""Metadata class uset in Django admin to display the form."""

model = MailAccount
widgets = {
'password': forms.PasswordInput(),
}
fields = '__all__'


class MailAccountAdmin(admin.ModelAdmin):

list_display = ("name", "imap_server", "username")
Expand All @@ -19,6 +35,7 @@ class MailAccountAdmin(admin.ModelAdmin):
'fields': ['character_set']
})
]
form = MailAccountAdminForm


class MailRuleAdmin(admin.ModelAdmin):
Expand Down

0 comments on commit f09817a

Please sign in to comment.