16 lines
386 B
Python
16 lines
386 B
Python
from django.db import models
|
|
|
|
|
|
ARTICLE_CONTENT_HINT = "Markdown formatting supported"
|
|
|
|
class Article(models.Model):
|
|
""" News article. """
|
|
|
|
title = models.CharField(max_length = 256)
|
|
content = models.TextField(help_text = ARTICLE_CONTENT_HINT)
|
|
author = models.CharField(max_length = 64)
|
|
date = models.DateField()
|
|
|
|
class Meta(object):
|
|
ordering = ("date",)
|