<commit_before>__copyright__ = "Copyright 2017 Birkbeck, University of London"
__author__ = "<NAME> & <NAME>"
__license__ = "AGPL v3"
__maintainer__ = "Birkbeck Centre for Technology and Publishing"

from django.contrib import admin
from review import models


class EditorialAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'editor', 'editor_type', 'assigned')
    list_filter = ('article', 'editor', 'editor_type')
    raw_id_fields = ('article', 'editor')


class ReviewRoundAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'round_number', 'date_started')
    list_filter = ('article',)
    raw_id_fields = ('article',)
    filter_horizontal = ('review_files',)


class ReviewAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'reviewer', 'editor', 'review_round', 'decision', 'date_due', 'is_complete')
    list_filter = ('article', 'reviewer', 'editor')
    raw_id_fields = ('article', 'reviewer', 'editor', 'review_round', 'form')


class ReviewFormAdmin(admin.ModelAdmin):
    list_display = ('name', 'journal', 'slug', 'deleted')
    list_filter = ('journal', 'deleted')
    filter_horizontal = ('elements',)


class ElementAdmin(admin.ModelAdmin):
    list_display = ('name', 'kind', 'required', 'order', 'width')


class AnswerAdmin(admin.ModelAdmin):
    list_display = ('pk', 'assignment', 'element', 'author_can_see')
    list_filter = ('element', 'assignment')
    raw_id_fields = ('assignment', 'element')


class RatingAdmin(admin.ModelAdmin):
    list_display = ('pk', 'reviewer', 'rating', 'rater')
    list_filter = ('assignment', 'rater')
    raw_id_fields = ('assignment', 'rater')

    def reviewer(self, obj):
        return obj.assignment.reviewer


class RevisionActionAdmin(admin.ModelAdmin):
    list_display = ('pk', 'logged', 'user')


class RevisionAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'editor', 'date_requested', 'date_due')
    list_filter = ('article', 'editor')
    raw_id_fields = ('article', 'editor')
    filter_horizontal = ('actions',)


class EditorOverrideAdmin(admin.ModelAdmin):<commit_msg>Updates admin.py<commit_after>__copyright__ = "Copyright 2017 Birkbeck, University of London"
__author__ = "<NAME> & <NAME>"
__license__ = "AGPL v3"
__maintainer__ = "Birkbeck Centre for Technology and Publishing"

from django.contrib import admin
from review import models


class EditorialAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'editor', 'editor_type', 'assigned')
    list_filter = ('article', 'editor', 'editor_type')
    raw_id_fields = ('article', 'editor')


class ReviewRoundAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'round_number', 'date_started')
    list_filter = ('article',)
    raw_id_fields = ('article',)
    filter_horizontal = ('review_files',)


class ReviewAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'reviewer', 'editor', 'review_round', 'decision', 'date_due', 'is_complete')
    list_filter = ('article', 'reviewer', 'editor')
    raw_id_fields = ('article', 'reviewer', 'editor', 'review_round', 'form')


class ReviewFormAdmin(admin.ModelAdmin):
    list_display = ('name', 'journal', 'slug', 'deleted')
    list_filter = ('journal', 'deleted')
    filter_horizontal = ('elements',)


class ElementAdmin(admin.ModelAdmin):
    list_display = ('name', 'kind', 'required', 'order', 'width')


class AnswerAdmin(admin.ModelAdmin):
    list_display = ('pk', 'assignment', 'frozen_element', 'author_can_see')
    list_filter = ('assignment',)
    raw_id_fields = ('assignment',)


class RatingAdmin(admin.ModelAdmin):
    list_display = ('pk', 'reviewer', 'rating', 'rater')
    list_filter = ('assignment', 'rater')
    raw_id_fields = ('assignment', 'rater')

    def reviewer(self, obj):
        return obj.assignment.reviewer


class RevisionActionAdmin(admin.ModelAdmin):
    list_display = ('pk', 'logged', 'user')


class RevisionAdmin(admin.ModelAdmin):
    list_display = ('pk', 'article', 'editor', 'date_requested', 'date_due')
    list_filter = ('article', 'editor')
    raw_id_fields = ('article', 'editor')
    filter_horizontal = ('actions',)


class EditorOverrideAdmin(admin.ModelAdmin):
{'fraction_non_alphanumeric': 0.16435406698564595, 'fraction_numerical': 0.0023923444976076554, 'mean_word_length': 5.363774733637747, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6301933', 'n_tokens_mistral': 1325, 'n_tokens_neox': 1291, 'n_words': 302}