Skip to content
Snippets Groups Projects
models.py 1.12 KiB
Newer Older
Olivier Le Brouster's avatar
Olivier Le Brouster committed
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from newsbox.models import NewsboxBase, NewsboxSEOBase, NewsboxExpiredBase
from newsbox_cms.models import NewsboxCMSBase, NewsboxPluginBase

Dylann Cordel's avatar
Dylann Cordel committed

class News(NewsboxCMSBase, NewsboxBase):
Olivier Le Brouster's avatar
Olivier Le Brouster committed
    class Meta:
        verbose_name = 'news - CMS'
        verbose_name_plural = 'news - CMS'
        newsbox_detail_url_name = 'news_detail'


class NewsComplete(NewsboxSEOBase, NewsboxExpiredBase, NewsboxCMSBase, NewsboxBase):
Olivier Le Brouster's avatar
Olivier Le Brouster committed
    class Meta:
        verbose_name = 'news - CompleteCMS'
        verbose_name_plural = 'news - CompleteCMS'
        newsbox_detail_url_name = 'newscomplete_detail'


class NewsExtended(NewsboxSEOBase, NewsboxExpiredBase, NewsboxCMSBase, NewsboxBase):
Olivier Le Brouster's avatar
Olivier Le Brouster committed
    general_field = models.CharField(max_length=50)
    content_field = models.CharField(max_length=50)
    seo_field = models.CharField(max_length=50)
Dylann Cordel's avatar
Dylann Cordel committed

Olivier Le Brouster's avatar
Olivier Le Brouster committed
    class Meta:
        verbose_name = 'news - ExtendedCMS'
        verbose_name_plural = 'news - ExtendedCMS'
        newsbox_detail_url_name = 'newsextended_detail'


class NewsPlugin(NewsboxPluginBase):
    newsbox_model = News