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

Hide the password field #1512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 +35,7 @@ class MailAccountAdmin(admin.ModelAdmin):
'fields': ['character_set']
})
]
form = MailAccountAdminForm


class MailRuleAdmin(admin.ModelAdmin):
Expand Down