0

I have a blog website using django and I keep editing blogs occasionally, and I want to retrieve a history version at any time just like git and notes history function in evernote.

How can I do that? Should I save every new version in the database? Are there any good solutions? Any language is welcome (python, java, ...).

Example:https://blog.evernote.com/blog/2010/04/14/new-premium-features-note-history-and-50mb-notes/

expoter
  • 1,622
  • 17
  • 34

2 Answers2

1

Yeah this can be done by adding a Django LogEntry. LogEntry is the model used by Django to maintain the Django admin edit history. You can use the same model to track changes to your blog.

Refer to this Stackoverflow answer on how to use it. https://stackoverflow.com/a/988202/1774657

Community
  • 1
  • 1
Mevin Babu
  • 2,405
  • 21
  • 34
0

Django/Python version: I would make two models: FirstBlog() and EditedBlog() and bind them via OnetoMany together.

everytime you edit the FirstBlog() version, you create another EditedBlog() version with information: who edited it, when edited, what edited.

doniyor
  • 36,596
  • 57
  • 175
  • 260