<commit_before>from __future__ import absolute_import

from django.contrib import admin
from django.contrib.admin.models import DELETION
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import Permission
from django.core.urlresolvers import reverse
from django.utils.html import escape

from admin.common_auth.logs import OSFLogEntry
from admin.common_auth.forms import UserRegistrationForm
from osf.models.user import OSFUser


class PermissionAdmin(admin.ModelAdmin):
    search_fields = ['name', 'codename']


class CustomUserAdmin(UserAdmin):
    add_form = UserRegistrationForm
    list_display = ['username', 'given_name', 'is_active']

admin.site.register(OSFUser, CustomUserAdmin)
admin.site.register(Permission, PermissionAdmin)


class LogEntryAdmin(admin.ModelAdmin):

    date_hierarchy = 'action_time'

    readonly_fields = [f.name for f in OSFLogEntry._meta.get_fields()]
<commit_msg>Remove custom user admin from admin config<commit_after>from __future__ import absolute_import

from django.contrib import admin
from django.contrib.admin.models import DELETION
from django.contrib.auth.models import Permission
from django.core.urlresolvers import reverse
from django.utils.html import escape

from admin.common_auth.logs import OSFLogEntry


class PermissionAdmin(admin.ModelAdmin):
    search_fields = ['name', 'codename']


admin.site.register(Permission, PermissionAdmin)


class LogEntryAdmin(admin.ModelAdmin):

    date_hierarchy = 'action_time'

    readonly_fields = [f.name for f in OSFLogEntry._meta.get_fields()]

{'fraction_non_alphanumeric': 0.07824427480916031, 'fraction_numerical': 0.0, 'mean_word_length': 5.868995633187773, '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': '3364483', 'n_tokens_mistral': 456, 'n_tokens_neox': 440, 'n_words': 118}