class Reference(models.Model):
book = models.ForeignKey('catalogue.Book', models.CASCADE)
entity = models.ForeignKey(Entity, models.CASCADE)
- first_section = models.CharField(max_length=255)
class Meta:
unique_together = (('book', 'entity'),)
+
+class Occurence(models.Model):
+ reference = models.ForeignKey(Reference, models.CASCADE)
+ section = models.IntegerField()
+ anchor = models.CharField(max_length=64)
+ html = models.TextField()
+
+ class Meta:
+ ordering = ('section',)