djangocms-versioning icon indicating copy to clipboard operation
djangocms-versioning copied to clipboard

Documentation fixes

Open Aiky30 opened this issue 4 years ago • 1 comments

The following project is a good example of documentation configuration setup: https://github.com/evildmp/BrachioGraph/tree/master/docs

Mentions FIL, remove this from everywhere, this is a community project!

Important files:

  • conf.py
  • requires a requirements.txt just for the docs build. Located in the docs folder.
  • Add documentation standards file
  • make spelling_wordlist

Aiky30 avatar Feb 25 '21 11:02 Aiky30

Document django-cms integration i.e. getting page versions etc:

This is a little more involved because you may want different things at this point, i.e. for preview you may want to look at any version for a page / language, I'm guessing that as you want the edit mode you want the latest draft.

from djangocms-versiong.constants import DRAFT

PageContent._original_manager.filter(
        page=source_page, language=language, version__state=DRAFT
).first()

You could also use the versioning helper remove_published_where instead of the '_original_manager'

Aiky30 avatar Sep 26 '22 11:09 Aiky30