<commit_before>from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User, Group
from .models import Post, Comment, Author, Friending, Node
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from post.models import Notification

# Register your models here.

class AuthorInline(admin.TabularInline):
    model = Author

class UserAdmin(UserAdmin):
    inlines = [
        AuthorInline,
    ]
    fields = {'username', 'password', 'is_active', 'email'}
    list_display = ('username', 'is_active', 'is_staff')
    list_filter = ('is_active', 'is_staff')

admin.site.unregister(Group)
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
admin.site.register(Friending)
admin.site.register(Author)
admin.site.register(Post)
# admin.site.register(Comment)
# admin.site.register(Upload)
admin.site.register(Notification)
admin.site.register(Node)
<commit_msg>add comment to admin.py<commit_after>from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User, Group
from .models import Post, Comment, Author, Friending, Node
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from post.models import Notification

# Register your models here.

class AuthorInline(admin.TabularInline):
    model = Author

class UserAdmin(UserAdmin):
    inlines = [
        AuthorInline,
    ]
    fields = {'username', 'password', 'is_active', 'email'}
    list_display = ('username', 'is_active', 'is_staff')
    list_filter = ('is_active', 'is_staff')

admin.site.unregister(Group)
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
admin.site.register(Friending)
admin.site.register(Author)
admin.site.register(Post)
admin.site.register(Comment)
# admin.site.register(Upload)
admin.site.register(Notification)
admin.site.register(Node)

{'fraction_non_alphanumeric': 0.11591148577449947, 'fraction_numerical': 0.0, 'mean_word_length': 5.5034246575342465, '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': '5232708', 'n_tokens_mistral': 557, 'n_tokens_neox': 564, 'n_words': 131}