fef-questionnaire/example/models.py

11 lines
340 B
Python
Raw Normal View History

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')
def __unicode__(self):
return self.title