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