<s> from django . conf import settings <EOL> from django . shortcuts import get_object_or_404 <EOL> from django . template import RequestContext <EOL> from ionyweb . website . rendering . utils import render_view <EOL> from ionyweb . website . rendering . medias import * <EOL> from models import Album <EOL> RENDER_MEDIAS = ( <EOL> CSSMedia ( '<STR_LIT>' ) , <EOL> CSSMedia ( '<STR_LIT>' , prefix_file = '<STR_LIT>' ) , <EOL> JSMedia ( '<STR_LIT>' ) , <EOL> JSMedia ( '<STR_LIT>' ) , <EOL> JSAdminMedia ( '<STR_LIT>' ) , <EOL> ) <EOL> def index_view ( request , page_app , album_slug = None ) : <EOL> """<STR_LIT>""" <EOL> context_instance = RequestContext ( request ) <EOL> if not album_slug : <EOL> return render_view ( '<STR_LIT>' , <EOL> { '<STR_LIT:object>' : page_app } , <EOL> RENDER_MEDIAS , <EOL> context_instance = context_instance ) <EOL> else : <EOL> album = get_object_or_404 ( Album , slug = album_slug ) <EOL> infos = { } <EOL> if page_app . show_album_title : <EOL> infos [ '<STR_LIT:title>' ] = album . title <EOL> infos [ '<STR_LIT>' ] = page_app . album_title_rule <EOL> if settings . BREADCRUMB_PLUGIN in settings . INSTALLED_APPS : <EOL> setattr ( request , settings . BREADCRUMB_OBJECT_TITLE , album . title ) <EOL> return render_view ( '<STR_LIT>' , <EOL> { '<STR_LIT:object>' : page_app , <EOL> '<STR_LIT>' : infos , <EOL> '<STR_LIT>' : album } , <EOL> RENDER_MEDIAS , <EOL> title = album . title , <EOL> context_instance = context_instance ) </s>
