def events(request): dFutureEvents = dict((k,v) for k,v in D_EVENTS.iteritems() if v.get('future') == True) dPastEvents = dict((k,v) for k,v in D_EVENTS.iteritems() if v.get('future') != True) dData = { 'dEvents': OrderedDict(sorted(D_EVENTS.items(), key= lambda x: x[1]['order_date'], reverse=True)), 'dFutureEvents': OrderedDict(sorted(dFutureEvents.items(), key= lambda x: x[1]['order_date'], reverse=True)), 'dPastEvents': OrderedDict(sorted(dPastEvents.items(), key= lambda x: x[1]['order_date'], reverse=True)), } return render_to_response('events.html', dData)
def artists(request): dArtists = getArtistsData() lsArtists = [mArtist.username for mArtist in Artist.objects.all().order_by('display_order')] dData = { 'dArtists': dArtists, 'lsArtists': lsArtists, } return render_to_response('artists.html', dData)
def root(request): dArtists = getArtistsData() lsArtists = [mArtist.username for mArtist in Artist.objects.all().order_by('display_order')] dData = { 'dArtists': dArtists, 'lsArtists': lsArtists, 'dEvents': OrderedDict(sorted(D_EVENTS.items(), key= lambda x: x[1]['order_date'], reverse=True)), } return render_to_response('home.html', dData)
def event_photos(request, sEventId): dEvent = D_EVENTS.get(sEventId) dEvent['ldImages'] = [] for image in dEvent.get('images'): dEvent['ldImages'].append({ 'image': image.replace('/album/slides', ''), 'slide': image, }) dData = { 'dEvent': dEvent, 'sEventId': sEventId, } return render_to_response('event/photos.html', dData)
def exhibits(request): dData = { } return render_to_response('exhibits.html', dData)
def about(request): return render_to_response('about.html', {})
def opening(request): return render_to_response('opening.html', {})
def artist_gallery(request, sArtistId): dData = { 'dArtist': getArtistData(sArtistId), } return render_to_response('artist/gallery.html', dData)
def artist_videos(request, sArtistId): dData = { 'dArtist': getArtistData(sArtistId), } return render_to_response('artist/videos.html', dData)
def artist_statement(request, sArtistId): dData = { 'dArtist': getArtistData(sArtistId), } return render_to_response('artist/statement.html', dData)