<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _

from shop.models.customer import CustomerModel as Customer

class CustomerAdmin(admin.ModelAdmin):
    list_display = ('identifier', 'creation_date',)

admin.site.register(Customer, CustomerAdmin)
<commit_msg>Override built-in UserAdmin for Customer<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import UserChangeForm
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from shop.models.customer import CustomerModel


class CustomerInlineAdmin(admin.StackedInline):
    model = CustomerModel


class CustomerChangeForm(UserChangeForm):
    class Meta(UserChangeForm.Meta):
        model = get_user_model()


class CustomerAdmin(UserAdmin):
    form = CustomerChangeForm
    inlines = (CustomerInlineAdmin,)
    #fieldsets = (
    #    (None, {'fields': ('user__email', 'user__password')}),
    #    (_('Personal info'), {'fields': ('salutation', 'user__first_name', 'user__last_name',)}),
    #    #(_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser', 'user_permissions')}),
    #    #(_('Important dates'), {'fields': ('last_login', 'date_joined')}),
    #)
{'fraction_non_alphanumeric': 0.12, 'fraction_numerical': 0.0012698412698412698, 'mean_word_length': 5.354838709677419, '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': '3588530', 'n_tokens_mistral': 452, 'n_tokens_neox': 449, 'n_words': 115}