Skip to content
Snippets Groups Projects
models.py 1.31 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
from newsbox_hvad.models import NewsboxHVADBase

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

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

class NewsExtended(NewsboxHVADBase, NewsboxCMSBase, NewsboxSEOBase, NewsboxExpiredBase, 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)
    
    class Meta:
        verbose_name = 'news - ExtendedHVADCMS'
        verbose_name_plural = 'news - ExtendedHVADCMS'
        newsbox_trans_fieldnames = ['content_field', 'seo_field']
        newsbox_detail_url_name = 'newsextended_detail'



class NewsPlugin(NewsboxPluginBase):
    newsbox_model = News