<commit_before>from models import Achievement, Category, CollectionAchievement, Progress, ProgressAchievement, Task, TaskAchievement, TaskProgress, Trophies, UserAchievement
from django.contrib import admin
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.db import models

class CategoryAdmin(admin.ModelAdmin):
    list_display=['name', 'parent_category']
    search_fields = ('name', 'parent_category')

class AchievementAdmin(admin.ModelAdmin):
    list_display=['name', 'description', 'category']
    search_fields = ('name', 'category')

class ProgressAchievementAdmin(admin.ModelAdmin):
    list_display=['name', 'description', 'category']
    search_fields = ('name', 'category')

class TaskAchievementAdmin(admin.ModelAdmin):
    list_display=['name', 'description', 'category']
    search_fields = ('name', 'category')
    formfield_overrides = {
        models.ManyToManyField: {'widget': FilteredSelectMultiple("tasks", False)}
    }

class CollectionAchievementAdmin(admin.ModelAdmin):
    list_display=['name', 'description', 'category']
    search_fields = ('name', 'category')
    formfield_overrides = {
        models.ManyToManyField: {'widget': FilteredSelectMultiple("achievements", False)}
    }

class TaskAdmin(admin.ModelAdmin):
    list_display=['name', 'description']

class TaskProgressAdmin(admin.ModelAdmin):
    list_display=['task_achievement', 'user']
    formfield_overrides = {
        models.ManyToManyField: {'widget': FilteredSelectMultiple("tasks", False)}
    }

class TrophiesAdmin(admin.ModelAdmin):
    list_display=['achievement', 'position']

admin.site.register(Achievement, AchievementAdmin)
admin.site.register(Category, CategoryAdmin)
admin.site.register(ProgressAchievement, ProgressAchievementAdmin)
admin.site.register(Progress)
admin.site.register(TaskAchievement, TaskAchievementAdmin)
admin.site.register(Task, TaskAdmin)
admin.site.register(TaskProgress, TaskProgressAdmin)
admin.site.register(Trophies, TrophiesAdmin)
admin.site.register(UserAchievement)
admin.site.register(CollectionAchievement, CollectionAchievementAdmin)<commit_msg>comment all subclassadmins of Achievement<commit_after>from models import Achievement, Category, Trophies#, CollectionAchievement, Progress, ProgressAchievement, Task, TaskAchievement, TaskProgress, UserAchievement
from django.contrib import admin
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.db import models

class CategoryAdmin(admin.ModelAdmin):
    list_display=['name', 'parent_category']
    search_fields = ('name', 'parent_category')

class AchievementAdmin(admin.ModelAdmin):
    list_display=['name', 'description', 'category']
    search_fields = ('name', 'category')

#class ProgressAchievementAdmin(admin.ModelAdmin):
    #list_display=['name', 'description', 'category']
    #search_fields = ('name', 'category')

#class TaskAchievementAdmin(admin.ModelAdmin):
    #list_display=['name', 'description', 'category']
    #search_fields = ('name', 'category')
    #formfield_overrides = {
        #models.ManyToManyField: {'widget': FilteredSelectMultiple("tasks", False)}
    #}

#class CollectionAchievementAdmin(admin.ModelAdmin):
    #list_display=['name', 'description', 'category']
    #search_fields = ('name', 'category')
    #formfield_overrides = {
        #models.ManyToManyField: {'widget': FilteredSelectMultiple("achievements", False)}
    #}

#class TaskAdmin(admin.ModelAdmin):
    #list_display=['name', 'description']

#class TaskProgressAdmin(admin.ModelAdmin):
    #list_display=['task_achievement', 'user']
    #formfield_overrides = {
        #models.ManyToManyField: {'widget': FilteredSelectMultiple("tasks", False)}
    #}

class TrophiesAdmin(admin.ModelAdmin):
    list_display=['achievement', 'position']

admin.site.register(Achievement, AchievementAdmin)
admin.site.register(Category, CategoryAdmin)
#admin.site.register(ProgressAchievement, ProgressAchievementAdmin)
#admin.site.register(Progress)
#admin.site.register(TaskAchievement, TaskAchievementAdmin)
#admin.site.register(Task, TaskAdmin)
#admin.site.register(TaskProgress, TaskProgressAdmin)
admin.site.register(Trophies, TrophiesAdmin)
#admin.site.register(UserAchievement)
#admin.site.register(CollectionAchievement, CollectionAchievementAdmin)
{'fraction_non_alphanumeric': 0.1270358306188925, 'fraction_numerical': 0.0, 'mean_word_length': 6.975881261595547, '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': '1265857', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1239, 'n_words': 221}