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)

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.

  from __future__ import unicode_literals
  
  from django.contrib import admin
  
  from .models import ExtraInfo
  
+ admin.site.register(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)
- 
Revert "Change `ExtraInfo` to user fields, add search"
## Code Before:
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)

## Instruction:
Revert "Change `ExtraInfo` to user fields, add search"
## Code After:
from __future__ import unicode_literals

from django.contrib import admin

from .models import ExtraInfo

admin.site.register(ExtraInfo)
