<commit_before>from django.contrib import admin
from models import QandaUser, Question, Answer, Reply
from models import UserStars, QuestionRelatedUsers, AnswerRelatedUsers 

class QandaUserAdmin(admin.ModelAdmin):
	fields = ['djangoUser', 'deleted']
	list_display = ['djangoUser', 'deleted']

class QuestionAdmin(admin.ModelAdmin):
	fields = ['title', 'text', 'author', 'viewCount', 'uniqueViewCount', 'closeMessage', 'deleted']
	list_display = ['pk','title','author', 'text', 'postDate', 'editDate', 'closeDate','closeMessage', 'closed', 'deleted']
	list_filter = ['postDate', 'editDate', 'closeDate','author']

class AnswerAdmin(admin.ModelAdmin):
	fields = ['text', 'question', 'author']
	list_display = ['pk', 'author', 'text', 'postDate', 'editDate', 'deleted']
	list_filter = ['postDate', 'editDate', 'author']

class ReplyAdmin(admin.ModelAdmin):
	fields = ['text', 'author', 'answer', 'deleted']
	list_display = ['pk', 'author', 'text', 'postDate', 'editDate', 'deleted']
	list_filter = ['postDate', 'editDate', 'author']

class UserStarsAdmin(admin.ModelAdmin):
	fields = ['starrer', 'starred']
	list_display = ['starrer', 'starred', 'timestamp']

class QuestionRelatedUsersAdmin(admin.ModelAdmin):
	fields = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']
	list_display = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']

class AnswerRelatedUsersAdmin(admin.ModelAdmin):
	fields = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']
	list_display = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']

admin.site.register(QandaUser, QandaUserAdmin)
admin.site.register(Question, QuestionAdmin)
admin.site.register(Answer, AnswerAdmin)
admin.site.register(Reply, ReplyAdmin)

admin.site.register(UserStars, UserStarsAdmin)
admin.site.register(QuestionRelatedUsers, QuestionRelatedUsersAdmin)
admin.site.register(AnswerRelatedUsers, AnswerRelatedUsersAdmin)<commit_msg>added stats to admin<commit_after>from django.contrib import admin
from models import QandaUser, Question, Answer, Reply
from models import UserStars, QuestionRelatedUsers, AnswerRelatedUsers, QandaUserStats

class QandaUserAdmin(admin.ModelAdmin):
	fields = ['djangoUser', 'deleted']
	list_display = ['djangoUser', 'deleted']

class QuestionAdmin(admin.ModelAdmin):
	fields = ['title', 'text', 'author', 'viewCount', 'closeMessage', 'deleted']
	list_display = ['pk','title','author', 'text', 'postDate', 'editDate', 'closeDate','closeMessage', 'closed', 'deleted']
	list_filter = ['postDate', 'editDate', 'closeDate','author']

class AnswerAdmin(admin.ModelAdmin):
	fields = ['text', 'question', 'author']
	list_display = ['pk', 'author', 'text', 'postDate', 'editDate', 'deleted']
	list_filter = ['postDate', 'editDate', 'author']

class ReplyAdmin(admin.ModelAdmin):
	fields = ['text', 'author', 'answer', 'deleted']
	list_display = ['pk', 'author', 'text', 'postDate', 'editDate', 'deleted']
	list_filter = ['postDate', 'editDate', 'author']

class UserStarsAdmin(admin.ModelAdmin):
	fields = ['starrer', 'starred']
	list_display = ['starrer', 'starred', 'timestamp']

class QuestionRelatedUsersAdmin(admin.ModelAdmin):
	fields = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']
	list_display = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']

class AnswerRelatedUsersAdmin(admin.ModelAdmin):
	fields = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']
	list_display = ['relatedUser', 'relatedQuestion', 'upvote', 'downvote', 'useful', 'notUseful', 'star', 'flag']

class QandaUserStatsAdmin(admin.ModelAdmin):
	pass

admin.site.register(QandaUser, QandaUserAdmin)
admin.site.register(Question, QuestionAdmin)
admin.site.register(Answer, AnswerAdmin)
admin.site.register(Reply, ReplyAdmin)

admin.site.register(UserStars, UserStarsAdmin)
admin.site.register(QuestionRelatedUsers, QuestionRelatedUsersAdmin)
admin.site.register(AnswerRelatedUsers, AnswerRelatedUsersAdmin)
admin.site.register(QandaUserStats, QandaUserStatsAdmin)
{'fraction_non_alphanumeric': 0.1750118091639112, 'fraction_numerical': 0.0, 'mean_word_length': 8.780600461893764, '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': '628842', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1305, 'n_words': 297}