# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin

from .models import ExtraInfo

class ExtraInfoAdmin(admin.ModelAdmin):
    """ Admin interface for ExtraInfo model. """
    list_display = ('user', 'get_email', 'last_name', 'first_name',)
    search_fields = ('user__username', 'user__email', 'last_name', 'first_name',)

    def get_email(self, obj):
        return obj.user.email
    get_email.short_description = 'Email address'

    class Meta(object):
        model = ExtraInfo

admin.site.register(ExtraInfo, ExtraInfoAdmin)

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin

from .models import ExtraInfo

admin.site.register(ExtraInfo)

Revert "Change `ExtraInfo` to user fields, add search"
Revert "Change `ExtraInfo` to user fields, add search"

This reverts commit f5984fbd4187f4af65fb39b070f91870203d869b.
