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

from django.contrib import admin

from .models import ExtraInfo

admin.site.register(ExtraInfo)

# -*- 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.
    """

    readonly_fields = (
        'user',
    )

    class Meta(object):
        model = ExtraInfo

admin.site.register(ExtraInfo, ExtraInfoAdmin)

Make `user` field read-only in `ExtraInfo` detail
Make `user` field read-only in `ExtraInfo` detail

Previously, server would hang trying to load an `ExtraInfo` detail page,
because the `user` field was rendering as a dropdown select menu loading
all users in the system. We fix this by making the field read-only.
