Exemplo n.º 1
0
from django.conf.urls import patterns, url
from django.contrib import messages
from django.contrib import admin

from dbmail.models import (
    MailCategory, MailTemplate, MailLog, MailLogEmail, Signal, ApiKey, MailBcc,
    MailGroup, MailGroupEmail, MailFile, MailFromEmail, MailBaseTemplate,
    MailFromEmailCredential, MailLogTrack, MailSubscription
)
from dbmail import app_installed
from dbmail import get_model
from dbmail import defaults

ModelAdmin = admin.ModelAdmin

if app_installed('reversion'):
    try:
        from reversion import VersionAdmin

        ModelAdmin = VersionAdmin
    except ImportError:
        pass

if app_installed('reversion_compare'):
    try:
        from reversion_compare.admin import CompareVersionAdmin

        ModelAdmin = CompareVersionAdmin
    except ImportError:
        pass
Exemplo n.º 2
0
from django.conf.urls import patterns, url
from django.contrib import messages
from django.contrib import admin

from dbmail.models import (MailCategory, MailTemplate, MailLog, MailLogEmail,
                           Signal, ApiKey, MailBcc, MailGroup, MailGroupEmail,
                           MailFile, MailFromEmail, MailBaseTemplate,
                           MailFromEmailCredential, MailLogTrack,
                           MailSubscription)
from dbmail import app_installed
from dbmail import get_model
from dbmail import defaults

ModelAdmin = admin.ModelAdmin

if app_installed('reversion'):
    try:
        from reversion import VersionAdmin

        ModelAdmin = VersionAdmin
    except ImportError:
        pass

if app_installed('reversion_compare'):
    try:
        from reversion_compare.admin import CompareVersionAdmin

        ModelAdmin = CompareVersionAdmin
    except ImportError:
        pass
Exemplo n.º 3
0
from django.conf.urls import patterns, url
from django.db.models import get_model
from django.contrib import messages
from django.contrib import admin

from dbmail.models import (
    MailCategory, MailTemplate, MailLog, MailLogEmail, Signal, ApiKey, MailBcc,
    MailGroup, MailGroupEmail, MailFile, MailFromEmail,
    MailFromEmailCredential, MailLogTrack
)
from dbmail import app_installed
from dbmail import defaults

ModelAdmin = admin.ModelAdmin

if app_installed('reversion'):
    try:
        from reversion import VersionAdmin

        ModelAdmin = VersionAdmin
    except ImportError:
        pass

if app_installed('reversion_compare'):
    try:
        from reversion_compare.admin import CompareVersionAdmin

        ModelAdmin = CompareVersionAdmin
    except ImportError:
        pass
# -*- encoding: utf-8 -*-

from django.db import models

from dbmail import app_installed

HTMLField = models.TextField
DataTextField = models.TextField

if app_installed('tinymce'):
    try:
        from tinymce.models import HTMLField

    except ImportError:
        pass
elif app_installed('ckeditor'):
    try:
        from ckeditor.fields import RichTextField as HTMLField

    except ImportError:
        pass
Exemplo n.º 5
0
# -*- encoding: utf-8 -*-

from django.db import models

from dbmail import app_installed

HTMLField = models.TextField

if app_installed('tinymce'):
    try:
        from tinymce.models import HTMLField

    except ImportError:
        pass

if app_installed('ckeditor'):
    try:
        from ckeditor.fields import RichTextField as HTMLField

    except ImportError:
        pass
Exemplo n.º 6
0
from django.core.urlresolvers import reverse
from django.conf.urls import patterns, url
from django.db.models import get_model
from django.contrib import messages
from django.contrib import admin

from dbmail.models import (MailCategory, MailTemplate, MailLog, MailLogEmail,
                           Signal, ApiKey, MailBcc, MailGroup, MailGroupEmail,
                           MailFile, MailFromEmail, MailFromEmailCredential,
                           MailLogTrack)
from dbmail import app_installed
from dbmail import defaults

ModelAdmin = admin.ModelAdmin

if app_installed('reversion'):
    try:
        from reversion import VersionAdmin

        ModelAdmin = VersionAdmin
    except ImportError:
        pass

if app_installed('reversion_compare'):
    try:
        from reversion_compare.admin import CompareVersionAdmin

        ModelAdmin = CompareVersionAdmin
    except ImportError:
        pass
Exemplo n.º 7
0
# -*- encoding: utf-8 -*-

from django.db import models

from dbmail import app_installed

HTMLField = models.TextField

if app_installed('tinymce'):
    try:
        from tinymce.models import HTMLField

    except ImportError:
        pass
Exemplo n.º 8
0
from django.core.urlresolvers import reverse
from django.conf.urls import patterns, url
from django.db.models import get_model
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured

from dbmail.models import (
    MailCategory, MailTemplate, MailLog, MailLogEmail, Signal, ApiKey, MailBcc,
    MailGroup, MailGroupEmail, MailFile, MailFromEmail, MailFromEmailCredential
)
from dbmail import app_installed
from dbmail import defaults

ModelAdmin = admin.ModelAdmin

if app_installed('reversion'):
    try:
        from reversion import VersionAdmin

        ModelAdmin = VersionAdmin
    except ImportError:
        pass


class MailCategoryAdmin(admin.ModelAdmin):
    list_display = ('name', 'created', 'updated', 'id',)
    list_filter = ('created', 'updated',)
    search_fields = ('name',)


class MailTemplateFileAdmin(admin.TabularInline):