2017-06-20 03:07:41 +00:00
|
|
|
from django.contrib.contenttypes.fields import GenericRelation
|
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
from questionnaire.models import Landing
|
|
|
|
|
|
|
|
class Book(models.Model):
|
|
|
|
title = models.CharField(max_length=1000, default="")
|
|
|
|
landings = GenericRelation(Landing, related_query_name='items')
|
2020-02-12 19:12:14 +00:00
|
|
|
|
2017-06-20 03:07:41 +00:00
|
|
|
def __unicode__(self):
|
|
|
|
return self.title
|
2020-02-12 19:12:14 +00:00
|
|
|
|
|
|
|
__str__ = __unicode__
|