66 lines
1.6 KiB
Python
Executable File
66 lines
1.6 KiB
Python
Executable File
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
|
|
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)
|
|
|
|
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")
|
|
|
|
'''
|
|
def profile(request):
|
|
return render_to_response("x0profile.html")
|
|
'''
|
|
|
|
def googlehosted(request):
|
|
return HttpResponse('googlefffffffffc014cb4')
|
|
|
|
# Create your views here.
|
|
|