|
|
@ -1,6 +1,8 @@ |
|
|
|
from django.contrib import admin |
|
|
|
from django.core.urlresolvers import reverse |
|
|
|
from django.shortcuts import redirect |
|
|
|
|
|
|
|
from reversion.models import Revision |
|
|
|
from sapl.base.models import ProblemaMigracao |
|
|
|
from sapl.utils import register_all_models_in_admin |
|
|
|
|
|
|
@ -27,3 +29,15 @@ class ProblemaMigracaoAdmin(admin.ModelAdmin): |
|
|
|
|
|
|
|
get_url.short_description = "Endereço" |
|
|
|
get_url.allow_tags = True |
|
|
|
|
|
|
|
|
|
|
|
class RevisionAdmin(admin.ModelAdmin): |
|
|
|
list_display = ('user', 'comment', 'date_created') |
|
|
|
search_fields = ('=user__username', '=user__email') |
|
|
|
date_hierarchy = ('date_created') |
|
|
|
|
|
|
|
def change_view(self, request, obj=None): |
|
|
|
self.message_user(request, 'You cannot change history.') |
|
|
|
return redirect('admin:reversion_revision_changelist') |
|
|
|
|
|
|
|
admin.site.register(Revision, RevisionAdmin) |
|
|
|