Created
August 9, 2013 10:09
-
-
Save guillaumepiot/6192596 to your computer and use it in GitHub Desktop.
CMSBase - Testimonials model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.utils.translation import ugettext_lazy as _ | |
from cmsbase.models import Page | |
class Testimonial(models.Model): | |
content = models.TextField(max_length=500) | |
author = models.CharField(max_length=100, blank=True, null=True) | |
related_to = models.ManyToManyField(Page, blank=True, null=True) | |
publish = models.BooleanField() | |
created_date = models.DateTimeField(auto_now_add=True) | |
updated_date = models.DateTimeField(auto_now=True) | |
class Meta: | |
verbose_name=_('Testimonial') | |
verbose_name_plural=_('Testimonials') | |
def __unicode__(self): | |
return u"%s" % self.content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment