2010-03-03 14:28:00 +00:00
|
|
|
from django.shortcuts import render_to_response
|
|
|
|
from django.http import HttpResponse
|
|
|
|
from django.contrib import admin
|
|
|
|
from settings import LANGUAGES
|
|
|
|
import simplejson
|
|
|
|
import sys
|
2010-10-21 16:51:01 +00:00
|
|
|
from forms import PersonForm, ConnectionFormset, ProductionFormset
|
|
|
|
|
|
|
|
def edit_profile(request):
|
|
|
|
u = request.user
|
|
|
|
#Do stuff like check if user has a person instance and then instantiate form with that person instance.
|
|
|
|
personForm = PersonForm()
|
|
|
|
formsets = [ConnectionFormset(), ProductionFormset()]
|
|
|
|
return render_to_response("itfcore/edit_profile.html", {
|
|
|
|
'personForm': personForm,
|
|
|
|
'formsets': formsets
|
|
|
|
})
|
|
|
|
|
|
|
|
def profile(request, name):
|
|
|
|
return HttpResponse(name)
|
2010-03-03 14:28:00 +00:00
|
|
|
|
|
|
|
def index(request):
|
|
|
|
return HttpResponse("India Theatre Forum - Coming Soon")
|
|
|
|
|
|
|
|
def getLanguages(request):
|
|
|
|
languages = LANGUAGES
|
|
|
|
langArr = []
|
|
|
|
for l in languages:
|
|
|
|
langDict = {}
|
|
|
|
langDict['short'] = l[0]
|
|
|
|
langDict['long'] = l[1]
|
|
|
|
langArr.append(langDict)
|
|
|
|
|
|
|
|
print langArr
|
|
|
|
json = simplejson.dumps(langArr)
|
|
|
|
return HttpResponse(json, mimetype='application/javascript')
|
|
|
|
|
|
|
|
def mockup(request):
|
|
|
|
return render_to_response("mockup.html")
|
|
|
|
|
|
|
|
def allnews(request):
|
|
|
|
return render_to_response("x0news.html")
|
|
|
|
|
|
|
|
def disc(request):
|
|
|
|
return render_to_response("x0disc.html")
|
|
|
|
|
|
|
|
def multi(request):
|
|
|
|
return render_to_response("x0multi.html")
|
|
|
|
|
|
|
|
def resources(request):
|
|
|
|
return render_to_response("x0resources.html")
|
|
|
|
|
|
|
|
def erang(request):
|
|
|
|
return render_to_response("x0erang.html")
|
|
|
|
|
2010-10-21 16:51:01 +00:00
|
|
|
'''
|
2010-03-03 14:28:00 +00:00
|
|
|
def profile(request):
|
|
|
|
return render_to_response("x0profile.html")
|
2010-10-21 16:51:01 +00:00
|
|
|
'''
|
2010-03-03 14:28:00 +00:00
|
|
|
|
|
|
|
def googlehosted(request):
|
|
|
|
return HttpResponse('googlefffffffffc014cb4')
|
|
|
|
|
|
|
|
# Create your views here.
|
|
|
|
|