mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:29:02 +02:00
Enable auditing using django-reversion and django-reversion-compare
Collect history for changes, and allow browsing / reverting / comparison within the admin interface. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
2eb5f38b21
commit
45514d387b
2
README
2
README
|
@ -27,6 +27,8 @@ In order to make use of this application you will need:
|
|||
building).
|
||||
* GitPython (python-git) version 0.3.1 or later
|
||||
* django-registration
|
||||
* django-reversion
|
||||
* django-reversion-compare
|
||||
|
||||
Setup instructions:
|
||||
|
||||
|
|
1
TODO
1
TODO
|
@ -7,7 +7,6 @@ TODO:
|
|||
- we might consider adding a link to the all layers and all recipes tables from the layer details page
|
||||
|
||||
* Ensure publishing a published layer doesn't do anything
|
||||
* Auditing
|
||||
|
||||
* Need an "About" section descriptibing what the site is for
|
||||
* Need an admin contact in footer
|
||||
|
|
|
@ -6,9 +6,22 @@
|
|||
|
||||
from layerindex.models import *
|
||||
from django.contrib import admin
|
||||
from reversion_compare.admin import CompareVersionAdmin
|
||||
|
||||
admin.site.register(LayerItem)
|
||||
admin.site.register(LayerMaintainer)
|
||||
admin.site.register(LayerDependency)
|
||||
admin.site.register(LayerNote)
|
||||
class LayerItemAdmin(CompareVersionAdmin):
|
||||
""" Admin settings here """
|
||||
|
||||
class LayerMaintainerAdmin(CompareVersionAdmin):
|
||||
""" Admin settings here """
|
||||
|
||||
class LayerDependencyAdmin(CompareVersionAdmin):
|
||||
""" Admin settings here """
|
||||
|
||||
class LayerNoteAdmin(CompareVersionAdmin):
|
||||
""" Admin settings here """
|
||||
|
||||
admin.site.register(LayerItem, LayerItemAdmin)
|
||||
admin.site.register(LayerMaintainer, LayerMaintainerAdmin)
|
||||
admin.site.register(LayerDependency, LayerDependencyAdmin)
|
||||
admin.site.register(LayerNote, LayerNoteAdmin)
|
||||
admin.site.register(Recipe)
|
||||
|
|
|
@ -105,6 +105,7 @@ MIDDLEWARE_CLASSES = (
|
|||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'reversion.middleware.RevisionMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'urls'
|
||||
|
@ -128,7 +129,9 @@ INSTALLED_APPS = (
|
|||
# Uncomment the next line to enable admin documentation:
|
||||
# 'django.contrib.admindocs',
|
||||
'layerindex',
|
||||
'registration'
|
||||
'registration',
|
||||
'reversion',
|
||||
'reversion_compare'
|
||||
)
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
|
|
Loading…
Reference in New Issue
Block a user