<commit_before># -*- coding: utf-8 -*-

from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import models as auth_models
from django.utils.translation import ugettext, ugettext_lazy as _

from . import models

class UserProfileInline(admin.StackedInline):
    model = models.UserProfile
    can_delete = False
    exclude = ('lost',)
    verbose_name_plural = u'perfil'


class UserAdmin(auth_admin.UserAdmin):
    list_display = ('username', 'email', 'get_full_name', 'is_staff', 'get_payment_code', 'get_is_under_age', 'get_quota', 'get_payed', 'get_payment')
    list_filter = ('is_staff', 'is_superuser', 'is_active', 'profile__dinner_menu', 'profile__room_choice')
    select_related = ('profile',)
    search_fields = ('username', 'email', 'first_name', 'last_name', 'alias', 'smial', 'payment')
    fieldsets = (
        (None, {'fields': ('username', 'password')}),
        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups')}),<commit_msg>Fix bug in admin search<commit_after># -*- coding: utf-8 -*-

from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import models as auth_models
from django.utils.translation import ugettext, ugettext_lazy as _

from . import models

class UserProfileInline(admin.StackedInline):
    model = models.UserProfile
    can_delete = False
    exclude = ('lost',)
    verbose_name_plural = u'perfil'


class UserAdmin(auth_admin.UserAdmin):
    list_display = ('username', 'email', 'get_full_name', 'is_staff', 'get_payment_code', 'get_is_under_age', 'get_quota', 'get_payed', 'get_payment')
    list_filter = ('is_staff', 'is_superuser', 'is_active', 'profile__dinner_menu', 'profile__room_choice')
    select_related = ('profile',)
    search_fields = ('username', 'email', 'first_name', 'last_name', 'profile__alias', 'profile__smial', 'profile__payment')
    fieldsets = (
        (None, {'fields': ('username', 'password')}),
        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups')}),
{'fraction_non_alphanumeric': 0.16130453944468928, 'fraction_numerical': 0.0008814455707360071, 'mean_word_length': 5.323119777158774, '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': '3052072', 'n_tokens_mistral': 717, 'n_tokens_neox': 720, 'n_words': 169}