from ..models import Article, Program, StaticPage
from . import page

__all__ = ["ArticleDetailView", "ArticleListView"]


class ArticleDetailView(page.PageDetailView):
    model = Article


@page.attach
class ArticleListView(page.PageListView):
    model = Article
    parent_model = Program
    attach_to_value = StaticPage.Target.ARTICLES
