Is Wiki's revision system based on another project?

41 views
Skip to first unread message

Xtian Simon

unread,
Jul 3, 2021, 8:26:45 PM7/3/21
to django-wiki
I have an intranet site which is designed for importing data from business reports.
It's necessary to track the table features (headers of CSV files) which can change without notice--and change back.

I love the Changes/revision system in Wiki. Reading a comment in the Github issue tracker, I like the contrasted value of wiki's revision system compared to another django project (https://github.com/etianen/django-reversion)


What's good for Wiki is also good for my table features problem: history and transparency.

Has anyone tried to implement the same features for their own project?
Did it work for you?

More concretely,
Is wiki's revision system modular to the point I could reuse it for another django model?
What are the main components of Wiki's revision system?
Is wiki's revision system based on another project?

Chris



Xtian Simon

unread,
Jul 7, 2021, 9:52:02 AM7/7/21
to django-wiki
I also asked this on Reddit r/DjangoLearning, but without success.

Benjamin Balder Bach

unread,
Jul 7, 2021, 12:55:04 PM7/7/21
to djang...@googlegroups.com

Hi Chris,

The revision system is extended in some of the build-in plugins. Imagine that you have a wiki article (Article A) and you attach a document to it. The attachment is then re-used in another article (Article B). This means that if the attachment is replaced by an editor of Article B, it should probably also be updated in Article A.

In this example, you MIGHT be able to think of cases that don't fit. That's entirely okay. What's the point is that the attachment should be revisioned.

That's why attachments on django-wiki are kept with a plugin that uses revisions.

The code is available here:

https://github.com/django-wiki/django-wiki/tree/main/src/wiki/plugins/attachments


This can be your blue-print, if you wish to create data stored in your own Django models, using a revision system. Django-wiki isn't as easy as the Django-Admin, you will have to create some extra logic for view/list/update/create/delete etc. and also consider permissions. So that's why the attachment plugin might be good to copy from.


Best of luck,
Ben

--
You received this message because you are subscribed to the Google Groups "django-wiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-wiki...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-wiki/532a753a-21fe-4d2f-ad13-c9a1e5db9679n%40googlegroups.com.

Xtian Simon

unread,
Jul 11, 2021, 2:39:28 PM7/11/21
to django-wiki
I took a look and I see views.py three interesting classes:
  • AttachmentHistoryView
  • AttachmentReplaceView
  • AttachmentChangeRevisionView
I'm thinking the magic happens here.
Thank you for the suggestion.
Chris
Reply all
Reply to author
Forward
0 new messages