fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove the banner
[wolnelektury.git]
/
src
/
references
/
models.py
diff --git
a/src/references/models.py
b/src/references/models.py
index
9246ee3
..
d4733ff
100644
(file)
--- a/
src/references/models.py
+++ b/
src/references/models.py
@@
-76,8
+76,15
@@
class Entity(models.Model):
class Reference(models.Model):
book = models.ForeignKey('catalogue.Book', models.CASCADE)
entity = models.ForeignKey(Entity, models.CASCADE)
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 Meta:
unique_together = (('book', 'entity'),)
+
+class Occurence(models.Model):
+ reference = models.ForeignKey(Reference, models.CASCADE)
+ section = models.IntegerField()
+ html = models.TextField()
+
+ class Meta:
+ ordering = ('section',)