Commit 376b5101 authored by Skia's avatar Skia
Browse files

Add docstring to PageRev

parent 268a3325
......@@ -347,6 +347,13 @@ class Page(models.Model):
return self.get_full_name()
class PageRev(models.Model):
This is the true content of the page.
Each page object has a revisions field that is a list of PageRev, ordered by date.
my_page.revisions.last() gives the PageRev object that is the most up-to-date, and thus,
is the real content of the page.
The content is in PageRev.title and PageRev.content .
title = models.CharField(_("page title"), max_length=255, blank=True)
content = models.TextField(_("page content"), blank=True)
date = models.DateTimeField(_('date'), auto_now=True)
......@@ -111,7 +111,7 @@ class PageEditView(CanEditMixin, UpdateView):
except LockError as e:
raise e
return None
def get_context_data(self, **kwargs):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment