python - Wiki like Django models -
i trying create wiki page in django.
i have 2 models article , articlerevision.
if want retrieve current revision think need onetoonefield in article refering articlerevision. if want see revision history of article need foreignkey articlerevision refering article.
this right approach isn't bit overkill have multiple foreign keys? foreignkey(to=article) articlerevision , getting latest revision article articlerevision_set.latest(). if making roll-back revision cause troubles. utilize booleanfield in articlerevision tell if it's current revision.
does have thoughts this? want best , efficient way.
you should take @ django-revisions. allows need, without reimplementing everything.
python django database django-models mediawiki
No comments:
Post a Comment