<commit_before>from django.contrib import admin

# Register your models here.<commit_msg>admin: classes for user admin<commit_after>from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as DefaultUserAdmin
from django.contrib.auth.forms import UserChangeForm as DefaultUserChangeForm
from django.utils.translation import ugettext_lazy as _

from .models import User


class UserChangeForm(DefaultUserChangeForm):
    class Meta(DefaultUserChangeForm.Meta):
        model = User


class UserAdmin(DefaultUserAdmin):
    form = UserChangeForm

    add_fieldsets = (
        (None, {
            'classes': ('wide',),
            'fields': ('username', 'nickname', '<PASSWORD>', '<PASSWORD>'),
        }),
    )

    fieldsets = (
        (None, {'fields': ('username', 'nickname', 'password')}),
        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser',
                                       'groups', 'user_permissions')}),
        (_('Important dates'), {'fields': ('last_login', 'date_joined')}),
    )


admin.site.register(User, UserAdmin)
{'fraction_non_alphanumeric': 0.14505119453924914, 'fraction_numerical': 0.0, 'mean_word_length': 3.4942528735632186, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5237922', 'n_tokens_mistral': 327, 'n_tokens_neox': 325, 'n_words': 81}