hook up django reversion
This commit is contained in:
parent
99aea4856d
commit
5b9cb12059
2 changed files with 7 additions and 0 deletions
|
@ -10,6 +10,8 @@ from taggit.managers import TaggableManager
|
|||
from mptt.models import MPTTModel, TreeForeignKey
|
||||
from mptt.utils import drilldown_tree_for_node
|
||||
|
||||
import reversion
|
||||
|
||||
|
||||
class ContentBase(models.Model):
|
||||
|
||||
|
@ -60,6 +62,8 @@ class Page(MPTTModel, ContentBase):
|
|||
class MPTTMeta:
|
||||
order_insertion_by = ["ordering", "title"]
|
||||
|
||||
reversion.register(Page)
|
||||
|
||||
|
||||
class MenuItem(MPTTModel):
|
||||
|
||||
|
|
|
@ -108,6 +108,8 @@ MIDDLEWARE_CLASSES = [
|
|||
"django_openid.consumer.SessionConsumer",
|
||||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
"pinax.apps.account.middleware.LocaleMiddleware",
|
||||
"django.middleware.transaction.TransactionMiddleware",
|
||||
"reversion.middleware.RevisionMiddleware",
|
||||
"pinax.middleware.security.HideSensistiveFieldsMiddleware",
|
||||
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||
]
|
||||
|
@ -163,6 +165,7 @@ INSTALLED_APPS = [
|
|||
"taggit",
|
||||
"cms",
|
||||
"mptt",
|
||||
"reversion",
|
||||
|
||||
# Pinax
|
||||
"pinax.apps.account",
|
||||
|
|
Loading…
Reference in a new issue