1
0
Fork 0

Add file header and dummy HTML method.

This commit is contained in:
Ariel Gerardo Ríos 2014-08-29 17:24:38 -03:00
parent 305d1c5c38
commit ce7e17b50c
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Model configuration in application ``django_mailbox`` for administration
console.
"""
import logging
from django.conf import settings
@ -7,6 +15,7 @@ from django_mailbox.models import MessageAttachment, Message, Mailbox
from django_mailbox.signals import message_received
from django_mailbox.utils import convert_header_to_unicode
logger = logging.getLogger(__name__)
@ -21,6 +30,8 @@ def resend_message_received_signal(message_admin, request, queryset):
for message in queryset.all():
logger.debug('Resending \'message_received\' signal for %s' % message)
message_received.send(sender=message_admin, message=message)
resend_message_received_signal.short_description = (
'Re-send message received signal'
)
@ -79,6 +90,7 @@ class MessageAdmin(admin.ModelAdmin):
)
readonly_fields = (
'text',
'html',
)
actions = [resend_message_received_signal]