Add reversion compare
This commit is contained in:
parent
27d9ea8326
commit
308234166b
5 changed files with 11 additions and 1 deletions
|
@ -234,6 +234,7 @@ INSTALLED_APPS += (
|
||||||
'registration',
|
'registration',
|
||||||
'mptt',
|
'mptt',
|
||||||
'reversion',
|
'reversion',
|
||||||
|
'reversion_compare',
|
||||||
'django_social_share',
|
'django_social_share',
|
||||||
'social_django',
|
'social_django',
|
||||||
'compressor',
|
'compressor',
|
||||||
|
|
|
@ -36,3 +36,4 @@ admin.site.register(ProblemType, ProblemTypeAdmin)
|
||||||
admin.site.register(Profile, ProfileAdmin)
|
admin.site.register(Profile, ProfileAdmin)
|
||||||
admin.site.register(Submission, SubmissionAdmin)
|
admin.site.register(Submission, SubmissionAdmin)
|
||||||
admin.site.register(Ticket, TicketAdmin)
|
admin.site.register(Ticket, TicketAdmin)
|
||||||
|
admin.site
|
||||||
|
|
|
@ -11,6 +11,8 @@ from django.urls import reverse_lazy
|
||||||
from django.utils.html import format_html
|
from django.utils.html import format_html
|
||||||
from django.utils.translation import gettext, gettext_lazy as _, ungettext
|
from django.utils.translation import gettext, gettext_lazy as _, ungettext
|
||||||
from reversion.admin import VersionAdmin
|
from reversion.admin import VersionAdmin
|
||||||
|
from reversion_compare.admin import CompareVersionAdmin
|
||||||
|
|
||||||
|
|
||||||
from judge.models import LanguageLimit, Problem, ProblemClarification, ProblemTranslation, Profile, Solution
|
from judge.models import LanguageLimit, Problem, ProblemClarification, ProblemTranslation, Profile, Solution
|
||||||
from judge.widgets import AdminHeavySelect2MultipleWidget, AdminSelect2MultipleWidget, AdminSelect2Widget, \
|
from judge.widgets import AdminHeavySelect2MultipleWidget, AdminSelect2MultipleWidget, AdminSelect2Widget, \
|
||||||
|
@ -117,7 +119,7 @@ class ProblemTranslationInline(admin.StackedInline):
|
||||||
extra = 0
|
extra = 0
|
||||||
|
|
||||||
|
|
||||||
class ProblemAdmin(VersionAdmin):
|
class ProblemAdmin(CompareVersionAdmin):
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {
|
(None, {
|
||||||
'fields': (
|
'fields': (
|
||||||
|
|
|
@ -26,4 +26,9 @@ revisions.register(Solution)
|
||||||
revisions.register(Judge, fields=['name', 'created', 'auth_key', 'description'])
|
revisions.register(Judge, fields=['name', 'created', 'auth_key', 'description'])
|
||||||
revisions.register(Language)
|
revisions.register(Language)
|
||||||
revisions.register(Comment, fields=['author', 'time', 'page', 'score', 'body', 'hidden', 'parent'])
|
revisions.register(Comment, fields=['author', 'time', 'page', 'score', 'body', 'hidden', 'parent'])
|
||||||
|
revisions.register(ProblemTranslation)
|
||||||
|
revisions.register(ProblemPointsVote)
|
||||||
|
revisions.register(ContestMoss)
|
||||||
|
revisions.register(ProblemData)
|
||||||
|
revisions.register(ProblemTestCase)
|
||||||
del revisions
|
del revisions
|
||||||
|
|
|
@ -4,6 +4,7 @@ django-mptt
|
||||||
django-pagedown<2
|
django-pagedown<2
|
||||||
django-registration-redux
|
django-registration-redux
|
||||||
django-reversion
|
django-reversion
|
||||||
|
django-reversion-compare
|
||||||
django-social-share
|
django-social-share
|
||||||
-e git://github.com/DMOJ/django-sortedm2m.git#egg=django-sortedm2m
|
-e git://github.com/DMOJ/django-sortedm2m.git#egg=django-sortedm2m
|
||||||
django-impersonate
|
django-impersonate
|
||||||
|
|
Loading…
Reference in a new issue