from django.template import RequestContext
from django.conf import settings
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404

from ox.django.shortcuts import json_response, render_to_json_response, get_object_or_404_json

from api.views import html_snapshot


def index(request):
    context = RequestContext(request, {'settings':settings})
    if request.GET.get('_escaped_fragment_', None):
        return html_snapshot(request)
    return render_to_response('index.html', context)



def site_json(request):
  data = {
    'site': {
      'name': 'India Theatre Forum.'
    }
  }
  return render_to_json_response(data)

