Пример #1
0
REGIONS = ('main', 'preview',)

try:
    import taggit  # noqa
except:
    pass
else:
    Article.register_extensions(
        'articles.extensions.tags',
    )

Article.register_regions(
    ('preview', _('Preview area')),
    ('main', _('Main content area')),
)

Article.create_content_type(
    web.widget.HtmlTextWidget, regions=REGIONS, optgroup=_('Text'))
Article.create_content_type(
    web.widget.MarkupTextWidget, regions=REGIONS, optgroup=_('Text'))

for widget in media.default.widgets:
    Article.create_content_type(widget, regions=REGIONS, optgroup=_('Media'))

try:
    from leonardo_oembed.widget import OembedWidget
    Article.create_content_type(OembedWidget,
                                regions=REGIONS, optgroup=_('External content'))
except:
    pass
Пример #2
0
from django.utils.translation import ugettext_lazy as _

from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
from feincms.content.video.models import VideoContent

from articles.models import Article

Article.register_regions(
    ('question', _('Question')),
    ('answer', _('Answer')),
)

Article.register_extensions('articles.extensions.tags', )

Article.create_content_type(RichTextContent)
Article.create_content_type(MediaFileContent,
                            TYPE_CHOICES=(('default', _('default')), ))
Article.create_content_type(VideoContent)


class FrequentlyAskedQuestion(Article):
    class Meta:
        proxy = True
Пример #3
0
)

try:
    import taggit  # noqa
except:
    pass
else:
    Article.register_extensions('articles.extensions.tags', )

Article.register_regions(
    ('preview', _('Preview area')),
    ('main', _('Main content area')),
)

Article.create_content_type(web.widget.HtmlTextWidget,
                            regions=REGIONS,
                            optgroup=_('Text'))
Article.create_content_type(web.widget.MarkupTextWidget,
                            regions=REGIONS,
                            optgroup=_('Text'))

for widget in media.default.widgets:
    Article.create_content_type(widget, regions=REGIONS, optgroup=_('Media'))

try:
    from leonardo_oembed.widget import OembedWidget
    Article.create_content_type(OembedWidget,
                                regions=REGIONS,
                                optgroup=_('External content'))
except:
    pass
Пример #4
0
from django.utils.translation import ugettext_lazy as _

from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
from feincms.content.video.models import VideoContent

from articles.models import Article


Article.register_regions(
    ('question', _('Question')),
    ('answer', _('Answer')),
)

Article.register_extensions(
    'articles.extensions.tags',
)

Article.create_content_type(RichTextContent)
Article.create_content_type(MediaFileContent, TYPE_CHOICES=(
    ('default', _('default')),
))
Article.create_content_type(VideoContent)