Thanks very much!
Let me post the class in my models.py
so, in the models.py, there are three classes: person, section and item.
a person has several sections. each section contains several items.
class Person
......
class Section(models.Model):
person = models.ForeignKey(Person)
section_headings = models.CharField(blank=True,max_length=100)
......(also contains some fields for sorting and etc.)
class Item(models.Model):
section = models.ForeignKey(Section)
item_text = models.TextField()
.......(also contains some fields for sorting and etc.)
The item is pretty simple.
but if I am going to create a html table. what I can do.
One way I can image is:
I am going to add a new class named Table.
class Table(models.Model):
section = models.ForeignKey(Section)
class Row(models.Model):
table = models.ForeignKey(Table).
......
class Cell(models.Model):
row = models.ForeignKey(Row)
.........
Do you think is there any better way to do this?
Thanks!!