it/itf/app/views.py

26 lines
658 B
Python
Raw Permalink Normal View History

2010-12-06 22:33:00 +00:00
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)
2011-02-01 15:13:30 +00:00
2011-03-06 12:35:55 +00:00
2010-12-06 22:33:00 +00:00
def site_json(request):
data = {
'site': {
'name': 'India Theatre Forum.'
}
}
return render_to_json_response(data)
2011-03-06 12:35:55 +00:00