symposion_app/symposion/boxes/models.py

25 lines
533 B
Python
Raw Normal View History

2012-07-10 22:18:48 +00:00
from django.db import models
from django.contrib.auth.models import User
import reversion
2012-07-10 22:18:48 +00:00
from markitup.fields import MarkupField
class Box(models.Model):
2012-07-10 22:18:48 +00:00
label = models.CharField(max_length=100, db_index=True)
content = MarkupField(blank=True)
2012-07-10 22:18:48 +00:00
created_by = models.ForeignKey(User, related_name="boxes")
last_updated_by = models.ForeignKey(User, related_name="updated_boxes")
2012-07-10 22:18:48 +00:00
def __unicode__(self):
return self.label
2012-07-10 22:18:48 +00:00
class Meta:
verbose_name_plural = "boxes"
reversion.register(Box)