<s> import json <EOL> from django . core . urlresolvers import reverse <EOL> from django . db . models import Max <EOL> from django . shortcuts import redirect <EOL> from huxley . api . serializers import UserSerializer <EOL> from huxley . core . constants import ContactGender , ContactType , ProgramTypes <EOL> from huxley . core . models import Conference <EOL> from huxley . utils . shortcuts import render_template <EOL> def index ( request ) : <EOL> if request . user . is_superuser : <EOL> return redirect ( reverse ( '<STR_LIT>' ) ) <EOL> user_dict = { } ; <EOL> if request . user . is_authenticated ( ) : <EOL> user_dict = UserSerializer ( request . user ) . data <EOL> context = { <EOL> '<STR_LIT>' : json . dumps ( user_dict ) . replace ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : Conference . objects . all ( ) . aggregate ( Max ( '<STR_LIT>' ) ) [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : ContactGender . to_json ( ) , <EOL> '<STR_LIT>' : ContactType . to_json ( ) , <EOL> '<STR_LIT>' : ProgramTypes . to_json ( ) , <EOL> } <EOL> return render_template ( request , '<STR_LIT>' , context ) </s>
