Skip to content

Session admin

session.admin

ResultInline

Bases: TabularInline

Result inline admin for SessionAdmin

Source code in session/admin.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
class ResultInline(admin.TabularInline):
    """Result inline admin for SessionAdmin"""

    model = Result
    extra = 0

    # Field section is excluded from 'fields'
    # If it is added in the future, only show the raw_id
    # To not load a huge list of sections
    raw_id_fields = ("section",)

    fields = ['section', 'created_at', 'score', 'json_data',
              'expected_response', 'given_response', 'comment']