Projet

Général

Profil

0001-multitenant-support-custom-admin-email-handler-55824.patch

Valentin Deniaud, 26 juillet 2021 14:04

Télécharger (1,11 ko)

Voir les différences:

Subject: [PATCH] multitenant: support custom admin email handler (#55824)

 hobo/multitenant/log.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
hobo/multitenant/log.py
14 14
# You should have received a copy of the GNU Affero General Public License
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17
import django.utils.log
17
from django.conf import settings
18 18
from django.db import connection
19
from django.utils.module_loading import import_string
19 20

  
21
BaseAdminEmailHandler = import_string(
22
    getattr(settings, 'ADMIN_EMAIL_HANDLER_CLASS', 'django.utils.log.AdminEmailHandler')
23
)
20 24

  
21
class AdminEmailHandler(django.utils.log.AdminEmailHandler):
25

  
26
class AdminEmailHandler(BaseAdminEmailHandler):
22 27
    def format_subject(self, subject):
23 28
        from .models import Tenant
24 29

  
25
-