<commit_before>
from django.contrib import admin
from sorl.thumbnail.admin import AdminImageMixin

from extensions.models import Extension, ExtensionVersion

class ExtensionVersionAdmin(admin.TabularInline):
    model = ExtensionVersion
    fields = 'version', 'status',
    extra = 0

class ExtensionAdmin(admin.ModelAdmin):
    list_display = 'name', 'num_versions', 'creator',
    list_display_links = 'name',

    def num_versions(self, ext):
        return ext.versions.count()
    num_versions.short_description = "#V"

    inlines = [ExtensionVersionAdmin]

admin.site.register(Extension, ExtensionAdmin)<commit_msg>Add CodeReview to admin.<commit_after>
from django.contrib import admin
from sorl.thumbnail.admin import AdminImageMixin

from extensions.models import Extension, ExtensionVersion
from review.models import CodeReview

class CodeReviewAdmin(admin.TabularInline):
    model = CodeReview
    fields = 'reviewer', 'comments',

class ExtensionVersionAdmin(admin.ModelAdmin):
    list_display = 'version', 'status',
    list_display_links = 'version',

    inlines = [CodeReviewAdmin]

admin.site.register(ExtensionVersion, ExtensionVersionAdmin)

class ExtensionVersionInline(admin.TabularInline):
    model = ExtensionVersion
    fields = 'version', 'status',
    extra = 0

class ExtensionAdmin(admin.ModelAdmin):
    list_display = 'name', 'num_versions', 'creator',
    list_display_links = 'name',

    def num_versions(self, ext):
        return ext.versions.count()
    num_versions.short_description = "#V"

    inlines = [ExtensionVersionInline]

admin.site.register(Extension, ExtensionAdmin)
{'fraction_non_alphanumeric': 0.09691358024691359, 'fraction_numerical': 0.0012345679012345679, 'mean_word_length': 4.981549815498155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7462729', 'n_tokens_mistral': 450, 'n_tokens_neox': 446, 'n_words': 108}