"""This module holds admin for ``photostories`` app."""

from django.contrib import admin

from .models import Photostory, Strip, Photo


@admin.register(Photostory)
class PhotostoryAdmin(admin.ModelAdmin):
    """Admin for ``Photostory`` model."""

    fields = ('name', 'description', 'session', 'training')
    raw_id_fields = ('session', 'training')


@admin.register(Strip)
class StripAdmin(admin.ModelAdmin):
    """Admin for ``Strip`` model."""

    fields = ('photostory', 'name', 'session', 'owner')
    raw_id_fields = ('owner', 'session')


@admin.register(Photo)
class PhotoAdmin(admin.ModelAdmin):
    """Admin for ``Photo`` model."""

    fields = ('strip', 'image')
