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 12cec72
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/paperless_mail/admin.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
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 used by Django admin to display the form."""

class Meta:
"""Metadata class used by 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 +33,7 @@ class MailAccountAdmin(admin.ModelAdmin):
'fields': ['character_set']
})
]
form = MailAccountAdminForm


class MailRuleAdmin(admin.ModelAdmin):
Expand Down

0 comments on commit 12cec72

Please sign in to comment.