major cleanup

This commit is contained in:
Sanj 2012-05-25 04:14:10 +05:30
parent 47c2183503
commit 250d1c8df6
81 changed files with 123 additions and 6938 deletions

View File

@ -1,97 +0,0 @@
new todos:
1. All headings/titles are centered right now. Would be nice if they could be left alligned to the paragraph.
Headings (h1 I guess?) should not be center-aligned by default.
2. All headings are bold. I thought they were looking better not bold. Only when they are selected they should get bold.
Maybe ignore this for now since I dont know wtf she means.
3. it would look noce if the space where the scrolling starts (in the central box) if we could have a larger margin above and below. Sanjay, I know i'm being unclear... I can explain this on the phone.
No. this is not possible.
4. The 2 titles - Welcome to.... and About us could start at the same level and that could also be the scroll margin.
I think I did this.
5. We could also have larger margins on the left and right of both the text boxes?
I think she refers to increasing the left and right padding on center and right boxes.
6. Inside MEETINGS all the text has become another font.
Inside tabs, all fonts have gone weird. Maybe look at the jquery-ui stylesheet to debug.
7. The tags could loose the orange outline if it's not a major problem.
Again - see if you can make this go away - but not sure if there's a solution.
8. In the pre-reading section all allignments are shifted
Fixed.
+ remove the jquery.mousewheel.js and jScrollPane js and css files as we are not using them .
+ Figure ordering meetings by date, and sending dateStart and dateEnd of meetings as context vars to meetings page .
That's all I can think of for now.
Cheers,
Sanj
(09:25:50 IST) b@pad.ma: 1> Plugin text for about / intro / static pages.
(09:25:57 IST) b@pad.ma: 2> Change tabs design.
(09:26:34 IST) b@pad.ma: 3> Move / style email signup, for me, change the JS around to go with new design .
(09:27:20 IST) b@pad.ma: 4> Handle hover states for meetings, projects, and participants lists.
(09:28:13 IST) b@pad.ma: 5> Todo for me: Make video page.
(09:29:46 IST) b@pad.ma: 6> Replace current jquery-ui,js with a custom download of just the components we need.
(09:31:53 IST) b@pad.ma: 7> Update urls and all, push to server.
(09:31:58 IST) b@pad.ma: Nice to haves:
(09:32:13 IST) b@pad.ma: 1> Have the currently selected page button show up as selected on the left nav.
(09:32:21 IST) b@pad.ma: 2> Have the custom scrollbar images done .
DEADLINES:
10th - finalize site structure and functionality
15th - launch.
16th - meeting for eRang
NOTES:
tell sharvari for now, not to use inline fields for attaching images/docs/vids/audio to talks. use non-inline method instead.
TODO:
1) view for upcoming meetings, ordered by meeting day.
2) frontend js to receive upcoming meetings, populate accordion
3) recreate jquery-custom package
nm = MeetingDay.objects.filter(meeting_date__gte=date.today).order_by('meeting_date')
bzr push lp:~campmumbai/+junk/itf0-1

View File

View File

@ -1,95 +0,0 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import sys
from django.conf import settings
from ox.django.shortcuts import render_to_json_response, json_response
def autodiscover():
#register api actions from all installed apps
from django.utils.importlib import import_module
from django.utils.module_loading import module_has_submodule
for app in settings.INSTALLED_APPS:
if app != 'api':
mod = import_module(app)
try:
import_module('%s.views'%app)
except:
if module_has_submodule(mod, 'views'):
raise
def trim(docstring):
if not docstring:
return ''
# Convert tabs to spaces (following the normal Python rules)
# and split into a list of lines:
lines = docstring.expandtabs().splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxint
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [lines[0].strip()]
if indent < sys.maxint:
for line in lines[1:]:
trimmed.append(line[indent:].rstrip())
# Strip off trailing and leading blank lines:
while trimmed and not trimmed[-1]:
trimmed.pop()
while trimmed and not trimmed[0]:
trimmed.pop(0)
# Return a single string:
return '\n'.join(trimmed)
class ApiActions(dict):
properties = {}
def __init__(self):
def api(request):
'''
returns list of all known api action
return {'status': {'code': int, 'text': string},
'data': {actions: ['api', 'hello', ...]}}
'''
_actions = self.keys()
_actions.sort()
actions = {}
for a in _actions:
actions[a] = self.properties[a]
response = json_response({'actions': actions})
return render_to_json_response(response)
self.register(api)
def apidoc(request):
'''
returns array of actions with documentation
'''
actions = self.keys()
actions.sort()
docs = {}
for f in actions:
docs[f] = self.doc(f)
return render_to_json_response(json_response({'actions': docs}))
self.register(apidoc)
def doc(self, f):
return trim(self[f].__doc__)
def register(self, method, action=None, cache=True):
if not action:
action = method.func_name
self[action] = method
self.properties[action] = {'cache': cache}
def unregister(self, action):
if action in self:
del self[action]
actions = ApiActions()

View File

@ -1,3 +0,0 @@
from django.db import models
# Create your models here.

View File

@ -1,23 +0,0 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

View File

@ -1,408 +0,0 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import division
import os.path
from os.path import join
import re
from datetime import datetime
from urllib2 import unquote
import mimetypes
from django import forms
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.db.models import Q, Avg, Count, Sum
from django.http import HttpResponse, Http404
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404, redirect
from django.template import RequestContext
from django.conf import settings
from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment
from django.contrib.comments.signals import comment_will_be_posted, comment_was_posted
from django.contrib.contenttypes.models import ContentType
from ox.utils import json
from ox.django.decorators import login_required_json
from ox.django.shortcuts import render_to_json_response, get_object_or_404_json, json_response
from ox.django.http import HttpFileResponse
import ox
from actions import actions
from user.models import get_user_json
from django.views.decorators.csrf import csrf_exempt
from boxes.views import _getPageData
@csrf_exempt
def api(request):
if request.META['REQUEST_METHOD'] == "OPTIONS":
response = render_to_json_response({'status': {'code': 200,
'text': 'use POST'}})
response['Access-Control-Allow-Origin'] = '*'
return response
if not 'action' in request.POST:
methods = actions.keys()
api = []
for f in sorted(methods):
api.append({'name': f,
'doc': actions.doc(f).replace('\n', '<br>\n')})
context = RequestContext(request, {'api': api,
'sitename': settings.SITENAME})
return render_to_response('api.html', context)
function = request.POST['action']
#FIXME: possible to do this in f
#data = json.loads(request.POST['data'])
f = actions.get(function, None)
if f:
response = f(request)
else:
response = render_to_json_response(json_response(status=400,
text='Unknown function %s' % function))
response['Access-Control-Allow-Origin'] = '*'
return response
#def api_api(request):
# '''
# returns list of all known api action
# return {'status': {'code': int, 'text': string},
# 'data': {actions: ['api', 'hello', ...]}}
# '''
# actions = globals().keys()
# actions = map(lambda a: a[4:], filter(lambda a: a.startswith('api_'), actions))
# actions.sort()
# ret = {}
# #FIXME: set cache to False for login, logout, etc.
# for a in actions:
# ret[a] = {
# 'cache': True
# }
# return render_to_json_response(json_response({'actions': ret}))
#def api_apidoc(request):
# '''
# returns array of actions with documentation
# '''
# actions = globals().keys()
# actions = map(lambda a: a[4:], filter(lambda a: a.startswith('api_'), actions))
# actions.sort()
# docs = {}
# for f in actions:
# docs[f] = get_api_doc(f)
# return render_to_json_response(json_response({'actions': docs}))
def init(request):
'''
return {'status': {'code': int, 'text': string},
'data': {user: object}}
'''
#data = json.loads(request.POST['data'])
response = json_response({})
if request.user.is_authenticated():
response['data']['user'] = get_user_json(request.user)
else:
response['data']['user'] = {'name': 'Guest', 'group': 'guest', 'level': 'guest', 'preferences': {}}
#FIXME: Get config definition out of here.
response['data']['config'] = {
'site': {
'name': 'India Theatre Forum'
}
}
# response['data']['page'] = _getPageData(request)
return render_to_json_response(response)
actions.register(init)
def error(request):
'''
trows 503 error
'''
success = error_is_success
return render_to_json_response({})
actions.register(error)
def find(request):
data = json.loads(request.POST['data'])
# print json.dumps(data)
model = getModel(data)
response = json_response({})
l = model.get_list(data)
if data.has_key('ids'):
ids = data['ids']
else:
ids = []
if data.has_key('range'):
response['data']['items'] = l
else:
response['data']['items'] = len(l)
response['data']['positions'] = _get_positions(ids, l)
response['status'] = {'code': 200}
return render_to_json_response(response)
actions.register(find)
def _get_positions(ids, l):
ret = {}
i = 0
for id in ids:
for obj in l:
if obj['id'] == id:
ret[id] = i
break
i += 1
return ret
def preview(request):
data = json.loads(request.POST['data'])
if not data.has_key('id'):
return render_to_json_response({'status': {'code': 404}})
id = int(data['id'])
model = getModel(data)
response = json_response({})
response['status'] = {'code': 200}
obj = get_object_or_404(model, pk=id)
response['data'] = obj.preview_dict()
response['template'] = getTemplate(data, "preview")
return render_to_json_response(response)
actions.register(preview)
#FIXME: Generalize based on these two functions being the same.
def info(request):
'''
id: object id
model: string, name of model
module: string, name of module
'''
data = json.loads(request.POST['data'])
id = int(data['id'])
model = getModel(data)
response = json_response({})
response['status'] = {'code': 200}
obj = get_object_or_404(model, pk=id)
if model.hasComments:
response['commentForm'] = _get_comment_form_initial(request, obj)
response['comments'] = _get_comments(obj)
response['data'] = obj.info_dict()
response['template'] = getTemplate(data, "info")
return render_to_json_response(response)
actions.register(info)
#obj: Django model instance - object for which to get comment form for.
#Returns dict with content_type, object_id, security_hash, etc.
#FIXME: put comments stuff somewhere
def _get_comment_form_initial(request, obj):
c = CommentForm(obj)
return c.initial
def _get_comments(obj):
ret = []
content_type = ContentType.objects.get_for_model(obj)
object_id = obj.id
qset = Comment.objects.filter(content_type=content_type, object_pk=object_id)
for q in qset:
ret.append({
'name': q.name,
# 'date': q.submit_date,
'comment': q.comment
})
return ret
@login_required_json
def addComment(request):
'''
id
module
model
comment
content_type
email
name
object_pk
security_hash
timestamp
'''
data = json.loads(request.POST['data'])
data.update({
'name': request.user.username,
'email': request.user.email
})
id = int(data['object_pk'])
model = getModel(data)
obj = get_object_or_404_json(model, pk=id)
cf = CommentForm(obj, data=data)
ret = json_response({})
if cf.is_valid():
comment = cf.get_comment_object()
comment.user = request.user
# Signal that the comment is about to be saved
responses = comment_will_be_posted.send(
sender = comment.__class__,
comment = comment,
request = request
)
for (receiver, response) in responses:
if response == False:
return CommentPostBadRequest(
"comment_will_be_posted receiver %r killed the comment" % receiver.__name__)
# Save the comment and signal that it was saved
comment.save()
comment_was_posted.send(
sender = comment.__class__,
comment = comment,
request = request
)
ret['data'] = {
id: comment.id
}
ret['status'] = {'code': 200}
else:
ret['status'] = {'code': 200}
ret['errors'] = cf.errors
return render_to_json_response(ret)
actions.register(addComment)
widgetMap = {
'TextInput': 'text',
'Textarea': 'textarea',
'Select': 'select'
}
def getAddItemForm(request):
response = json_response({})
data = json.loads(request.POST['data'])
model = getModel(data)
# import pdb; pdb.set_trace()
form = getForm(data)
form_fields = []
for field in form.base_fields:
name = field
this = form.base_fields[field]
widget = this.widget
widgetClassName = type(widget).__name__
if hasattr(widget, "choices"):
choices = []
for c in widget.choices:
if c[0] == '':
id = 0
else:
id = c[0]
choices.append({
'id': id,
'title': c[1]
})
else:
choices = False
js_widget = widgetMap.get(widgetClassName, "text")
form_fields.append({
'name': name,
'widget': js_widget,
'label': this.label,
'choices': choices
})
response['data']['form'] = form_fields
return render_to_json_response(response)
actions.register(getAddItemForm)
@login_required_json
def addItem(request):
response = json_response({})
data = json.loads(request.POST['data'])
model = getModel(data)
form = getForm(data)
if form.is_valid():
m = model()
for field in form.base_fields:
m.__setattr__(field, form.cleaned_data[field])
m.save()
response['data'] = {'id': m.id}
else:
response['errors'] = form.errors
return render_to_json_response(response)
actions.register(addItem)
def getTemplate(data, tmpl_name):
path = join(settings.PROJECT_PATH, "templates", data['module'], data['model'], tmpl_name + ".html")
return open(path).read().strip()
def getModel(data):
module = __import__(data['module'])
return module.models.__getattribute__(data['model'])
#FIXME: BAAD Hack
def getForm(data):
module = __import__(data['module'] + ".forms")
model = getModel(data)
formStr = model.add_form
return module.forms.__getattribute__(formStr)
def get_api_doc(f):
f = 'api_' + f
import sys
def trim(docstring):
if not docstring:
return ''
# Convert tabs to spaces (following the normal Python rules)
# and split into a list of lines:
lines = docstring.expandtabs().splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxint
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [lines[0].strip()]
if indent < sys.maxint:
for line in lines[1:]:
trimmed.append(line[indent:].rstrip())
# Strip off trailing and leading blank lines:
while trimmed and not trimmed[-1]:
trimmed.pop()
while trimmed and not trimmed[0]:
trimmed.pop(0)
# Return a single string:
return '\n'.join(trimmed)
return trim(globals()[f].__doc__)
def apidoc(request):
'''
this is used for online documentation at http://127.0.0.1:8000/api/
'''
functions = filter(lambda x: x.startswith('api_'), globals().keys())
api = []
for f in sorted(functions):
api.append({
'name': f[4:],
'doc': get_api_doc(f[4:]).replace('\n', '<br>\n')
})
context = RequestContext(request, {'api': api,
'sitename': settings.SITENAME,})
return render_to_response('api.html', context)
def jsdoc(request):
'''
Used to document OxUI JS Widgets
'''
context = RequestContext(request, {})
return render_to_response("jsdoc.html", context)
'''
ajax html snapshots
http://code.google.com/web/ajaxcrawling/docs/html-snapshot.html
'''
def html_snapshot(request):
fragment = unquote(request.GET['_escaped_fragment_'])
url = request.build_absolute_uri('/ra')
url = 'http://'+settings.URL
response = HttpResponse('sorry, server side rendering for %s!#%s not yet implemented'%(url, fragment))
return response

View File

@ -334,7 +334,9 @@ class ItfModel(models.Model):
results = paginator.page(paginator.num_pages) results = paginator.page(paginator.num_pages)
for r in results.object_list: for r in results.object_list:
ret.append(r.list_dict()) d = r.list_dict()
d['url'] = r.get_absolute_url()
ret.append(d)
return { return {

View File

View File

@ -1,24 +0,0 @@
from django.contrib import admin
from models import ModelExtra, ModelSort, DialogButton, StaticDownloadButton, ModelDownloadButton, ExtraButton, PanelBoxes, StaticBox, ModelsBox, Panel
'''
class ButtonsInline(admin.StackedInline):
model = ModelExtraButton
extra = 2
class ModelBoxAdmin(admin.ModelAdmin):
inlines = [ButtonsInline]
'''
#admin.site.register(ModelBox, ModelBoxAdmin)
admin.site.register(ModelExtra)
admin.site.register(ModelSort)
admin.site.register(DialogButton)
admin.site.register(StaticDownloadButton)
admin.site.register(ModelDownloadButton)
admin.site.register(ExtraButton)
admin.site.register(PanelBoxes)
admin.site.register(StaticBox)
admin.site.register(ModelsBox)
admin.site.register(Panel)

View File

@ -1,241 +0,0 @@
from django.db import models
from django.contrib.contenttypes.models import ContentType
from app.models import ItfModel
from django.contrib.contenttypes import generic
'''
Classes that need to link to a ContentType should link to ModelExtra instead. Maybe there's a better way to do this?
'''
class ModelExtra(models.Model):
model = models.OneToOneField(ContentType)
friendly_name = models.CharField(max_length=255, blank=True, null=True)
friendly_name_plural = models.CharField(max_length=255, blank=True, null=True)
sort_options = models.ManyToManyField("ModelSort", blank=True, null=True)
has_comments = models.BooleanField(default=False)
def __unicode__(self):
return "%d: %s" % (self.id, self.friendly_name)
def get_dict(self):
return {
'id': self.id,
'module': self.model.model_class()._meta.app_label,
'model': self.model.model_class().__name__,
'has_comments': self.has_comments,
# 'info': self.info,
'friendly_name': self.friendly_name,
'friendly_name_plural': self.friendly_name_plural,
'fk_filters': self.model.model_class().fk_filters,
'fts_fields': self.model.model_class().fts_fields,
'sort_options': map(lambda x: {'key': x.key, 'operator': x.operator, 'text': x.text}, self.sort_options.all())
}
class ModelSort(models.Model):
operator = models.CharField(max_length=4)
key = models.CharField(max_length=64)
text = models.CharField(max_length=256)
def __unicode__(self):
return "%s%s: %s" % (self.operator, self.key, self.text,)
"""
Base class for buttons - buttons can be an 'extra_button' for either a Box class or an instance of a model (defined in ModelExtra).
"""
class Button(ItfModel):
typ = ''
icon = models.CharField(max_length=255) #FIXME: read choices from list of icons
mouseover = models.CharField(max_length=255)
class Meta:
abstract = True
def __unicode__(self):
return "%d: %s" % (self.id, self.mouseover)
def get_dict(self):
data = self.get_data()
data['id'] = self.id,
data['type'] = self.typ,
data['icon'] = self.icon,
data['mouseover'] = self.mouseover
return data
'''
Subclasses need to implement get_data and return additional data-items as a dict. Keys cannot be one of 'type', 'icon', and 'mouseover' in the return value.
'''
def get_data(self):
return {}
class BoxButton(Button):
class Meta:
abstract = True
class ModelButton(Button):
class Meta:
abstract = True
class DialogButton(BoxButton):
typ = 'dialog'
dialogTitle = models.CharField(max_length=255)
dialogHTML = models.TextField()
def get_data(self):
return {
'title': self.dialogTitle,
'html': self.dialogHTML
}
class StaticDownloadButton(BoxButton):
typ = 'staticDownload'
fil = models.FileField(upload_to='uploads/button_downloads/')
def get_data(self):
return {
'file': {
'path': self.fil.url
}
}
class ModelDownloadButton(ModelButton):
typ = 'modelDownload'
file_field = models.CharField(max_length=100) #name of field which holds the file/s(?) to be downloaded
def get_data(self):
return {
'file': {
'path': self.fil.url
}
}
"""
Join model to enable m2m relations to generic foreign keys
"""
class ExtraButton(models.Model):
related_name = models.CharField(max_length=255, blank=True, null=True)
button_content_type = models.ForeignKey(ContentType)
button_id = models.PositiveIntegerField()
button = generic.GenericForeignKey('button_content_type', 'button_id')
def __unicode__(self):
return "%d: %s" % (self.id, self.related_name)
def get_dict(self):
return self.button.get_dict()
"""
Join model
"""
class PanelBoxes(models.Model):
related_name = models.CharField(max_length=255, blank=True, null=True)
box_content_type = models.ForeignKey(ContentType)
box_id = models.PositiveIntegerField()
box = generic.GenericForeignKey("box_content_type", "box_id")
def __unicode__(self):
return "%d: %s" % (self.id, self.related_name)
def get_dict(self):
return self.box.get_dict()
class Meta:
verbose_name = "Panel box"
verbose_name_plural = "Panel boxes"
'''
Abstract base-class for boxes.
'''
class Box(ItfModel):
title = models.CharField(max_length=256)
extra_buttons = models.ManyToManyField("ExtraButton", blank=True, null=True)
logo = models.ImageField(upload_to="upload/box_logos/", blank=True, null=True)
class Meta:
abstract = True
def render():
return ''
def __unicode__(self):
return "%d: %s" % (self.id, self.title)
def _get_buttons(self):
ret = []
for b in self.extra_buttons.all():
ret.append(b.button.get_dict())
return ret
def get_dict(self):
return {}
class StaticBox(Box):
html = models.TextField(blank=True, null=True)
def get_dict(self):
return {
'id': self.id,
'type': 'StaticBox',
'title': self.title,
'html': self.html,
'extra_buttons': self._get_buttons()
}
class ModelsBox(Box):
default_model = models.ForeignKey(ModelExtra)
view_models = models.ManyToManyField(ModelExtra, related_name="box_views", blank=True, null=True)
info = models.TextField(blank=True)
@property
def module(self):
return self.default_model.app_label
def get_dict(self):
data = {
'id': self.id,
'type': 'ModelsBox',
'title': self.title,
'info': self.info,
'extra_buttons': self._get_buttons(),
'default_model': self.default_model.get_dict(),
'view_models': map(lambda x: x.get_dict(), self.view_models.all())
}
return data
class Panel(models.Model):
title = models.CharField(max_length=255)
boxes = models.ManyToManyField("PanelBoxes", blank=True, null=True)
enabled = models.BooleanField(default=False)
displayed = models.BooleanField(default=False)
def __unicode__(self):
return self.title
def get_dict(self):
return {
'id': self.id,
'title': self.title,
'boxes': map(lambda x: x.get_dict(), self.boxes.all())
}
'''
class Page(models.Model):
class Meta:
abstract = True
'''

View File

@ -1,23 +0,0 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

View File

@ -1,48 +0,0 @@
# Create your views here.
from api.actions import actions
import ox
from django.shortcuts import render_to_response
from ox.django.decorators import login_required_json
from ox.django.shortcuts import render_to_json_response, get_object_or_404_json, json_response
from models import Panel
import json
from django.template import RequestContext
def mainPage(request):
d = {'title': 'India Theatre Forum'}
return render_to_response("noel/index.html", d)
def innerPage(request):
return render_to_response("noel/bestpractices.html", RequestContext(request, {}))
def getPage(request):
'''
returns displayed panels as displayed; hidden panels as hidden.
each panel is:
title
boxes:
type
title
default_model
etc
'''
# data = json.loads(request.POST['data'])
panels = _getPageData(request)
response = json_response({})
response['data'] = panels
response['status'] = {'code': 200}
return render_to_json_response(response)
actions.register(getPage)
def _getPageData(request):
data = json.loads(request.POST['data'])
displayedPanels = Panel.objects.filter(enabled=True).filter(displayed=True)
hiddenPanels = Panel.objects.filter(enabled=True).filter(displayed=False)
panels = {}
panels['displayed'] = []
for d in displayedPanels:
panels['displayed'].append(d.get_dict())
panels['hidden'] = []
for h in hiddenPanels:
panels['hidden'].append(h.get_dict())
return panels

View File

@ -1,20 +0,0 @@
import sys
import os
from settings import DATABASE_NAME
try:
import settings # Assumed to be in the same directory.
except ImportError:
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)
filename = "/tmp/tmp.txt"
tmpfile = open(filename, "w")
tmpfile.write("DROP DATABASE %s;\nCREATE DATABASE %s;\n" % (DATABASE_NAME, DATABASE_NAME) )
tmpfile.close()
os.system("mysql -u root < " + filename)
os.system("python manage.py syncdb --noinput")
os.system("python manage.py createsuperuser --username admin --email user@user.com")

View File

View File

@ -1,44 +0,0 @@
from django.contrib import admin
from models import *
# from forms import ArticleForm
class ArticleInline(admin.StackedInline):
model = Article
extra = 4
filter_horizontal = ['authors']
class ImageInline(admin.StackedInline):
model = Image
extra = 4
class DocumentInline(admin.StackedInline):
model = Document
extra = 4
class IssueAdmin(admin.ModelAdmin):
list_display = ('name', 'date', 'published',)
inlines = [ArticleInline, ImageInline, DocumentInline]
save_on_top = True
class ContributorAdmin(admin.ModelAdmin):
pass
class DocumentAdmin(admin.ModelAdmin):
list_filter = ['issue']
search_fields = ('doc_txt',)
list_display = ('title', 'doc_txt',)
class ImageAdmin(admin.ModelAdmin):
list_filter = ['issue']
class ArticleAdmin(admin.ModelAdmin):
filter_horizontal = ['authors']
list_filter = ['issue']
# form = ArticleForm
admin.site.register(Issue, IssueAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(Document, DocumentAdmin)
admin.site.register(Contributor, ContributorAdmin)
admin.site.register(Image, ImageAdmin)

View File

@ -1,99 +0,0 @@
from django.db import models
import datetime
from django.db.models.signals import post_save
# import subprocess
import os
import codecs
class Issue(models.Model):
name = models.CharField(max_length=255)
date = models.DateField()
published = models.BooleanField(default=False)
notes = models.TextField(blank=True)
is_itf_model = False
def __unicode__(self):
return self.name
class Article(models.Model):
authors = models.ManyToManyField("Contributor", blank=True, null=True)
title = models.CharField(max_length=255)
order = models.IntegerField(blank=True, null=True)
notes = models.TextField(blank=True)
issue = models.ForeignKey(Issue)
def __unicode__(self):
return self.title + " - " + self.author
class Contributor(models.Model):
name = models.CharField(max_length=255)
email = models.EmailField(blank=True, null=True)
def __unicode__(self):
return self.name + ": " + self.email
DOC_CATEGORIES = (
('main', 'Main Article'),
('secondary', 'Secondary Article'),
('feedback', 'Feedback'),
('announce', 'Announcements & Reviews'),
('reference', 'Reference'),
('other', 'Other'),
)
class Document(models.Model):
file = models.FileField(upload_to='erang/documents/')
title = models.CharField(max_length=500)
issue = models.ForeignKey(Issue)
category = models.CharField(max_length=255, choices=DOC_CATEGORIES, blank=True)
notes = models.TextField(blank=True)
contributor = models.ForeignKey(Contributor, blank=True, null=True)
doc_txt = models.TextField(blank=True)
date_added = models.DateTimeField(default=datetime.datetime.now(), editable=False)
def txtPath(self):
path = self.file.path
return path + ".txt"
def __unicode__(self):
return self.title
class Image(models.Model):
file = models.FileField(upload_to='erang/images/')
title = models.CharField(max_length=255)
contributor = models.ForeignKey(Contributor, blank=True, null=True)
issue = models.ForeignKey(Issue)
notes = models.TextField(blank=True)
date_added = models.DateTimeField(default=datetime.datetime.now(), editable=False)
def __unicode__(self):
return self.title
'''
def docToTxt(**kwargs):
obj = kwargs['instance']
f = open("/tmp/tmpDocToTxt.txt", "w")
s = subprocess.Popen(["antiword", "-f", "-m", "UTF-8", obj.file.path], stdout = f)
f.close()
f2 = open("/tmp/tmpDocToTxt.txt")
txt = f2.read()
f2.close()
obj.doc_txt = txt
obj.save()
return
'''
def docToTxt(**kwargs):
obj = kwargs['instance']
docFilePath = obj.file.path
txtPath = obj.txtPath()
if not os.path.isfile(txtPath):
os.system("antiword -f -m 'UTF-8' '%s' > %s" % (docFilePath, txtPath,))
f = codecs.open(txtPath, encoding='utf-8')
txt = f.read()
f.close()
obj.doc_txt = txt
obj.save()
return
return
post_save.connect(docToTxt, sender=Document)

View File

@ -1,23 +0,0 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

View File

@ -1 +0,0 @@
# Create your views here.

View File

@ -1,13 +0,0 @@
from django.contrib import admin
from models import *
# from forms import ArticleForm
class IssueAdmin(admin.ModelAdmin):
list_display = ('title', 'date',)
admin.site.register(Issue, IssueAdmin)

View File

@ -1,59 +0,0 @@
from django.db import models
from django.contrib.comments.signals import comment_was_posted
from django.core.mail import send_mail
from app.models import ItfModel
class Issue(ItfModel):
title = models.CharField(max_length=255)
summary = models.TextField(blank=True, null=True)
date = models.DateField()
html = models.TextField(blank=True)
fts_fields = ['title', 'summary']
fk_filters = []
def preview_dict(self):
return {
'id': self.id,
'title': self.title,
'summary': self.summary,
}
def info_dict(self):
d = self.preview_dict()
d['html'] = self.html
return d
def list_dict(self):
return {
'id': self.id,
'title': self.title
}
def __unicode__(self):
return self.title
def get_dict(self):
#FIXME: return self.date in JSON-friendly way
return {
'id': self.id,
'title': self.title,
'summary': self.summary,
}
# Create your models here.
def comments_notify(sender, **kwargs):
comment = kwargs['comment']
name = comment.name
email = comment.email
content = comment.comment
erang_id = comment.content_object.id
comment_id = comment.id
# url = "http://theatreforum.in/erang/?issue_id=%d" % (erang_id)
admin_url = "http://theatreforum.in/admin/comments/comment/%d/" % (comment_id)
message = "Name: %s \n Email: %s \n Comment: %s\n\n Moderate: %s" % (name, email, content, admin_url)
send_mail("New comment on Theatreforum.in", message, "do_not_reply@theatreforum.in", ["sanjaybhangar@gmail.com"])
return True
comment_was_posted.connect(comments_notify)

View File

@ -1,8 +0,0 @@
from django import template
register = template.Library()
def absolutify_links(value):
return value.replace('src="img.x', 'src="http://a.organisedmail.com/img.x')
register.filter("absolutify_links", absolutify_links)

View File

@ -1,23 +0,0 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

View File

@ -1,13 +0,0 @@
from django.conf.urls.defaults import *
import views
urlpatterns = patterns('',
# Example:
# (r'^bhangar/', include('bhangar.foo.urls')),
#(r'^search/', include('solango.urls')),
(r'^$', views.home),
(r'^subscribe/$', views.subscribe),
(r'^search/$', views.search),
# (r'^postfeedback/$', views.postfeedback),
(r'^issue_list/$', views.issue_list),
)

View File

@ -1,108 +0,0 @@
# Create your views here.
from django.shortcuts import render_to_response
from models import Issue
from settings import ERANG_SUBSCRIBE_URL
import urllib2
from django.http import HttpResponse
from django.core.mail import send_mail
from django.db.models import Q
from ox.django.shortcuts import render_to_json_response
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.template import RequestContext
from django.views.decorators.csrf import csrf_exempt
RESULTS_PER_PAGE = 6
def home(request):
all_issues = Issue.objects.all().order_by('-date')
if request.GET.has_key('issue_id'):
issue_id = request.GET.get('issue_id')
else:
# l = 0
issue_id = all_issues[0].id
current_issue = Issue.objects.get(pk=issue_id)
other_issues = all_issues.exclude(pk=issue_id)
hasCommented = request.GET.has_key('c')
return render_to_response("erang/home.html", {
'current_issue': current_issue,
'hasCommented': hasCommented
# 'past_issues': other_issues
}, context_instance=RequestContext(request))
def issue_list(request):
p = RESULTS_PER_PAGE
try:
page_no = int(request.GET.get("page", '1'))
except ValueError:
page_no = 1
# print start_no
search_terms = request.GET.get("search", "")
# print search_terms
if search_terms != '':
qset = search(search_terms)
else:
qset = Issue.objects.all()
qset = qset.order_by('-date')
paginator = Paginator(qset, p)
try:
results = paginator.page(page_no)
except (EmptyPage, InvalidPage):
results = paginator.page(paginator.num_pages)
issues = []
for r in results.object_list:
d = r.get_dict()
issues.append(d)
return render_to_json_response({
'hasPrev': results.has_previous(),
'hasNext': results.has_next(),
'issues': issues,
'page_no': page_no,
'search_terms': search_terms
})
@csrf_exempt
def subscribe(request):
email = request.POST.get("email")
url = ERANG_SUBSCRIBE_URL + email
re = urllib2.urlopen(url).read()
return HttpResponse(re)
def search(terms):
# terms = request.GET['search']
words = terms.split(" ")
qset = Issue.objects.all()
issues = []
for w in words:
qset = qset.filter(Q(title__icontains=w) | Q(summary__icontains=w))
return qset
'''
for issue in qset:
d = issue.get_dict()
issues.append(d)
return issues
'''
'''
def postfeedback(request):
p = request.POST
issue = p.get("issue")
name = p.get("name")
email = p.get("email")
comment = p.get("comment")
txt = """
Feedback on Issue: %s
Name: %s
Email: %s
Feedback %s
""" % (issue, name, email, comment,)
send_mail("eRang Feedback", txt, "do-not-reply@theatreforum.in", ['sanjaybhangar@gmail.com', 'erang@theatreforum.in'])
return HttpResponse("1")
'''

View File

@ -5,5 +5,6 @@ urlpatterns = patterns('',
(r'^get_list$', views.get_list), (r'^get_list$', views.get_list),
(r'^get_details$', views.get_details), (r'^get_details$', views.get_details),
(r'^get_tab$', views.get_tab), (r'^get_tab$', views.get_tab),
(r'^(?P<module_slug>.*)/$', views.main), #(r'^static/(?P<module_slug>.*)/$', views.render_object),
(r'^(?P<module_slug>.*)/$', views.render_object),
) )

View File

@ -80,3 +80,49 @@ def get_details(request):
return render_to_json_response(ret) return render_to_json_response(ret)
def render_object(request, module_slug):
module = get_object_or_404(Module, slug=module_slug)
tab_slug = request.GET.get("tab", '')
try:
tab = get_object_or_404(ModuleTab, slug=tab_slug)
except:
try:
tab = module.moduletab_set.filter(is_default=True)[0]
except:
tab = module.moduletab_set.all()[0]
model_class = tab.model_class()
object_id = request.GET.get("object_id", 0)
sortString = request.GET.get("sort", "")
if sortString == "" or sortString == 'null':
sortArray = []
else:
sortOperator = sortString[0]
sortField = sortString[1:]
sortArray = [{
'operator': sortOperator,
'key': sortField
}]
list_options = {
'search': request.GET.get("search", ""),
'sort': sortArray,
'page': request.GET.get("page", 1),
'object_id': object_id,
'count': request.GET.get("count", 15) #FIXME: make list_length either in settings.py or config per model
}
object_list = tab.get_list(list_options)
if object_id == 0:
object_id = object_list['items'][0]['id']
obj = get_object_or_404(model_class, pk=object_id)
item_data = obj.insidepage_dict(request)
context = RequestContext(request, {
'item': obj,
'item_data': item_data,
'tab': tab,
'object_list': object_list,
'tabs': tab.module.moduletab_set.all()
})
return render_to_response("noel/render_object.html", context)

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ from os.path import join
# import markdown # import markdown
SITENAME = "India Theatre Forum" SITENAME = "India Theatre Forum"
DEBUG = True DEBUG = False
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
JSON_DEBUG = DEBUG JSON_DEBUG = DEBUG
@ -177,7 +177,7 @@ INSTALLED_APPS = (
'festival', 'festival',
'insidepages', 'insidepages',
# 'erang', # 'erang',
'erang_organised', # 'erang_organised',
'scriptbank', 'scriptbank',
'bestpractices', 'bestpractices',
'emailer', 'emailer',
@ -186,7 +186,7 @@ INSTALLED_APPS = (
'tagging', 'tagging',
'app', 'app',
'padmavideos', 'padmavideos',
'api', # 'api',
# 'boxes', # 'boxes',
'frontpage', 'frontpage',
# 'solango', # 'solango',
@ -198,7 +198,7 @@ INSTALLED_APPS = (
'crispy_forms', 'crispy_forms',
'floppyforms', 'floppyforms',
# 'south', # 'south',
'user', # 'user',
'ckeditor', 'ckeditor',
'fccv', 'fccv',
'haystack', 'haystack',

View File

@ -1,3 +0,0 @@
ALTER TABLE `bestpractices_bestpractice`
ADD `display_image` varchar(100);

View File

@ -1,57 +1,68 @@
'use strict'; 'use strict';
/*
jQuery plugin to embed video from a pan.do/ra instance
Usage:
html:
<div id="video" data-pandora-id="AA"></div>
js:
$('#video').pandoravideo();
Options can be passed as data- attributes in the html or in an options object - read code for docs
*/
(function($) { (function($) {
$.fn.pandoravideo = function(options) { $.fn.pandoravideo = function(options) {
//get options, giving preference, in order, to data- attributes defined on the html element, options passed when instantiatiing $(element).pandoravideo(options), defaults. //get options, giving preference, in order, to data- attributes defined on the html element, options passed when instantiatiing $(element).pandoravideo(options), defaults.
var options = options || {}, var options = options || {},
namespace = options.namespace || "pandora", namespace = options.namespace || "pandora",
$this = this;
optionTypes = {
'strings': ['api', 'base', 'resolution', 'action', 'id'],
'integers': ['width', 'interval'],
'floats': ['in', 'out'],
'arrays': ['layers', 'keys'],
'booleans': []
//'functions': ['callback'] FIXME: lets not.
};
var optionTypes = { return this.each(function() {
'strings': ['api', 'base', 'resolution', 'action', 'id'],
'integers': ['width', 'interval'],
'floats': ['in', 'out'],
'arrays': ['layers', 'keys'],
'booleans': []
//'functions': ['callback'] FIXME: lets not.
};
var dataOptions = $.extend(options, $this.getDataOptions(optionTypes, namespace)); var $this = $(this),
dataOptions = $.extend(options, $this.getDataOptions(optionTypes, namespace)),
opts = $.extend({
'id': 'ABC', //FIXME: throw an error if id is undefined at this point
'layers': ['transcripts', 'descriptions', 'keywords', 'places'],
'keys': ['layers'], //data keys to fetch from API call. FIXME: add more apt keys
'api': "//pad.ma/api/", //pandora instance api end-point - see http://pad.ma/api
'in': 0, //in point (float, in seconds) of clip
'out': 0, //out point of clip
'pandora_base': 'pad.ma/', //pandora instance from where to fetch video and image data
'resolution': '480p', //resolution of video (96p, 240p, or 480p)
'width': '640', //display (css) width
'interval': 300, //interval (in ms) to run updatePlayer polling loop
'action': 'get', //action POST param to send to url
'callback': function() { $.noop(); } //function to call after done instantiating pandoraVideo object, called with the object.
}, dataOptions),
id = opts.id,
$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
var opts = $.extend({ //get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
'id': 'ABC', //FIXME: throw an error if id is undefined at this point var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
'layers': ['transcripts', 'descriptions', 'keywords', 'places'], $loading.hide().remove();
'keys': ['layers'], //data keys to fetch from API call. FIXME: add more apt keys var pandora = new PandoraVideo(id, response.data, $this, opts);
'api': "//pad.ma/api/", //pandora instance api end-point - see http://pad.ma/api pandora.render();
'in': 0, //in point (float, in seconds) of clip opts.callback(pandora);
'out': 0, //out point of clip }, "json");
'pandora_base': 'pad.ma/', //pandora instance from where to fetch video and image data
'resolution': '480p', //resolution of video (96p, 240p, or 480p)
'width': '640', //display (css) width
'interval': 300, //interval (in ms) to run updatePlayer polling loop
'action': 'get', //action POST param to send to url
'callback': function() { $.noop(); } //function to call after done instantiating pandoraVideo object, called with the object.
}, dataOptions);
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback deferred.error(function(data) {
var id = opts.id, alert("failed to load video data");
$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this), });
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
$loading.hide().remove();
var pandora = new PandoraVideo(id, response.data, $this, opts);
pandora.render();
opts.callback(pandora);
}, "json");
deferred.error(function(data) {
alert("failed to load video data");
}); });
}; };
/* /*
pandoraVideo class pandoraVideo class
Parameters: Parameters:

View File

@ -1,11 +1,11 @@
{% extends 'festival_wireframe.html' %} {% extends 'noel/base.html' %}
{% block title %} Page Not Found {% endblock %} {% block title %} Page Not Found {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" type="text/css" href="/static/css/error_pages.css" />
{% endblock %} {% endblock %}
{% block centerCol %} {% block content %}
<div class="errorTxt"> <div class="errorTxt">
This is a website acting like it found the page you were looking for, but really didn't. This is a website acting like it found the page you were looking for, but really didn't.
<br /><br /> <br /><br />

View File

@ -1,11 +1,11 @@
{% extends 'festival_wireframe.html' %} {% extends 'noel/base.html' %}
{% block title %} Oops.. we made an error.. {% endblock %} {% block title %} Oops.. we made an error.. {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" type="text/css" href="/static/css/error_pages.css" />
{% endblock %} {% endblock %}
{% block centerCol %} {% block content %}
<div class="errorTxt"> <div class="errorTxt">
Oops.. the website made a booboo.<br /><br /> Oops.. the website made a booboo.<br /><br />
Please contact admin@theatreforum.in if this error persists.<br /><br /> Please contact admin@theatreforum.in if this error persists.<br /><br />

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="/static/js/jquery.js"></script>
<link rel="shortcut icon" href="/static/images/favicon.ico" />
{% block head %}
{% endblock %}
</head>
<body>
<div id="wrapper">
{% block body %}
{% endblock %}
</div>
</body>
</html>

View File

@ -1,168 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Best Practices
{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/bestpractices.css" />
<script type="text/javascript">
$(document).ready(function() {
$('.bpItem a').click(function(e) {
e.preventDefault();
var id = $(this).parent().attr("data-id");
if ($(this).parent().find(".bpAjax").is(":visible")) {
$('.bpAjax').slideUp("fast", function() {
$(this).remove();
});
return false;
}
if ($('.bpAjax').is(":visible")) {
$('.bpAjax').slideUp("fast", function() {
$(this).remove();
});
}
var container = $('<div />').addClass("bpAjax").text("Loading...");
$(this).parent().append(container);
var url = $(this).attr("href");
$.get(url, {}, function(response) {
container.hide().html(response).slideDown("fast", function() {
var top = container.parent().position().top;
$('html').scrollTop(top - 3);
location.hash = id;
});
});
});
if (location.hash != '') {
var id = location.hash.replace("#", "");
var aElem = $('div[data-id=' + id + ']').find('a');
aElem.click();
}
});
</script>
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li class="currentNav"><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Best Practices</h3>
<div class="centerText">
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li class="bpCurrentTab">Intro</li>
<li><a href="/itf/bestpractices/stories">Stories</a></li>
<li><a href="/itf/bestpractices/guidelines">Guidelines</a></li>
<li><a href="/itf/bestpractices/glossary">Glossary</a></li>
<li><a href="/itf/bestpractices/faq">FAQ</a></li>
<li><a href="/itf/bestpractices/download">Download</a></li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<div id="intro">
<p>
Starting off on this project to map the contours of the copyright issues that impact upon theatre practice, I asked a lawyer friend his opinion. You may set the cat among the pigeons! he chortled. But is your book for or against the copyright regime? he queried, more seriously.
For or against copyright? I realized at once that this will be a primary question in the minds of most readers, following closely on the heels of So what is copyright, anyway?
</p>
<p>
This project was taken up based on feedback received at the Not the Drama Seminar (NTDS) organized by the India Theatre Forum (ITF), at Ninasam, Heggodu, in March 2008. Earlier, Sudhanva Deshpandes discussion with Prabir Purkayastha on the idea of a script archive on the ITF website had led to Prabirs talk on Creative Commons at the seminar.
</p>
<p>
The Core Team that presently takes responsibility for the India Theatre Forum (ITF), took on certain projects based on needs expressed by the theatre community. The ITF is a loose collective of theatre practitioners coming together to reflect on and to improve theatre practice in India.
K.V. Akshara is working on Kala Kalyana, an insurance-cum-pension policy for artists; Sameera Iyengar has worked on the ITF website which is designed to cater to the needs of connectivity and networking; Sanjna Kapoor has launched Theatre Arts, a management initiative, and Sudhanva Deshpande is looking at the possibilities of the website hosting a script archive.
</p>
<p>
While making scripts available to the theatre community, we have to keep in mind the welfare of the playwrights. Prabir Purkayastha, who made a presentation on Creative Commons at the NTDS, suggested this approach to Sudhanva Deshpande. This project was born out of the necessity to understand the concept of Copyrights and Commons.
</p>
<p>
Soon after I took on this responsibility, incidents reported from around the country made us realize that the theatre fraternity was sorely misinformed on this issue.
</p>
<p>
A simple handbook, the Core Team felt, would be of great help. Ashish Rajadhakshya, who was present at our first meeting on the project shared his view and extended the support of Sir Ratan Tata Trust for the process and publication.
</p>
<p>
Over two years, the ITF conducted limited surveys among theatre practitioners and playwrights on theatre practices around the country. They also collected stories arising out of copyright conflict in the theatre community. I worked simultaneously with several lawyers to collate this material, make sense of it, relate it to the relevant copyright laws and also look at the international treaties that India is a signatory to.
The findings were shared with the Core Team. Over e-mails and several meetings, the feedback and discussions grappled with issues of culture, ethics and law as well as findings on actual praxis on the ground.
</p>
<p>
The ITF organized a forum for playwrights, theatre practitioners and lawyers in Delhi in 2009.
</p>
<p>
These issues and findings were discussed and other stories and concerns emerged. Our invited experts presented perspectives on the practice of theatre in this country and on the motives that led to the framing of copyright laws. The idea of commons and sharing in creative practice was also discussed. The idea for an online script archive was presented to the playwrights. Quite a few practitioners present, candidly and unabashedly, professed total ignorance of the copyright laws. Unanimous opinion was expressed that a handbook on copyright laws with guidelines for best practices would be most useful.
</p>
<p>
Along with the Core Team members already mentioned, I have to thank Moloyashree Hashmi, not only for her valuable suggestions but also for shouldering responsibility for this forum.
</p>
<p>
Lawrence Liang, who was part of the discussions from early on and whose enthusiasm for the project was heartening, gets a big thank you.
I express my gratitude also to Choiti Ghosh and Saurabh Nayyar, the administrative staff of the ITF whose untiring efforts through the process have helped it come to fruition.
</p>
<p>
This book, then, is a collection of copyright stories and situations. Many are from India and the theatre community. Some are also from other related arts and other countries. While most stories are real, with or without name changes, some stories are hypothetical.
</p>
<p>
The stories are meant to illustrate points of law. The cases presented are not exhaustive and are not meant to replace legal advice. This book is therefore in that sense work in progress and is only a beginning of what we hope to be a much more comprehensive compendium through further editions.
</p>
<p>
For the ease of reading, the stories are abbreviated with parts of the conflict phrased as dialogue.<br />
Some of the intra-text is brought out through sketches.
</p>
<p>
A list of FAQs and glossary at the end should see the reader better equipped to deal with copyright decisions required in the practice of theatre. The incidents are arranged in sequence resembling the steps followed in a theatre production from the idea to production and performance, and on to the re-staging many years later.
</p>
<p>
Copyright is part of the legal environment we live in and we can be for or against it as much as we can be for or against the wind that blows. From what I have learnt though, there are some very hi-tech cats already out there on the net and as for pigeons - have you noticed how sparrows, sunbirds and mynahs have all but disappeared from our cities?
</p>
<p>
Pravin Chennai October 28, 2010
</p>
</div>
<div class="bpContent">
Download Booklet: <br /><br />
{% for d in downloads %}
<div class="bpDownload">
<a target="_blank" href="{{ d.fil.url }}" title="Click link to download PDF">{{ d.language }}</a>
</div>
{% endfor %}
</div>
{% endblock %}
</div>
</div>
{% endblock %}

View File

@ -1,14 +0,0 @@
<div class="itfInfo">
{{each stories}}
<span class="itfInfoSub">Story ${$index + 1}: </span><span class="ifInfoInfo">{{html tmplToHtml($value.text) }}</span>
<img class="itfInfoImg" src="${$value.image}" />
<br /><br />
{{/each}}
<span class="itfInfoSub">Law: </span><span class="itfInfoInfo">{{html tmplToHtml(law)}}</span>
{{if law_image}}
<img class="itfInfoImg" src="${law_image}" />
{{/if}}
<br /><br />
<span class="itfInfoSub">Relevance to Theatre: </span><span class="itfInfoInfo">{{html tmplToHtml(theatre)}}</span><br /><br />
<span class="itfInfoSub">Quick Howto: </span><span class="itfInfoInfo">{{html tmplToHtml(quick_howto)}}</span><br /><br />
</div>

View File

@ -1,7 +0,0 @@
<div class="itfPreview">
<span class="itfPreviewTitle">${title}</span><br /><br />
<div class="itfPreviewImages">
{{each images}} <img src="${$value.thumb}" width="200" title="${$value.caption}" /> {{/each}}
</div>
<span class="itfPreviewSub">Story: </span><span class="itfPreviewText">{{html tmplTrunc(tmplToHtml(story), 512)}}</span>
</div>

View File

@ -1,21 +0,0 @@
{% extends 'bestpractices.html' %}
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li><a href="/itf/bestpractices">Intro</a></li>
<li><a href="/itf/bestpractices/stories">Stories</a></li>
<li><a href="/itf/bestpractices/guidelines">Guidelines</a></li>
<li><a href="/itf/bestpractices/glossary">Glossary</a></li>
<li><a href="/itf/bestpractices/faq">FAQ</a></li>
<li class="bpCurrentTab">Download</li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<div class="bpContent">
<a href="/static/upload/bestpractices_downloads/INDIA_THEATRE_FORUM_BOOK-rev-4-4-11_1.pdf" target="_blank">Download Booklet in English</a>
</div>
{% endblock %}

View File

@ -1,32 +0,0 @@
{% extends 'bestpractices.html' %}
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li><a href="/itf/bestpractices">Intro</a></li>
<li><a href="/itf/bestpractices/stories">Stories</a></li>
<li><a href="/itf/bestpractices/guidelines">Guidelines</a></li>
<li><a href="/itf/bestpractices/glossary">Glossary</a></li>
<li class="bpCurrentTab">FAQ</li>
<li><a href="/itf/bestpractices/download">Download</a></li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<style type="text/css">
.faqItem {
margin-bottom: 8px;
}
</style>
<div class="bpContent">
{% for f in faqs %}
<div class="faqItem">
<p class="question"><b>{{ f.question }}</b></p>
<p class="answer">{{ f.answer }}</p>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,31 +0,0 @@
{% extends 'bestpractices.html' %}
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li><a href="/itf/bestpractices">Intro</a></li>
<li><a href="/itf/bestpractices/stories">Stories</a></li>
<li><a href="/itf/bestpractices/guidelines">Guidelines</a></li>
<li class="bpCurrentTab">Glossary</li>
<li><a href="/itf/bestpractices/faq">FAQ</a></li>
<li><a href="/itf/bestpractices/download">Download</a></li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<div class="bpContent">
{% for t in terms %}
<div class="bpItem">
<div class="glossaryTerm">
{{t.term}}
</div>
<div class="glossaryDefinition">
{{t.definition}}
</div>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,6 +0,0 @@
{% load guidelines %}
<div class="itfInfo">
{% autoescape off %}
{{ text|link_bps|linebreaksbr }}
{% endautoescape %}
</div>

View File

@ -1,25 +0,0 @@
{% extends 'bestpractices.html' %}
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li><a href="/itf/bestpractices">Intro</a></li>
<li><a href="/itf/bestpractices/stories">Stories</a></li>
<li class="bpCurrentTab">Guidelines</li>
<li><a href="/itf/bestpractices/glossary">Glossary</a></li>
<li><a href="/itf/bestpractices/faq">FAQ</a></li>
<li><a href="/itf/bestpractices/download">Download</a></li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<div class="bpContent">
{% for g in guidelines %}
<div class="bpItem" data-id="{{g.id}}">
<a href="/itf/bestpractices/guideline/{{g.id}}">{{g.title}}</a>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,25 +0,0 @@
{% extends 'bestpractices.html' %}
{% block bpTabs %}
<div id="bpTabs">
<ul>
<li><a href="/itf/bestpractices">Intro</a></li>
<li class="bpCurrentTab">Stories</li>
<li><a href="/itf/bestpractices/guidelines">Guidelines</a></li>
<li><a href="/itf/bestpractices/glossary">Glossary</a></li>
<li><a href="/itf/bestpractices/faq">FAQ</a></li>
<li><a href="/itf/bestpractices/download">Download</a></li>
</ul>
</div>
<div style="clear:both;"></div>
{% endblock %}
{% block bpContent %}
<div class="bpContent">
{% for s in stories %}
<div class="bpStory bpItem" data-id="{{s.id}}">
<a href="/itf/bestpractices/story/{{s.id}}">{{ s.title }}</a>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,14 +0,0 @@
<div class="itfInfo">
{% for s in stories %}
<span class="itfInfoSub">Story {{forloop.counter}}: </span><span class="ifInfoInfo">{{ s.text|linebreaksbr }}</span>
<img class="itfInfoImg" src="{{ s.image }}" />
<br /><br />
{% endfor %}
<span class="itfInfoSub">Law: </span><span class="itfInfoInfo">{{ law|linebreaksbr }}</span>
{% if law_image %}
<img class="itfInfoImg" src="{{ law_image }}" />
{% endif %}
<br /><br />
<span class="itfInfoSub">Relevance to Theatre: </span><span class="itfInfoInfo">{{ theatre|linebreaksbr }}</span><br /><br />
<span class="itfInfoSub">Quick Howto: </span><span class="itfInfoInfo">{{ quick_howto|linebreaksbr }}</span><br /><br />
</div>

View File

@ -1,34 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - eRang
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li class="currentNav"><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
</ul>
{% endblock %}
</div>
<div id="centerCol">
{% block centerCol %}
<div id="centerContent">
<h3>e-Rang</h3>
<br><div class="titleLink">e-Rang: Fortnightly Theatre Journal</div>
<div class="centerText">
<p>There are a large number of people who are deeply interested in Indian theatre, but who are starved of regular news and discussion about it. Bringing out a hard copy journal is a costly affair, and is not easy to sustain. Therefore, as part of the Forum website, it was felt that it would be useful to bring out an internet-based fortnightly journal. The coordinator of this project, Sudhanva Deshpande, has some experience of bringing out a journal of this kind, since he co-edited e-STQ. It was decided that he would put together a team that would bring out the new e-journal, tentatively christened e-Rang.</p>
<p>e-Rang will be sent out free to readers.</p>
<p><b>Update:</b> e-Rang sent out it's first issue on July 15th, 2010. You can subscribe and view current and past issues at <a href="http://theatreforum.in/erang/">http://theatreforum.in/erang/</a></p>
</div>
</div>
{% endblock %}

View File

@ -1,114 +0,0 @@
{% extends 'base.html' %}
{% block head %}
<title>India Theatre Forum - {{ current_issue.title }}</title>
<script type="text/javascript" src="/static/js/jquery.color.js"></script>
<script type="text/javascript" src="/static/js/utils.js"></script>
<script type="text/javascript">
var ERANG_ISSUE_ID = {{ current_issue.id }};
</script>
<script type="text/javascript" src="/static/js/erang/erang.js"></script>
<link rel="stylesheet" href="/static/css/erang/erang.css" />
<link rel="stylesheet" href="/static/css/erang/comments.css" />
{% endblock %}
{% block body %}
<script type="text/html" id="tmpl_issue_list">
<ul class="newsletterList">
<% for (var i=0; i<issues.length; i++) {
var issue = issues[i];
if (issue.id === ERANG_ISSUE_ID) { var classname="currentIssue" } else { var classname="otherIssue"}
%>
<li>
<a href="?issue_id=<%= issue.id %>" class="<%= classname %>"><%= issue.title %></a>
<br />
<span class="date"></span>
</li>
<% } %>
</ul>
<div class="navBtns" data-terms="<%= search_terms %>" data-page="<%= page_no %>">
<% if (hasPrev) { %><span class="prevBtn">&lt; Previous</span><% } %>
<% if (hasNext) { %><span class="nextBtn">Next &gt;</span><% } %>
</div>
</script>
<div id="leftMenu">
<div class="homeLink">
<h3><img src="/static/images/favicon.ico" title="India Theatre Forum" alt="" /> <a href="/" title="India Theatre Forum Home">&nbsp;Home</a> </h3>
</div>
<div id="issueListWrapper">
<h3>Past Issues:</h3>
<form id="searchForm" action="" method="get" />
<input id="issueSearch" data-placeholder="Search" /><input id="searchSubmit" type="submit" value="Go" />
</form>
<div class="issueListContainer">
</div>
</div>
<div id="subscribe">
<a name="subscribe"></>
<h3>Subscribe:</h3>
<form id="subscribeForm">
<input id="email" name="email" data-placeholder="E-Mail" /><br />
<button id="subscribeBtn">Subscribe!</button>
</form>
</div>
</div>
{% load erangtags %}
<div id="newsletterContent">
{% autoescape off %}
{{ current_issue.html|absolutify_links }}
{% endautoescape %}
<div id="commentWrapper">
{% load comments %}
<h3>Comments and Feedback</h3>
<a name="comments"></a>
{% get_comment_list for erang_organised.issue current_issue.id as comment_list %}
{% ifnotequal comment_list|length 0 %}
<div id="comments_list">
<!--
<h4 class="responsesHeader">
Responses:
</h4>
-->
{% for comment in comment_list %}
<div class="comment {% cycle 'commentOdd' 'commentEven' %}">
<div class="comment_user">
{{ comment.user_name }}:
</div>
<div class="comment_comment">
{{ comment.comment }}
</div>
</div>
{% endfor %}
</div>
{% endifnotequal %}
{% get_comment_form for current_issue as form %}
<div id="comment_form">
<h4 class="formHeader">
Leave a Response:
</h4>
<form action="{% comment_form_target %}" method="POST">{% csrf_token %}
<input type="hidden" name="next" value="/erang/?issue_id={{ current_issue.id }}" />
<table id="form_table">
<tr class="leave_response">
<th></th>
<td>
</td>
</tr>
{{ form }}
<tr>
<th></th>
<td><input type="submit" name="post" class="submit-post" value="Post"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,14 +0,0 @@
<div class="itfInfo">
{{each stories}}
<span class="itfInfoSub">Story ${$index + 1}: </span><span class="ifInfoInfo">{{html tmplToHtml($value.text) }}</span>
<img class="itfInfoImg" src="${$value.image}" />
<br /><br />
{{/each}}
<span class="itfInfoSub">Law: </span><span class="itfInfoInfo">{{html tmplToHtml(law)}}</span>
{{if law_image}}
<img class="itfInfoImg" src="${law_image}" />
{{/if}}
<br /><br />
<span class="itfInfoSub">Relevance to Theatre: </span><span class="itfInfoInfo">{{html tmplToHtml(theatre)}}</span><br /><br />
<span class="itfInfoSub">Quick Howto: </span><span class="itfInfoInfo">{{html tmplToHtml(quick_howto)}}</span><br /><br />
</div>

View File

@ -1,5 +0,0 @@
<div class="itfPreview">
<span class="itfPreviewTitle">${title}</span><br />
<span class="itfViewLink"><a href="/erang/?issue_id=${id}" target="_blank">View on site</a></span><br /><br />
<span class="itfPreviewSub">Summary: </span>><span class="itfPreviewText">{{html tmplToHtml(summary) }}</span>
</div>

View File

@ -1,5 +0,0 @@
<div class="itfPreview">
<span class="itfPreviewTitle">${title}</span><br /><br />
<span class="itfViewLink"><a href="/itf/project/${id}/" target="_blank">View on site</a></span><br />
<span class="itfPreviewSub">Intro: </span>><span class="itfPreviewText">{{html tmplToHtml(intro) }}</span>
</div>

View File

@ -1,71 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/static/css/festival.css" />
<link rel="stylesheet" href="/static/css/wireframe.css" />
<link rel="stylesheet" type="text/css" media="all" href="/static/css/jScrollPane.css" />
<script src="/static/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/jquery.mousewheel.js"></script>
<script type="text/javascript" src="/static/js/jScrollPane-1.2.3.min.js"></script>
<script type="text/javascript" src="/static/js/festival.js"></script>
{% block extra_head %}
{% endblock %}
</head>
<body>
<div id="wrapper">
<div id="header">
{% block headerRow %}
<div id="pageTitle">
<h1> India Theatre Forum </hi>
</div>
<div id="emailSignup">
Website coming soon. Sign-up for updates:
<input type="text" id="emailInput" data-default="E-mail" />
<span id="submitText">Submit</span>
</div>
{% endblock %}
</div>
<div id="body_wrapper">
<div id="leftCol">
{% block leftCol %}
<ul id="leftNav">
<li class="currentNav"><a href="/itf/">Home</li>
<li><a href="/itf/meetings">Meetings</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</li>
<li><a href="/erang">eRang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
</ul>
{% endblock %}
</div>
<div id="centerCol">
{% block centerCol %}
<div id="centerContent">
<h1> Meetings </h1>
<div class="centerText">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas laoreet, velit non ultricies blandit, augue lacus mattis lacus, vel malesuada massa mi nec nisl. Nulla condimentum venenatis malesuada. Donec purus tellus, feugiat nec porttitor id, feugiat sed tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at dapibus justo. Praesent volutpat mauris non orci molestie sit amet ultrices nisi sodales. In vitae consectetur ante. Nulla vel odio nibh, eu cursus velit. Fusce vel augue eget sapien lobortis pretium ut aliquam mauris. Nunc non varius quam. Nulla vel justo ut dui laoreet vehicula sed sed sem.
<br /><br />
Pellentesque ut rhoncus tortor. Vivamus facilisis hendrerit turpis, sit amet cursus diam accumsan nec. Nunc in nisi enim, quis ultricies libero. Aliquam ut augue diam. Vivamus vel dui augue. Praesent dictum tristique urna sed pharetra. In hac habitasse platea dictumst. Phasellus sit amet ornare elit. Praesent nunc magna, interdum tristique aliquet nec, malesuada eu libero. Vivamus blandit felis ac ipsum placerat sed porttitor orci placerat. Nullam magna arcu, feugiat in gravida nec, porta nec erat. Proin aliquam turpis vel lacus posuere vehicula. Nullam eros elit, vulputate sed iaculis in, scelerisque id nunc. Suspendisse potenti. Cras vitae purus quis ante ornare venenatis nec sit amet metus. Cras vehicula tortor vitae arcu dignissim hendrerit. Phasellus vel est justo, id tristique dolor. Vestibulum congue tempus mauris interdum pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam orci orci, ultricies in luctus eu, faucibus eget nibh.
<br /><br />
Donec a pharetra purus. Duis vel elit ipsum. Proin rhoncus viverra sollicitudin. Curabitur consectetur viverra vestibulum. Nulla vel ante vel lectus interdum laoreet et ac tortor. In interdum, arcu ut venenatis ultrices, nibh massa posuere urna, id dapibus nisl dui non mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam porta, nulla eu sollicitudin placerat, dui arcu fermentum libero, vel dignissim ante augue sit amet est. Aenean a enim urna. Aenean semper eros at mi tristique lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse et arcu id mi imperdiet porta. Sed vel sapien odio, vel imperdiet felis. Maecenas porttitor lacus ac nisi luctus sit amet ullamcorper magna dapibus. Etiam eu lorem in magna elementum sollicitudin.
<br /><br />
Nam placerat leo vitae dui lobortis vulputate. Aliquam congue faucibus erat in luctus. Aenean volutpat aliquam tellus, et cursus massa rhoncus ut. In tincidunt porttitor velit at elementum. Ut felis nunc, porttitor quis varius ut, ullamcorper eget odio. Vivamus magna erat, dictum id volutpat eget, luctus in elit. Cras tempor elementum bibendum. Phasellus imperdiet neque ac lacus rhoncus eget tincidunt dolor imperdiet. Suspendisse potenti. Phasellus porttitor condimentum leo, sit amet tempor dui tristique at. Phasellus tincidunt orci a nisi laoreet mollis. Aenean vel sagittis erat.
<br /><br />
Suspendisse vehicula iaculis est tristique semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean id enim dapibus lorem posuere sollicitudin. Sed vitae pulvinar nisi. Duis non augue odio. In hac habitasse platea dictumst. Praesent egestas erat eu est mollis in porta mauris auctor. Nunc ultrices scelerisque tempus. Quisque mattis orci eu mauris porttitor et porttitor nulla pulvinar. Curabitur tincidunt leo sit amet eros dapibus id eleifend dui varius. Nulla facilisi. Vivamus nec dolor convallis libero dictum posuere. Integer vestibulum, nulla sed iaculis molestie, leo justo pretium neque, adipiscing sollicitudin turpis turpis ut quam. Integer ac velit orci, ut sollicitudin magna. Vestibulum fermentum sodales ante, quis vulputate mi pellentesque quis.
</div>
</div>
{% endblock %}
</div>
<div id="rightCol">
{% block rightCol %}
<h1>About Us</h1>
<div id="rightText">
Suspendisse vehicula iaculis est tristique semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean id enim dapibus lorem posuere sollicitudin. Sed vitae pulvinar nisi. Duis non augue odio. In hac habitasse platea dictumst. Praesent egestas erat eu est mollis in porta mauris auctor. Nunc ultrices scelerisque tempus. Quisque mattis orci eu mauris porttitor et porttitor nulla pulvinar. Curabitur tincidunt leo sit amet eros dapibus id eleifend dui varius. Nulla facilisi. Vivamus nec dolor convallis libero dictum posuere. Integer vestibulum, nulla sed iaculis molestie, leo justo pretium neque, adipiscing sollicitudin turpis turpis ut quam. Integer ac velit orci, ut sollicitudin magna. Vestibulum fermentum sodales ante, quis vulputate mi pellentesque quis.
</div>
{% endblock %}
</div>
</div>
</div>
</body>
</html>

View File

@ -1,88 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/static/css/festival.css" />
<link rel="stylesheet" href="/static/css/wireframe.css" />
<link rel="stylesheet" type="text/css" media="all" href="/static/css/jScrollPane.css" />
<script src="/static/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/jquery.mousewheel.js"></script>
<script type="text/javascript" src="/static/js/jScrollPane-1.2.3.min.js"></script>
<script type="text/javascript" src="/static/js/festival.js"></script>
<meta name="title" content="India Theatre Forum">
{% block extra_head %}
{% endblock %}
</head>
<body>
<div id="wrapper">
<div id="header">
{% block headerRow %}
<div id="pageTitle">
<h1> India Theatre Forum </hi>
</div>
<div id="emailSignup">
Website coming soon. Sign-up for updates:
<input type="text" id="emailInput" data-default="E-mail" />
<span id="submitText">Submit</span>
</div>
{% endblock %}
</div>
<div id="body_wrapper">
<div id="leftCol">
{% block leftCol %}
<ul id="leftNav">
<li class="currentNav"><a href="#">Home</li>
<li><a href="/itf/meetings">Meetings</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</li>
<li><a href="/erang">eRang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
</div>
<div id="centerCol">
{% block centerCol %}
<div id="centerContent">
<h1> Meetings </h1>
<div class="centerText">
<div id="meeting_list" class="box">
<h1>Latest Meetings</h1>
<ul>
{% for o in data.latest_meetings %}
<li><a href="/meetingdetails/{{o.meeting.id}}">{{ o.meeting.title }}</a></li>
{% endfor %}
</ul>
</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas laoreet, velit non ultricies blandit, augue lacus mattis lacus, vel malesuada massa mi nec nisl. Nulla condimentum venenatis malesuada. Donec purus tellus, feugiat nec porttitor id, feugiat sed tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at dapibus justo. Praesent volutpat mauris non orci molestie sit amet ultrices nisi sodales. In vitae consectetur ante. Nulla vel odio nibh, eu cursus velit. Fusce vel augue eget sapien lobortis pretium ut aliquam mauris. Nunc non varius quam. Nulla vel justo ut dui laoreet vehicula sed sed sem.
<br /><br />
Pellentesque ut rhoncus tortor. Vivamus facilisis hendrerit turpis, sit amet cursus diam accumsan nec. Nunc in nisi enim, quis ultricies libero. Aliquam ut augue diam. Vivamus vel dui augue. Praesent dictum tristique urna sed pharetra. In hac habitasse platea dictumst. Phasellus sit amet ornare elit. Praesent nunc magna, interdum tristique aliquet nec, malesuada eu libero. Vivamus blandit felis ac ipsum placerat sed porttitor orci placerat. Nullam magna arcu, feugiat in gravida nec, porta nec erat. Proin aliquam turpis vel lacus posuere vehicula. Nullam eros elit, vulputate sed iaculis in, scelerisque id nunc. Suspendisse potenti. Cras vitae purus quis ante ornare venenatis nec sit amet metus. Cras vehicula tortor vitae arcu dignissim hendrerit. Phasellus vel est justo, id tristique dolor. Vestibulum congue tempus mauris interdum pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam orci orci, ultricies in luctus eu, faucibus eget nibh.
<br /><br />
Donec a pharetra purus. Duis vel elit ipsum. Proin rhoncus viverra sollicitudin. Curabitur consectetur viverra vestibulum. Nulla vel ante vel lectus interdum laoreet et ac tortor. In interdum, arcu ut venenatis ultrices, nibh massa posuere urna, id dapibus nisl dui non mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam porta, nulla eu sollicitudin placerat, dui arcu fermentum libero, vel dignissim ante augue sit amet est. Aenean a enim urna. Aenean semper eros at mi tristique lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse et arcu id mi imperdiet porta. Sed vel sapien odio, vel imperdiet felis. Maecenas porttitor lacus ac nisi luctus sit amet ullamcorper magna dapibus. Etiam eu lorem in magna elementum sollicitudin.
<br /><br />
Nam placerat leo vitae dui lobortis vulputate. Aliquam congue faucibus erat in luctus. Aenean volutpat aliquam tellus, et cursus massa rhoncus ut. In tincidunt porttitor velit at elementum. Ut felis nunc, porttitor quis varius ut, ullamcorper eget odio. Vivamus magna erat, dictum id volutpat eget, luctus in elit. Cras tempor elementum bibendum. Phasellus imperdiet neque ac lacus rhoncus eget tincidunt dolor imperdiet. Suspendisse potenti. Phasellus porttitor condimentum leo, sit amet tempor dui tristique at. Phasellus tincidunt orci a nisi laoreet mollis. Aenean vel sagittis erat.
<br /><br />
Suspendisse vehicula iaculis est tristique semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean id enim dapibus lorem posuere sollicitudin. Sed vitae pulvinar nisi. Duis non augue odio. In hac habitasse platea dictumst. Praesent egestas erat eu est mollis in porta mauris auctor. Nunc ultrices scelerisque tempus. Quisque mattis orci eu mauris porttitor et porttitor nulla pulvinar. Curabitur tincidunt leo sit amet eros dapibus id eleifend dui varius. Nulla facilisi. Vivamus nec dolor convallis libero dictum posuere. Integer vestibulum, nulla sed iaculis molestie, leo justo pretium neque, adipiscing sollicitudin turpis turpis ut quam. Integer ac velit orci, ut sollicitudin magna. Vestibulum fermentum sodales ante, quis vulputate mi pellentesque quis.
</div>
</div>
{% endblock %}
</div>
<div id="rightCol">
{% block rightCol %}
<h1>About Us</h1>
<div id="rightText">
Suspendisse vehicula iaculis est tristique semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean id enim dapibus lorem posuere sollicitudin. Sed vitae pulvinar nisi. Duis non augue odio. In hac habitasse platea dictumst. Praesent egestas erat eu est mollis in porta mauris auctor. Nunc ultrices scelerisque tempus. Quisque mattis orci eu mauris porttitor et porttitor nulla pulvinar. Curabitur tincidunt leo sit amet eros dapibus id eleifend dui varius. Nulla facilisi. Vivamus nec dolor convallis libero dictum posuere. Integer vestibulum, nulla sed iaculis molestie, leo justo pretium neque, adipiscing sollicitudin turpis turpis ut quam. Integer ac velit orci, ut sollicitudin magna. Vestibulum fermentum sodales ante, quis vulputate mi pellentesque quis.
</div>
{% endblock %}
</div>
</div>
</div>
</body>
</html>

View File

@ -1,106 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>{% block title %} India Theatre Forum {% endblock %}</title>
<link rel="stylesheet" href="/static/css/festival.css" />
<link rel="stylesheet" href="/static/css/wireframe.css" />
<link rel="stylesheet" type="text/css" media="all" href="/static/css/jScrollPane.css" />
<script src="/static/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/festival.js"></script>
<meta name="keywords" content="Theatre, ITF, India, Best Practices, Theatre Resources" />
<meta name="title" content="India Theatre Forum" />
<meta name="description" content="India Theatre Forum: Best practices and theatre resources for the theatre community in India." />
<!-- <script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script> -->
{% block extra_head %}
{% endblock %}
</head>
<body>
<div id="wrapper">
<div id="header">
{% block headerRow %}
<div id="pageTitle">
<!-- <h1><span style="color: #da251c">India</span> <span style="color: #ee9b11">Theatre</span> <span style="color: #f8c301">Forum</span> </h1> -->
</div>
<div id="emailSignup">
<div id="welcomeText">Sign-up for updates:</div>
<input type="text" id="emailInput" data-default="E-mail" /><span id="submitText">Submit</span><span id="submitting">Submitting...</span>
</div>
{% endblock %}
</div>
<div id="body_wrapper">
<div id="leftCol">
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
</div>
<div id="centerCol">
{% block centerCol %}
<div id="centerContent">
<h1> Meetings </h1>
<div class="centerText">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas laoreet, velit non ultricies blandit, augue lacus mattis lacus, vel malesuada massa mi nec nisl. Nulla condimentum venenatis malesuada. Donec purus tellus, feugiat nec porttitor id, feugiat sed tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at dapibus justo. Praesent volutpat mauris non orci molestie sit amet ultrices nisi sodales. In vitae consectetur ante. Nulla vel odio nibh, eu cursus velit. Fusce vel augue eget sapien lobortis pretium ut aliquam mauris. Nunc non varius quam. Nulla vel justo ut dui laoreet vehicula sed sed sem.
<br /><br />
Pellentesque ut rhoncus tortor. Vivamus facilisis hendrerit turpis, sit amet cursus diam accumsan nec. Nunc in nisi enim, quis ultricies libero. Aliquam ut augue diam. Vivamus vel dui augue. Praesent dictum tristique urna sed pharetra. In hac habitasse platea dictumst. Phasellus sit amet ornare elit. Praesent nunc magna, interdum tristique aliquet nec, malesuada eu libero. Vivamus blandit felis ac ipsum placerat sed porttitor orci placerat. Nullam magna arcu, feugiat in gravida nec, porta nec erat. Proin aliquam turpis vel lacus posuere vehicula. Nullam eros elit, vulputate sed iaculis in, scelerisque id nunc. Suspendisse potenti. Cras vitae purus quis ante ornare venenatis nec sit amet metus. Cras vehicula tortor vitae arcu dignissim hendrerit. Phasellus vel est justo, id tristique dolor. Vestibulum congue tempus mauris interdum pretium. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam orci orci, ultricies in luctus eu, faucibus eget nibh.
<br /><br />
Donec a pharetra purus. Duis vel elit ipsum. Proin rhoncus viverra sollicitudin. Curabitur consectetur viverra vestibulum. Nulla vel ante vel lectus interdum laoreet et ac tortor. In interdum, arcu ut venenatis ultrices, nibh massa posuere urna, id dapibus nisl dui non mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam porta, nulla eu sollicitudin placerat, dui arcu fermentum libero, vel dignissim ante augue sit amet est. Aenean a enim urna. Aenean semper eros at mi tristique lacinia. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse et arcu id mi imperdiet porta. Sed vel sapien odio, vel imperdiet felis. Maecenas porttitor lacus ac nisi luctus sit amet ullamcorper magna dapibus. Etiam eu lorem in magna elementum sollicitudin.
<br /><br />
Nam placerat leo vitae dui lobortis vulputate. Aliquam congue faucibus erat in luctus. Aenean volutpat aliquam tellus, et cursus massa rhoncus ut. In tincidunt porttitor velit at elementum. Ut felis nunc, porttitor quis varius ut, ullamcorper eget odio. Vivamus magna erat, dictum id volutpat eget, luctus in elit. Cras tempor elementum bibendum. Phasellus imperdiet neque ac lacus rhoncus eget tincidunt dolor imperdiet. Suspendisse potenti. Phasellus porttitor condimentum leo, sit amet tempor dui tristique at. Phasellus tincidunt orci a nisi laoreet mollis. Aenean vel sagittis erat.
<br /><br />
Suspendisse vehicula iaculis est tristique semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean id enim dapibus lorem posuere sollicitudin. Sed vitae pulvinar nisi. Duis non augue odio. In hac habitasse platea dictumst. Praesent egestas erat eu est mollis in porta mauris auctor. Nunc ultrices scelerisque tempus. Quisque mattis orci eu mauris porttitor et porttitor nulla pulvinar. Curabitur tincidunt leo sit amet eros dapibus id eleifend dui varius. Nulla facilisi. Vivamus nec dolor convallis libero dictum posuere. Integer vestibulum, nulla sed iaculis molestie, leo justo pretium neque, adipiscing sollicitudin turpis turpis ut quam. Integer ac velit orci, ut sollicitudin magna. Vestibulum fermentum sodales ante, quis vulputate mi pellentesque quis.
</div>
</div>
{% endblock %}
</div>
<div id="rightCol">
{% block rightCol %}
<h3 style="padding-top: 15px; text-align: center;">About Us</h3>
<div id="rightText">
<div id="right1">
<p>Since the summer of 2006, a number of theatre practitioners, scholars and theatre lovers have come together under the aegis of the India Theatre Forum (ITF) to try and create a national resource for theatre and a meeting ground for all those who wish to take on the public responsibility of laying the grounds for excellence and diversity in theatrical endeavour. The ITF is a Prithvi Theatre initiative, and is more or less a loose association of people who have come together in the larger interest of Indian theatre. There is a team at the heart of it which gets called the core team, which currently consists of Akshara K.V., Moloyashree Hashmi, Pravin K.P., Sameera Iyengar, Sanjna Kapoor and Sudhanva Deshpande.</p>
<p>Theatre practice and livelihood in India is unsurprisingly like the country itself vast, diverse, and often unconnected and unaware of each others existence. Much theatre practice is also used to subsisting on meagre resources which means theatre somehow manages to survive rather than thrive in this country. It also means our dreams for what we can do with theatre artistically and socially are invariably limited dreams. We neither strive to imagine our utmost potential nor do we see ourselves as important enough actors in this countrys social fabric.
<span class="rightMore"><a href="Javascript:showNext()">more >>></a></span></p>
</div>
<div id="right2">
<p>
Of course, there are exceptions people who have thought deeply, believed in the potential of theatre, and shown it consistently in their work. People who have found innovative ways of stepping beyond the struggle of survival and created vibrant theatre communities of performers, audiences and supporters.
</p>
<p>The question that led to the creation of the ITF was: can this happenstance become the norm? Can we overcome what we see as limitations, can we learn to identify and recognize opportunities and openings, can we think in terms of long-term growth and sustenance? Such work cannot be done in isolation, but requires the coming together of dedicated and experienced people who have an abiding interest in the field of theatre, and who represent the diverse knowledge and experience base of theatre in this country. It requires the constant exchange of ideas and information, as well as intensive and open debate and discussion.</p>
<p>
In addition to bringing out Our Stage, The ITF is currently working on:
</p>
<ul>
<li>Guidelines for Best Practices in Theatre</li>
<li>a website for the theatre community in India</li>
<li>a social security scheme for artists</li>
<li>an arts management programme</li>
<li>a fortnightly e-newsletter</li>
<li>theatre survey</li>
</ul>
<p>Supported by the Arts Management of the Sir Ratan Tata Trust</p>
</div>
</div>
{% endblock %}
</div>
</div>
</div>
</body>
</html>

View File

@ -1,72 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Home
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li class="currentNav"><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
</div>
<div id="centerCol">
{% block centerCol %}
<div id="centerContent">
<h3>Welcome to the ITF Website</h3>
<div class="centerText">
<p>Welcome to the India Theatre Forum Website!</p>
<p>As you will notice very quickly … this site is very much under construction. However we did want to put it up, so you can begin to access some information on the India Theatre Forum itself, and also stay in touch with what we are planning for this site.</p>
<p>Essentially we want this site to be a hub for Indian theatre a place where you can come and get, give, share, exchange all sorts of information, ideas, resources and more.</p>
<p>Examples of some things you can get:</p>
<ul>
<li>a space of your own on the site</li>
<li>information on theatre activity, people and groups across India</li>
<li>a calendar of theatre activity across India</li>
<li>a fortnightly newsletter, emailed to your inbox</li>
<li>links between you and people you have worked with</li>
<li>access to offers & needs, where you can ask or browse for theatre needs you have rehearsal space, costumes, some lighting problem you need to tackle … etc</li>
<li>theatre-related information schemes, grants, government reports, policies and more</li>
<li>Guidelines for Best Practices in Theatre</li>
</ul>
<p>Examples of some things you can give:</p>
<ul>
<li>information on yourself and your theatre activity</li>
<li>theatre-related information you have access to</li>
<li>offers of resources you or your group may have</li>
</ul>
<p>This is a site for you, for us … and can come alive only with your active participation. Do log in so we can keep you informed … and we look forward to having you on board as part of the ITF online community.</p>
</div>
</div>
{% endblock %}

View File

@ -1,33 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>India Theatre Forum</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/css/ox.ui.css"/>
<link rel="stylesheet" type="text/css" href="/static/css/itf.css"/>
<script type='text/javascript'>
if(typeof(console)=='undefined') {
console = {};
console.log = function() {};
}
</script>
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.tmpl.min.js"></script>
<!-- <script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script> -->
<script type="text/javascript" src="/static/oxjs/build/js/ox.load.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/ox.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/ox.ui.js"></script>
<script type="text/javascript" src="/static/js/itf/itf.js"></script>
<script type="text/javascript" src="/static/js/itf/app.js"></script>
<script type="text/javascript" src="/static/js/itf/query.js"></script>
<script type="text/javascript" src="/static/js/itf/construct.js"></script>
<script type="text/javascript" src="/static/js/itf/widgets.js"></script>
<script type="text/javascript" src="/static/js/itf/forms.js"></script>
<script type="text/javascript" src="/static/js/itf/boxes.js"></script>
<script type="text/javascript" src="/static/js/itf/box_types.js"></script>
<script type="text/javascript" src="/static/js/itf/button_types.js"></script>
<script type="text/javascript" src="/static/js/bookmyshow.js"></script>
</head>
<body></body>
</html>

View File

@ -1,313 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - {{data.meeting.title}}
{% endblock %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="/static/css/jquery-ui-1.7.2.custom.css" />
<link type="text/css" rel="stylesheet" href="/static/css/jquery.tooltip.css" />
<link type="text/css" rel="stylesheet" href="/static/css/meeting.css" />
<link type="text/css" rel="stylesheet" href="/static/css/people.css" />
<link type="text/css" rel="stylesheet" href="/static/css/colorbox.css" />
<script type="text/javascript" src="/static/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="/static/js/people.js"></script>
<script type="text/javascript" src="/static/js/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="/static/js/pretty.js"></script>
<script type="text/javascript">
function commentFormError(err) {
$('#comment_form_errors').html(err);
}
$(document).ready(function() {
$('.comment_date').each(function() {
var seconds = parseInt($.trim($(this).text()));
var datestring = new Date(seconds * 1000).toString();
var pretty_date = prettyDate(datestring);
$(this).text(pretty_date);
});
// if ($.support.opacity) $('.tabText').jScrollPane();
$('#tabs').tabs();
$('.talkIcon img').tooltip({
showURL: false,
extraClass: 'myToolTip'
});
$('.thickbox').colorbox();
$('.sessionTitle').toggle(function() {
$(this).next().show("slow");
}, function() {
$(this).next().hide("slow");
});
$('#comment_form').submit(function(e) {
var $that = $(this);
e.preventDefault();
var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
var emailField = $('#id_email');
if (!filter.test(emailField.val())) {
var err = "Please enter a valid email address. We will never display it publicly, sell it, or use it to send you unsolicited email. Thanks.";
commentFormError(err);
return false;
}
if ($.trim($("#id_comment").val()) == '') {
var err = "You cannot leave the comment field blank!"
commentFormError(err);
return false;
}
if ($.trim($("#id_name").val()) == '') {
var err = "Write something for your name?"
commentFormError(err);
return false;
}
var data = $that.serialize();
$('#commentSubmit').attr("disabled", "disabled");
$.getJSON("/itf/meeting/comment/", data, function(json) {
if (json.status == 0) {
$('#comment_form_errors').html(json.msg);
$('#commentSubmit').removeAttr("disabled");
} else {
var d = {
'cname': $('#id_name').val(),
'cdate': prettyDate(new Date().toString()),
'ccomment': $('#id_comment').val()
}
$('#comment_form_errors').html('');
var html = tmpl("tmpl_comment", d);
$('#commentList').append(html);
var jqForm = $('#commentForm');
jqForm.hide();
jqForm.html("Thanks for the comment!");
jqForm.slideDown("slow");
jqForm.animate({'fontSize': '36px'}, 2000);
jqForm.fadeOut(2000);
}
});
});
// $('.cbIframe').colorbox({width: '530px', height: '450px', iframe: true});
});
/*
John Resig's templating utility - http://ejohn.org/blog/javascript-micro-templating/
Updated code to resolve issue with single quotes from: http://www.west-wind.com/Weblog/posts/509108.aspx
define templates inside <script type="text/html" id="foo"> tags
get html of template with tmpl("foo", json)
*/
(function() {
var cache = {};
this.tmpl = function tmpl(str, data) {
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
cache[str] = cache[str] ||
tmpl(document.getElementById(str).innerHTML) :
// Generate a reusable function that will serve as a template
// generator (and which will be cached).
new Function("obj",
"var p=[],print=function(){p.push.apply(p,arguments);};" +
// Introduce the data as local variables using with(){}
"with(obj){p.push('" +
// Convert the template into pure JavaScript
str.replace(/[\r\t\n]/g, " ")
.replace(/'(?=[^%]*%>)/g,"\t")
.split("'").join("\\'")
.split("\t").join("'")
.replace(/<%=(.+?)%>/g, "',$1,'")
.split("<%").join("');")
.split("%>").join("p.push('")
+ "');}return p.join('');");
// Provide some basic currying to the user
return data ? fn(data) : fn;
};
})();
</script>
{% endblock %}
{% block centerCol %}
<script type="text/html" id="tmpl_comment">
<div class="comment">
<div class="comment_meta">
posted by <span class="comment_name"><%= cname %></span> <span class="comment_date"><%= cdate %></span>:
</div>
<div class="comment_comment">
<%= ccomment %>
</div>
</div>
</script>
<div>
<div id="tabs">
<ul>
<li><a href="#synopsis">Synopsis</a></li>
{% ifnotequal data.sessions|length 0%}
<li><a href="#talks">Talks</a></li>
{% endifnotequal %}
{% ifnotequal data.documents|length 0%}
<li><a href="#prereading">Pre-Reading</a></li>
{% endifnotequal %}
{% ifnotequal data.imagegallery|length 0 %}
<li><a href="#gallery">Gallery</a></li>
{% endifnotequal %}
{% ifnotequal data.participants|length 0 %}
<li><a href="#participants">Participants</a></li>
{% endifnotequal %}
<li><a href="#comments">Comments</a></li>
</ul>
<div id="synopsis">
<h4 class="tabTitle">{{data.meeting.title}}</h4>
<div class="tabText">
{{data.meeting.intro}}
</div>
</div>
{% ifnotequal data.sessions|length 0 %}
<div id="talks">
<h4 class="tabTitle">Programme</h4>
<div class="tabText">
{% for s in data.sessions %}
<div class="session">
<div class="sessionTitle">
{{ s.title|title }}
</div>
<div class="sessionChild">
<div class="sessionIntro">
{{ s.intro|linebreaksbr }}
</div>
{% ifnotequal s.talks|length 0 %}
<ul class="talks">
{% for talk in s.talks %}
<li>
<span class="talkIcons">
{% for d in talk.documents %}
<span class="talkIcon">
<a href="/static/{{d.file}}" target="_blank">
<img src="/static/images/PDFIcon.jpg" title="<span class='ttTitle'>Download: {{d.title}}.</span> <br /><span class='ttIntro'>{{d.intro}}</span>" />
</a>
</span>
{% endfor %}
{% for a in talk.audio %}
<span class="talkIcon">
<a href="/static/{{a.file}}" target="_blank">
<img src="/static/images/Audio.jpg" title="<span class='ttTitle'>Listen: {{a.title}}.</span><br /><span class='rightclickHelp'>(Right click and select 'Save Link As' to download)</span>" />
</a>
</span>
{% endfor %}
{% for v in talk.video %}
<span class="talkIcon">
<a href="/static/{{v.file}}">
<img src="/static/images/VideoIcon.jpg" title="<span class='ttTitle'>Video: {{ talk.title }}.</span><span class='rightclickHelp'>(Right click and select 'Save Link As' to download)</span>">
</a>
</span>
{% endfor %}
</span>
&nbsp;&nbsp; {{ talk.title }} by {{ talk.presenter }}
</li>
{% endfor %}
</ul>
{% endifnotequal %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endifnotequal %}
{% ifnotequal data.documents|length 0%}
<div id="prereading">
<h4 class="tabTitle">Reading Materials</h4>
<div class="tabText">
{% for d in data.documents %}
<div class="objWrapper">
<div class="readingMatTitle">
<a href="/static/{{d.file}}">{{d.title}}</a>
</div>
<div class="intro">
{{ d.intro }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endifnotequal %}
{% ifnotequal data.imagegallery|length 0 %}
<div id="gallery">
<h4 class="tabTitle">Gallery</h4>
<div class="tabText">
{% load thumbnail %}
{% for i in data.imagegallery %}
{% thumbnail i.file "600x500" crop="center" as bigimage %}
<a href="{{ bigimage.url }}" title="{{i.title}}" class="thickbox" rel="gall">
{% endthumbnail %}
{% thumbnail i.file "100x100" crop="center" as thumb %}
<img src="{{ thumb.url }}" />
{% endthumbnail %}
</a>
{% endfor %}
</div>
</div>
{% endifnotequal %}
{% ifnotequal data.participants|length 0 %}
<div id="participants">
<h4 class="tabTitle">Participant List</h4>
<div class="tabText">
{% for p in data.participants %}
<div class="pWrapper">
<div class="pName">
<a href="#">{{ p.name }}</a>
</div>
<div class="pBio">
{{ p.short_bio }}
</div>
</div>
{% endfor %}
</div>
</div>
{% endifnotequal %}
<div id="comments">
<h4 class="tabTitle">Comments</h4>
<div class="tabText">
{% ifequal data.comments|length 0 %}
No comments yet.. Be the first!
{% else %}
<div id="commentList">
{% for c in data.comments %}
<div class="comment">
<div class="comment_meta">
posted by <span class="comment_name">{{ c.name }}</span> <span class="comment_date">{{ c.epoch_date }}</span>:
</div>
<div class="comment_comment">
{{ c.comment }}
</div>
</div>
{% endfor %}
</div>
{% endifequal %}
<div id="commentForm">
<p>Add a Comment:</p>
<form id="comment_form" action="/itf/meeting/comment/" method="POST">
<div id="comment_form_errors"></div>
{{comment_form.as_p}}
<div class="captchaWrap">
<p>Please answer this question to prove you are human (sorry): </p>
<p><span class="captchaQ">{{ captcha.question }}</span> <input id="captcha" name="captcha" type="text" /></p>
</div>
<input name="captcha_id" id="captcha_id" value="{{captcha.id}}" type="hidden" />
<input name="meeting_id" id="meeting_id" value="{{id}}" type="hidden" />
<input name="parent_id" id="parent_id" value="0" type="hidden" />
<input type="submit" id="commentSubmit" value="Submit" />
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,41 +0,0 @@
{% extends 'festival_base.html' %}
{% block centerCol %}
<div id="meeting_list" class="box">
<h1>Meeting Information</h1>
<br><br>
<b>Title:</b> {{ data.meeting.title }} <br>
<b>Intro:</b> {{ data.meeting.intro }} <br>
<b>Slug:</b> {{ data.meeting.slug }} <br>
{% for s in data.sessions %}
<br><b>{{s.title}}</b>:<br>
{% if s.talks %}
<ul style="list-style-type: circle">
{% for t in s.talks %}
<li> {{ t.title }} </li>
{% if t.documents %}
<ul style="list-style-type: disc">
{% for d in t.documents %}
<li> {{ d.title }} <a href="{{d.file}}"><image style="border-style: none" src="/static/images/document.gif"></a> </li>
{% endfor %}
</ul>
{% endif %}
{% if t.images %}
<ul style="list-style-type: disc">
{% for i in t.images %}
<li> {{ i.title }} <a href="{{i.file}}"><image style="border-style: none" src="/static/images/image.gif"></a> </li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
{% endblock %}

View File

@ -1,48 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Activities
{% endblock %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="/static/css/meetings.css" />
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li class="currentNav"><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Activities</h3>
<div class="centerText">
{% for m in meetings %}
<div class="objWrapper">
<div class="titleLink">
<a href="/itf/meeting/{{m.id}}/">{{m.title}} ({{ m.start_date|date:"d M Y" }}{% ifnotequal m.start_date m.end_date %} - {{ m.end_date|date:"d M Y" }} {% endifnotequal %})</a>
</div>
<div class="intro">
{{ m.intro }} <span class="more"><a href="/itf/meeting/{{m.id}}/">more >>></a></span>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,241 +0,0 @@
<html>
<head>
<title>India Theatre Forum - Home</title>
<link rel="stylesheet" type="text/css" href="/static/css/index.css" />
<link rel="stylesheet" type="text/css" href="/static/css/fullcalendar.css" />
<script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="/static/js/fullcalendar.min.js"></script>
<script type="text/javascript" src="/static/js/mockup.js"></script>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="title">India Theatre Forum</div>
<div id="searchDiv">
Search: <input type="text" id="search" />
<div class="toplink dialogLink" id="advancedSearch" data-target="searchDialog">Advanced Search</div>
</div>
<div id="loginRegister">
<span class="topBtn dialogLink" id="loginButton" data-target="loginDialog">Login &nbsp;</span>
|
<span class="topBtn dialogLink" id="registerButton" data-target="signupDialog"> &nbsp;Sign up </span>
</div>
</div>
<div id="mainWrapper">
<div id="adminMessageBox">
<div id="adminMessage">
This is an important message from admin...
</div>
<div id="adminMessageBoxClose" class="closeBtn">
X
</div>
</div>
<div id="leftBar">
<div id="locationSelect">
Your Location: <br />
<select id="location">
<option value="0">Mumbai</option>
<option value="1">Delhi</option>
<option value="2">Calcutta</option>
</select>
</div>
<div id="leftTabs">
<div class="leftTab">
Performances
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Events
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Theatre Groups
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Offers
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Needs
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Venues
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
People
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
<div class="leftTab">
Recent Changes
</div>
<div class="leftTabContent">
<ul>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
<li><a href="#">Lorem Ipsum Dolor Amet ... </a></li>
</ul>
</div>
</div>
</div>
<div id="center">
<div id="centerBtns">
<div class="centerBtn tabBtn" id="calendarBtn" data-target="tabCalendar">
Calendar
</div>
<div class="centerBtn tabBtn" data-target="tabMap" onclick="setTimeout('initMap()', 1000)">
Map
</div>
<div class="centerBtn tabBtn" id="newsBtn" data-target="tabNews" data-source="/x0news">
Newsfeed
</div>
<div class="centerBtn tabBtn" data-target="tabDiscussion" data-source="/x0disc">
Discussion
</div>
<div class="centerBtn tabBtn" data-target="tabMultimedia" data-source="/x0multi">
Multimedia
</div>
<div class="centerBtn tabBtn" data-target="tabResources" data-source="/x0resources">
Resources
</div>
<div class="centerBtn tabBtn" data-target="tabeRang" data-source="/x0erang">
e-Rang
</div>
</div>
<div id="tabContainer">
<div id="tabCalendar" class="tab">
</div>
<div id="tabMap" class="tab">
<div id="map">
</div>
</div>
<div id="tabNews" class="tab">
Loading...
</div>
<div id="tabDiscussion" class="tab">
Loading...
</div>
<div id="tabMultimedia" class="tab">
Loading...
</div>
<div id="tabResources" class="tab">
Loading...
</div>
<div id="tabeRang" class="tab">
Loading...
</div>
<div id="tabProfile" class="tab">
Loading...
</div>
</div>
</div>
<div id="rightBar">
<div id="itfBox">
<h2>India Theatre Forum:</h2>
<ul id="itfList">
<li>Documentation of Meetings</li>
<li>Government Reports</li>
<li>Theatre in the Press</li>
<li>Reviews</li>
<li>Audio / Video</li>
</ul>
</div>
</div>
<!-- start footer -->
<div id="footer">
<div id="footer-nav">
<ul>
<li><span class="selected-nav"><a href="#"><span style="color: rgb(255, 255, 255); font-weight: bold; text-decoration: none;">Legal</span></a></li>
<li>|</li>
<li><a href="#"><span style="color: rgb(255, 255, 255); font-weight: bold">Privacy</span></a></li>
<li>|</li>
<li><a href="#"><span style="color: rgb(255, 255, 255); font-weight: bold">Terms</span></a></li>
</ul>
</div>
</div>
<!-- end footer -->
</div>
</div>
<!-- DIALOG BOXES START -->
<div id="loginDialog" class="dialogBox" title="Login">
Username: <input type="text" id="username" value="username" /> <br />
Password: <input type="password" id="password" /><br />
<button id="loginSubmit">Login</button>
</div>
<div id="signupDialog" class="dialogBox" title="Sign Up!">
Sign up stuff goes here
</div>
<div id="searchDialog" class="dialogBox" title="Advanced Search">
Advanced search stuff goes here.
</div>
<!-- DIALOG BOXES END -->
</body>
</html>

View File

@ -211,25 +211,7 @@
<div id="bottomRight"> <div id="bottomRight">
Loading... Loading...
<!--
<p><span class="sectionTitle">Story 1:</span> A well known theatre group had auditions for casting lead characters in their play for which over 150 actors auditioned. A television film director happened to see the recording of the auditions and obtained a copy. Two months later, a few actors who had auditioned were horrified to see themselves in a television comedy show. Snippets of the recording had obviously been used!</p><br/>
<p><span class="sectionTitle">Actors:</span> Not on! If you like our acting, you hire us! Not use our improvisations for another purpose and that too by someone else! We'll sue the television show producer and the theatre group.</p><br/>
<p><span class="sectionTitle">Story 2:</span> Neha Bhasin, a play back singer went for an audition. Months later, she heard the piece on a radio channel and realized that it had been used without her permission. She also found that her name was mentioned as the background vocalist and the producer of the movie was credited as the lead vocalist.</p><br/>
<p><span class="sectionTitle">Neha Bhasin:</span> That's my voice…that's my name on the CD but I'm not the background vocalist!!! I'll sue the film producer! The music director: Hmmm not so! We didn't even want to use your voice. It was a recording mistake! The Court: A costly mistake. You've used her voice, now pay up royalty! And recall all the CDs with her voice.</p><br/>
<p><span class="sectionTitle">Law:</span> Do actors have special rights? Under the Indian Copyright law, actors, singers, musicians, dancers, et al are called performers</p><br/>
<p><span class="sectionTitle">Actors:</span> Not on! If you like our acting, you hire us! Not use our improvisations for another purpose and that too by someone else! We'll sue the television show producer and the theatre group.</p><br/>
<p><span class="sectionTitle">Story 2:</span> Neha Bhasin, a play back singer went for an audition. Months later, she heard the piece on a radio channel and realized that it had been used without her permission. She also found that her name was mentioned as the background vocalist and the producer of the movie was credited as the lead vocalist.</p><br/>
<p><span class="sectionTitle">Neha Bhasin:</span> That's my voice…that's my name on the CD but I'm not the background vocalist!!! I'll sue the film producer! The music director: Hmmm not so! We didn't even want to use your voice. It was a recording mistake! The Court: A costly mistake. You've used her voice, now pay up royalty! And recall all the CDs with her voice.</p><br/>
<p><span class="sectionTitle">Law:</span> Do actors have special rights? Under the Indian Copyright law, actors, singers, musicians, dancers, et al are called performers</p><br/>
-->
</div> </div>
</div> </div>
<div id="clearBoth"></div> <div id="clearBoth"></div>

View File

@ -1,49 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="/static/css/people.css" />
<script type="text/javascript" src="/static/js/people.js"></script>
<script type="text/javascript">
</script>
<style type="text/css">
</style>
{% endblock %}
{% block title %}
India Theatre Forum - People
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li class="currentNav"><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Meeting Participants</h3>
<div class="centerText">
{% for p in participants %}
<div class="pWrapper">
<div class="pName"><a href="#">{{p.name}}</a></div>
<div class="pBio">{{p.short_bio}}</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,13 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - {{ project.title }}
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h1>{{project.title}}</h1>
<div class="centerText">
{{project.intro|linebreaksbr}}
</div>
</div>
{% endblock %}

View File

@ -1,39 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Projects
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li class="currentNav"><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Projects</h3>
<div class="centerText">
{% for p in projects %}
<div class="objWrapper">
<div class="titleLink">
<a href="/itf/project/{{p.id}}/">{{p.title}}</a>
</div>
<div class="intro">
{{ p.intro|truncatewords:'25' }} <span class="more"><a href="/itf/project/{{p.id}}/">more >>></a></span>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,76 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Publications
{% endblock %}
{% block extra_head %}
<style type="text/css">
.link a, .link a:visited {
text-decoration: none;
color: #c73e2b;
}
</style>
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/itf/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li class="currentNav"><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Publications</h3>
<span style="align: center; text-align: center; font-size: 12px;">
<b>OUR STAGE: Pleasures and Perils of Theatre Practice in India </b><br>
<b>Edited by:</b> Sudhanva Deshpande, Akshara K.V., Sameera Iyengar
</span>
<div class="centerText" style="height: 900px;">
<p>Monday 16th | 7 pm | Prithvi Theatre</p>
<p><img src="/static/images/book.jpg" style="float: left; margin-right: 13px;" />In March 2008, over a hundred and forty theatre practitioners, critics, scholars, social scientists, activists, and theatre lovers came together at Ninasam in Heggodu, Karnataka, to discuss, debate, and critique the state of our theatre. This 5-day event organized by the India Theatre Forum was called Not the Drama Seminar: Theatre Practice in India Today. This was the largest such gathering at one place since the historic Drama Seminar of 1956.</p>
<p>The book OUR STAGE brings together the discussions of those five days, and has contributions by Samik Bandyopadhyaya, G.P. Deshpande, Sadanand Menon, Ram Bapat, Shanta Gokhale, Shiv Vishwanathan, Shyamala Vanarase, K.V. Akshara, Gopal Guru, Sundar Sarukkai, Sanjna Kapoor, Keval Arora, Anmol Vellani, Prabir Purkayastha, Kaushik Sen, Moloyashree Hashmi, Sameera Iyengar, Sudhanva Deshpande, and others. Without doubt, the book will prove to be a major publication in the field of drama and performance studies. The book is published by Tulika Books, a leading New Delhi-based publisher.
</p>
<br />
<div class="link">
For the actual transcripts, audios, videos and more, <a href="/itf/meeting/1/">click here</a>.
</div>
<div>
<p>To buy the book online:</p>
<p><a href="http://www.leftword.com/bookdetails.php?BkId=269&type=PB">http://www.leftword.com/bookdetails.php?BkId=269&type=PB</a></p>
<p>
Details:
<br />
Our Stage: Pleasures and Perils of Theatre Practice in India <br />
Edited by: Sudhanva Deshpande, Akshara K. V. and Sameera Iyengar <br />
ISBN: 978-81-89487-61-4 <br />
Paperback <br />
Tulika, 2009, Rs 350 <br />
Distributed by IPD Alternatives <ipd.alternatives@gmail.com> <br /><br />
Using these details, you can also ask your local bookshops to order the book.
</div>
</div>
</div>
{% endblock %}

View File

@ -1,54 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Resources
{% endblock %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="/static/css/people.css" />
<style type="text/css">
.intro {
display: none;
}
</style>
<script type="text/javascript" src="/static/js/people.js"></script>
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li class="currentNav"><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Resources</h3>
<div class="centerText">
{% for r in resources %}
<div class="objWrapper">
<div class="titleLink pName">
{{ r.title }}
</div>
<div class="intro">
{% autoescape off %}
{{ r.intro }}
{% endautoescape %}
<br />
{% if r.file %}
<a href="/static/{{r.file}}" target="_blank">Download Full Text</a>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,39 +0,0 @@
{% extends 'festival_wireframe.html' %}
{% block title %}
India Theatre Forum - Surveys
{% endblock %}
{% block leftCol %}
<ul id="leftNav">
<li><a href="/itf/">Home</a></li>
<li><a href="/itf/meetings">Activities</a><div class="helper">ITF Meetings - transcripts, audio, discussions.</div></li>
<li><a href="/itf/projects">Projects</a><div class="helper">Projects undertaken by the ITF...</div></li>
<li><a href="/erang">e-Rang</a><div class="helper">The theatre newsletter...</div></li>
<li><a href="/itf/resources">Resources</a><div class="helper">Downloadable reading materials and resources</div></li>
<li class="currentNav"><a href="/itf/surveys">Surveys</a><div class="helper">Surveys about theatre in India...</div></li>
<li><a href="/itf/publications">Publications</a><div class="helper">Publications by the ITF..</div></li>
<li><a href="/itf/people">Participants</a><div class="helper">A list of participants for all ITF meetings</div></li>
<li><a href="/itf/bestpractices">Best Practices</a><div class="helper">Best Practices publication</div></li>
</ul>
{% endblock %}
{% block centerCol %}
<div id="centerContent">
<h3>Surveys</h3>
<div class="centerText">
Data collection and analysis can be one of the greatest tools to being able to grasp, evaluate and work towards the future of Indian theatre practice.
<br /><br />
We aim to arrive at an understanding of the different ways theatre is practiced, audiences develop, auditoria are run and theatre economics works these are some of the focus areas that we hope our Survey will encompass over the years.
<br /><br />
Information, and data is collated through in-depth interviews. And the analysis of this data is being done in collaboration with TISS (Tata Institute of Social Sciences)
<br /><br />
The analysis will be shared broadly as well as the working system. In the hope that more nodal points of data collection and analysis may take place across the country. Thereby creating a wide pool of material to work on specific ideas to enhance theatre policy, working systems, practices etc.
<br /><br />
We will be putting up our survey forms regularly; please do try to fill them out as far as possible and bring us a step closer to understanding how theatre works in this wonderful country!
</div>
</div>
{% endblock %}

View File

@ -1,44 +0,0 @@
<html>
<head>
<style type="text/css">
#download {
width: 470px;
text-align: center;
}
#download a {
text-decoration: none;
color: #c73e2b;
font-weight: bold;
}
#download a:hover {
color: #fff;
}
.rightclick {
font-size: 12px;
color: #fff;
}
</style>
<script type="text/javascript" src="/static/js/swfobject.js"></script>
</head>
<body style="background: #000;">
<div id='mediaspace'>You will need Flash 9 to be able to view the videos.</div>
<div id="download"><a href="/static/{{video.file}}" target="_blank">Download Video</a><br /><span class="rightclick">(Right click and select "Save As...")</span></div>
<script type='text/javascript'>
var so = new SWFObject('/static/images/player.swf','mpl','470','320','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('autostart', 'true');
so.addParam('wmode','opaque');
so.addVariable('file','/static/{{video.file}}');
so.write('mediaspace');
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +0,0 @@
<div id="wrap">
<div class="center-div" id="multi-categories">
<h4>E-Rang</h4>
<p class="multi-content">
E-rang is our weekly newsletter. Subscribe.
</p>
</div>
<div class="center-div" id="resource-list-container">
<h4>Issues</h4>
<table style="border: 1px solid; font-size: 12px; width:100%; border-collapse: collapse;">
<tr style="font-weight:bold;">
<td>Issue No.</td>
<td>Name</td>
<td>Date</td>
</tr>
<tr>
<td>1</td>
<td>E-rang August</td>
<td>1-Aug-2009</td>
</tr>
<tr>
<td>2</td>
<td>E-rang September</td>
<td>1-Aug-2009</td>
</tr>
<tr>
<td>3</td>
<td>E-rang October</td>
<td>1-Aug-2009</td>
</tr>
<tr>
<td>4</td>
<td>E-rang November</td>
<td>1-Aug-2009</td>
</tr>
<tr>
<td>5</td>
<td>E-rang December</td>
<td>1-Aug-2009</td>
</tr>
</table>
</div>
</div>

View File

@ -1,84 +0,0 @@
<div id="wrap">
<div class="center-div" id="multi-categories">
<h4>Categories</h4>
<p class="multi-content">
<ul class="content-ul">
<li>Comedy</li>
<li>Drama</li>
<li>Political</li>
<li>Musical</li>
<li>Fantasy</li>
</ul>
</p>
</div>
<div class="center-div" id="multi-video">
<h4>Videos</h4>
<p class="multi-content">
<ul class="content-ul">
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/playvid100.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/playvid100.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/playvid100.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/playvid100.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/playvid100.jpg" /></li>
</ul>
</p>
<span class="seemore"><a href="#">See more Videos</a></span>
</div>
<div class="center-div" id="multi-images">
<h4>Images</h4>
<p class="multi-content">
<ul class="content-ul">
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/theatre.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/theatre.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/theatre.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/theatre.jpg" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/theatre.jpg" /></li>
</ul>
</p>
<span class="seemore"><a href="#">See more Images</a></span>
</div>
<div class="center-div" id="multi-audio">
<h4>Audio</h4>
<p class="multi-content">
<ul class="content-ul">
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/audio.gif" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/audio.gif" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/audio.gif" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/audio.gif" /></li>
<li><img style="border: 1px solid; padding: 2px;" src="/static/images/audio.gif" /></li>
</ul>
</p>
<span class="seemore"><a href="#">See more Audio</a></span>
</div>
<br />
<br />
<br />
<br />
<br />
</div>

View File

@ -1,84 +0,0 @@
<style type="text/css">
.headline {
text-align: center;
font-size: 22px;
font-weight: bold;
}
.mainStory {
position: relative;
padding: 4px;
height: 150px;
}
.column {
float: left;
width: 40%;
}
#firstColumn {
margin-right: 20%;
}
.columnStory {
position: relative;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 0px;
}
img.floatLeft {
float: left;
margin: 4px;
}
</style>
<div id="x0newsWrapper">
<div id="x0mainStory">
<div class="headline">
Lorem Ipsum
</div>
<div>
<img class="floatLeft" height="150" width="150" src="/static/images/150x150.jpg" />
</div>
<div class="mainStory">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
<div class="seeAll">
Read More...
</div>
</div>
<div class="storyImage">
<img class="floatLeft" height="150" width="150" src="/static/images/150x150.jpg" />
</div>
<div class="mainStory">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
<div class="seeAll">
Read More...
</div>
</div>
<div id="columnsContainer">
<div class="column" id="firstColumn">
<img class="floatLeft" height="50" width="50" src="/static/images/50x50.jpg" />
<div class="columnStory">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
<div class="seeAll">
Read More...
</div>
</div>
</div>
<div class="column">
<img class="floatLeft" height="50" width="50" src="/static/images/50x50.jpg" />
<div class="columnStory">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.
<div class="seeAll">
Read More...
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,57 +0,0 @@
<div id="wrap">
<div id="photoID" style="height: 1000px">
<h4>amar_singh's Profile</h4>
<p>
<table class="roundborder" style="border: 1px solid black; width: 100%; padding: 10px;">
<tr>
<td>
<img style="border: 1px solid; padding: 3px; background-color: #ffffff; color: white; margin-bottom: 100px;" src="/static/images/profileimage.jpg" class="roundborder" />
</td>
<td>
<div id="profile-details" style="font-size: 12px">
<p><span style="font-weight: bold; font-size: 16px;">Amar Singh</span></p>
<p><span style="font-weight: bold;">Occupation(s):</span> Director, Producer</p>
<p><span style="font-weight: bold;">Location(s): Mumbai</span>, Goa, Delhi</p>
<p></p>
<p><span style="font-weight: bold;">Groups:</span></p>
<ul>
<li><a href="#" style="text-decoration: none">Prithvi Theatre</a></li>
<li><a href="#" style="text-decoration: none">Lighthouse Theatre</a></li>
<li><a href="#" style="text-decoration: none">Sunlight Theatre</a></li>
<li><a href="#" style="text-decoration: none">EyeMoon Theatre</a></li>
</ul>
<p><span style="font-weight: bold;">Latest Posts:</span></p>
<ul>
<li><a href="#" style="text-decoration: none">Re: Timeline for events</a></li>
<li><a href="#" style="text-decoration: none">Re:Re: Timeline for events</a></li>
</ul>
<p><span style="font-weight: bold;">Uploads:</span></p>
<ul>
<li><a href="#" style="text-decoration: none">Lighthouse Theatre Event Schedule [1-Aug-2009].pdf</a></li>
<li><a href="#" style="text-decoration: none">Lighthouse Theatre Introduction.pdf</a></li>
<li><a href="#" style="text-decoration: none">Theatre Survey.doc</a></li>
</ul>
</div>
</td>
</tr>
</table>
</p>
</div>
</div>

View File

@ -1,94 +0,0 @@
<div id="wrap">
<div class="center-div" id="multi-categories">
<h4>Categories</h4>
<p class="multi-content">
<ul class="content-ul">
<li>Scripts</li>
<li>Funding</li>
<li>Training</li>
<li>Tributes</li>
</ul>
</p>
</div>
<div class="center-div" id="resource-list-container">
<h4>Resources</h4>
<table style="border: 1px solid; font-size: 12px; width:100%; border-collapse: collapse;">
<tr style="font-weight:bold;">
<td>Name</td>
<td>Description</td>
<td>Categories</td>
<td>Type</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
<tr>
<td>Hamlet - Full Script</td>
<td>Full text of Hamlet the famous Shakespearean play.</td>
<td>Shakespere, Hamlet, Drama</td>
<td>PDF Document</td>
</tr>
</table>
</div>
</div>

View File

@ -18,29 +18,29 @@ urlpatterns = patterns('',
# (r'^bhangar/', include('bhangar.foo.urls')), # (r'^bhangar/', include('bhangar.foo.urls')),
#(r'^search/', include('solango.urls')), #(r'^search/', include('solango.urls')),
(r'^$', "frontpage.views.index"), (r'^$', "frontpage.views.index"),
(r'^t/$', "frontpage.views.index"), # (r'^t/$', "frontpage.views.index"),
(r'm/', include('insidepages.urls')), (r'm/', include('insidepages.urls')),
(r'^page/(?P<slug>[a-zA-Z].*?)/', 'pages.views.render_page'), (r'^page/(?P<slug>[a-zA-Z].*?)/', 'pages.views.render_page'),
(r'^contact/$', 'frontpage.views.contact'), (r'^contact/$', 'frontpage.views.contact'),
(r'^emailer/issue/(?P<issue_no>\d+)/$', 'emailer.views.show_emailer'), (r'^emailer/issue/(?P<issue_no>\d+)/$', 'emailer.views.show_emailer'),
# ('m/(?P<module_slug>.*)', 'insidepages.views.main'), # ('m/(?P<module_slug>.*)', 'insidepages.views.main'),
(r'^comments/', include('django.contrib.comments.urls')), (r'^comments/', include('django.contrib.comments.urls')),
(r'^ckeditor/', include('ckeditor.urls')), # (r'^ckeditor/', include('ckeditor.urls')),
(r'^robots.txt$', direct_to_template, {'template': 'robots.txt', 'mimetype': 'text/plain'}), (r'^robots.txt$', direct_to_template, {'template': 'robots.txt', 'mimetype': 'text/plain'}),
(r'^erang/', include('erang_organised.urls')), # (r'^erang/', include('erang_organised.urls')),
(r'api/', 'api.views.api'), # (r'api/', 'api.views.api'),
(r'jsdoc/', 'api.views.jsdoc'), # (r'jsdoc/', 'api.views.jsdoc'),
(r'site.json', 'app.views.site_json'), # (r'site.json', 'app.views.site_json'),
(r'^itf/', include('festival.urls')), (r'^itf/', include('festival.urls')),
# (r'^accounts/register/', 'registration.views.register', {'form_class': ItfRegistrationForm }), # (r'^accounts/register/', 'registration.views.register', {'form_class': ItfRegistrationForm }),
(r'^accounts/', include('registration.urls')), (r'^accounts/', include('registration.urls')),
(r'^admin/', include(admin.site.urls)), (r'^admin/', include(admin.site.urls)),
('^getLanguages', 'itfcore.views.getLanguages'), # ('^getLanguages', 'itfcore.views.getLanguages'),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs' # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation: # to INSTALLED_APPS to enable admin documentation:
#Core views: #Core views:
(r'test_profile', 'itfprofiles.views.person_form'), (r'test_profile', 'itfprofiles.views.person_form'),
(r'i/', include('itfcore.urls')), # (r'i/', include('itfcore.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^search/', include('haystack.urls')), (r'^search/', include('haystack.urls')),
(r'^markitup/', include('markitup.urls')), (r'^markitup/', include('markitup.urls')),
@ -51,7 +51,7 @@ urlpatterns = patterns('',
# (r'^ajax_filtered_fields/', include('ajax_filtered_fields.urls')), # (r'^ajax_filtered_fields/', include('ajax_filtered_fields.urls')),
# Uncomment the next line to enable the admin: # Uncomment the next line to enable the admin:
(r'^test$', 'app.views.index'), # (r'^test$', 'app.views.index'),
# (r'^$', 'festival.views.home') # (r'^$', 'festival.views.home')
) )

View File

View File

@ -1,110 +0,0 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from datetime import datetime
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Max
from ox.django.fields import DictField
#from app.models import site_config
site_config = {
'user': {
'ui': {}
}
}
# from itemlist.models import List, Position
class UserProfile(models.Model):
reset_token = models.TextField(blank=True, null=True)
user = models.ForeignKey(User, unique=True)
# validate_token = models.TextField(blank=True, null=True)
# is_validated = models.BooleanField(default=False)
files_updated = models.DateTimeField(default=datetime.now)
newsletter = models.BooleanField(default=True)
ui = DictField(default={})
preferences = DictField(default={})
def get_preferences(self):
prefs = self.preferences
prefs['email'] = self.user.email
return prefs
def get_ui(self):
ui = {}
config = site_config()
ui.update(config['user']['ui'])
def updateUI(ui, new):
'''
only update set keys in dicts
'''
for key in new:
if isinstance(new[key], dict) and key in ui:
ui[key] = updateUI(ui[key], new[key])
else:
ui[key] = new[key]
return ui
ui = updateUI(ui, self.ui)
if not 'lists' in ui:
ui['lists'] = {}
ui['lists'][''] = config['uiDefaults']['list']
def add(lists, section):
ids = []
for l in lists:
qs = Position.objects.filter(section=section)
if section == 'featured':
try:
pos = Position.objects.get(list=l, section=section)
created = False
except Position.DoesNotExist:
pos = Position(list=l, section=section, user=self.user)
pos.save()
created = True
else:
pos, created = Position.objects.get_or_create(list=l, user=self.user, section=section)
qs = qs.filter(user=self.user)
if created:
pos.position = qs.aggregate(Max('position'))['position__max'] + 1
pos.save()
id = l.get_id()
'''
if id not in ui['lists']:
ui['lists'][id] = {}
ui['lists'][id].update(ui['lists'][''])
'''
ids.append(id)
return ids
ids = ['']
ids += add(self.user.lists.exclude(status="featured"), 'personal')
ids += add(self.user.subscribed_lists.filter(status='public'), 'public')
ids += add(List.objects.filter(status='featured'), 'featured')
for i in ui['lists'].keys():
if i not in ids:
del ui['lists'][i]
return ui
def user_post_save(sender, instance, **kwargs):
profile, new = UserProfile.objects.get_or_create(user=instance)
models.signals.post_save.connect(user_post_save, sender=User)
def get_user_json(user):
# profile = user.get_profile()
result = {}
for key in ('username', ):
result[key] = getattr(user, key)
if user.is_superuser:
result['level'] = 'admin'
elif user.is_staff:
result['level'] = 'staff'
else:
result['level'] = 'member'
result['groups'] = [g.name for g in user.groups.all()]
# result['preferences'] = profile.get_preferences()
# result['ui'] = profile.get_ui()
return result

View File

@ -1,4 +0,0 @@
Hi {{sitename}} admin,
someone sent you a message:
{{message}}

View File

@ -1,7 +0,0 @@
To reset your password, please use the following token:
{{token}}
If you do not want to reset your password, no further action is required.
{{sitename}} - {{url}}

View File

@ -1,23 +0,0 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

View File

@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.conf.urls.defaults import *
urlpatterns = patterns("user.views",
(r'^preferences', 'preferences'),
(r'^login', 'login'),
(r'^logout', 'logout'),
(r'^register', 'register'),
)

View File

@ -1,478 +0,0 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import random
random.seed()
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.template import RequestContext, loader
from django.utils import simplejson as json
from django.conf import settings
from django.core.mail import send_mail, BadHeaderError
from ox.django.shortcuts import render_to_json_response, json_response
from ox.django.decorators import login_required_json
import ox
import models
from api.actions import actions
from app.models import site_config
from django.db.models import Q
# from item.models import Access, Item
class LoginForm(forms.Form):
usernameOrEmail = forms.TextInput()
password = forms.TextInput()
def signin(request):
'''
param data {
username: 'username',
password: 'password'
}
return {
status: {'code': 200, 'text': 'ok'}
data: {
errors: {
username: 'Unknown Username',
password: 'Incorrect Password'
}
user: {
...
}
}
}
'''
data = json.loads(request.POST['data'])
form = LoginForm(data, request.FILES)
if form.is_valid():
typ = data['usernameOrEmail'][0]['id']
val = data['usernameOrEmail'][1]
qstring = typ + "__iexact"
q = Q(**{qstring:val})
if models.User.objects.filter(q).count == 0:
response = json_response({
'errors': {
'username': 'Unknown Username or E-Mail address'
}
})
else:
if typ == 'email':
uname = models.User.objects.get(email=val).username
else:
uname = val
user = authenticate(username=uname, password=data['password'])
if user is not None:
if user.is_active:
login(request, user)
user_json = models.get_user_json(user)
response = json_response({
'user': user_json
})
else:
response = json_response({
'errors': {
'username': 'User Disabled'
}
})
else:
response = json_response({
'errors': {
'password': 'Incorrect Password'
}
})
else:
response = json_response(status=400, text='invalid data')
return render_to_json_response(response)
actions.register(signin, "login", cache=False)
def signout(request):
'''
param data {
}
return {
status: {'code': int, 'text': string}
data: {
user: {
default user
}
}
}
'''
response = json_response(text='ok')
if request.user.is_authenticated():
response = json_response(text='logged out')
logout(request)
# response['data']['user'] = site_config()['user']
response['data']['user'] = {}
return render_to_json_response(response)
actions.register(signout, "logout", cache=False)
class RegisterForm(forms.Form):
username = forms.TextInput()
password = forms.TextInput()
email = forms.TextInput()
def register(request):
'''
param data {
username: 'username',
password: 'password',
email: 'emailaddress'
}
return {
status: {'code': int, 'text': string}
data: {
errors: {
username: 'Unknown Username',
password: 'Incorrect Password'
}
user: {
...
}
}
}
'''
data = json.loads(request.POST['data'])
form = RegisterForm(data, request.FILES)
if form.is_valid():
if models.User.objects.filter(username=form.data['username']).count() > 0:
response = json_response({
'errors': {
'username': 'Username already exists'
}
})
elif models.User.objects.filter(email=form.data['email']).count() > 0:
response = json_response({
'errors': {
'email': 'Email address already exits'
}
})
elif not form.data['password']:
response = json_response({
'errors': {
'password': 'Password can not be empty'
}
})
else:
first_user = models.User.objects.count() == 0
user = models.User(username=form.data['username'], email=form.data['email'])
user.set_password(form.data['password'])
#make first user admin
user.is_superuser = first_user
user.is_staff = first_user
user.save()
#create default user lists:
'''
for l in settings.DEFAULT_BOXES:
list = models.List(name=l['name'], user=user)
for key in ('query', 'public', 'featured'):
if key in l:
setattr(list, key, l[key])
list.save()
'''
user = authenticate(username=form.data['username'],
password=form.data['password'])
login(request, user)
user_json = models.get_user_json(user)
response = json_response({
'user': user_json
}, text='account created')
else:
response = json_response(status=400, text='invalid data')
return render_to_json_response(response)
actions.register(register, cache=False)
def resetPassword(request):
'''
param data {
token: reset token
password: new password
}
return {
status: {'code': int, 'text': string}
data: {
errors: {
token: 'Invalid token'
}
user {
}
}
}
'''
data = json.loads(request.POST['data'])
if 'token' in data and 'password' in data:
if not data['password']:
response = json_response({
'errors': {
'password': 'Password can not be empty'
}
})
else:
qs = models.UserProfile.objects.filter(reset_token=data['token'])
if qs.count() == 1:
user = qs[0].user
user.set_password(data['password'])
user.save()
user_profile = user.get_profile()
user_profile.reset_token = None
user_profile.save()
user = authenticate(username=user.username, password=data['password'])
login(request, user)
user_json = models.get_user_json(user)
response = json_response({
'user': user_json
}, text='password reset')
else:
response = json_response({
'errors': {
'token': 'Invalid token'
}
})
else:
response = json_response(status=400, text='invalid data')
return render_to_json_response(response)
actions.register(resetPassword, cache=False)
def requestToken(request):
'''
param data {
username: username,
email: email
}
return {
status: {'code': int, 'text': string}
data: {
errors: {
username: 'Unknown Username'
email: 'Unknown Email'
}
username: user
}
}
'''
data = json.loads(request.POST['data'])
user = None
if 'username' in data:
try:
user = models.User.objects.get(username=data['username'])
except models.User.DoesNotExist:
user = None
elif 'email' in data:
try:
user = models.User.objects.get(email=data['email'])
except models.User.DoesNotExist:
user = None
if user:
while True:
token = ox.to32(random.randint(32768, 1048575))
if models.UserProfile.objects.filter(reset_token=token).count() == 0:
break
user_profile = user.get_profile()
user_profile.reset_token = token
user_profile.save()
template = loader.get_template('password_reset_email.txt')
context = RequestContext(request, {
'url': request.build_absolute_uri("/"),
'token': token,
'sitename': settings.SITENAME,
})
message = template.render(context)
subject = '%s - Reset Password' % settings.SITENAME
user.email_user(subject, message)
response = json_response({
'username': user.username
}, text='password reset email sent')
else:
response = json_response({
'errors': {
}
})
if 'username' in data:
response['data']['errors']['username'] = 'Unknown Username'
elif 'email' in data:
response['data']['errors']['email'] = 'Unknown Email'
else:
response = json_response(status=400, text='invalid data')
return render_to_json_response(response)
actions.register(requestToken, cache=False)
def findUser(request):
'''
param data {
key: "username",
value: "foo", operator: "="
}
return {
'status': {'code': int, 'text': string}
'data': {
users = ['user1', 'user2']
}
}
'''
#FIXME: support other operators and keys
data = json.loads(request.POST['data'])
response = json_response(status=200, text='ok')
if data['key'] == 'email':
response['data']['users'] = [u.username for u in User.objects.filter(email__iexact=data['value'])]
else:
response['data']['users'] = [u.username for u in User.objects.filter(username__iexact=data['value'])]
return render_to_json_response(response)
actions.register(findUser)
class ContactForm(forms.Form):
email = forms.EmailField()
subject = forms.TextInput()
message = forms.TextInput()
def contact(request):
'''
param data {
'email': string,
'message': string
}
return {
'status': {'code': int, 'text': string}
}
'''
data = json.loads(request.POST['data'])
form = ContactForm(data, request.FILES)
if form.is_valid():
email = data['email']
template = loader.get_template('contact_email.txt')
context = RequestContext(request, {
'sitename': settings.SITENAME,
'email': email,
'message': data['message'],
})
message = template.render(context)
subject = '%s contact: %s' % (settings.SITENAME, data['subject'])
response = json_response(text='message sent')
try:
send_mail(subject, message, email, [settings.DEFAULT_FROM_EMAIL, ])
except BadHeaderError:
response = json_response(status=400, text='invalid data')
else:
response = json_response(status=400, text='invalid data')
return render_to_json_response(response)
actions.register(contact, cache=False)
def getPositionById(list, key):
for i in range(0, len(list)):
if list[i]['id'] == key:
return i
return -1
@login_required_json
def setPreferences(request):
'''
param data {
key.subkey: value
}
return
'''
data = json.loads(request.POST['data'])
keys = data.keys()[0].split('.')
value = data.values()[0]
profile = request.user.get_profile()
p = profile.preferences
while len(keys)>1:
key = keys.pop(0)
if isinstance(p, list):
p = p[getPositionById(p, key)]
else:
p = p[key]
p[keys[0]] = value
profile.save()
response = json_response()
return render_to_json_response(response)
actions.register(setPreferences, cache=False)
@login_required_json
def resetUI(request):
'''
reset user ui settings to defaults
param data {
}
return {
'status': {'code': int, 'text': string}
}
'''
profile = request.user.get_profile()
profile.ui = {}
profile.save()
response = json_response()
return render_to_json_response(response)
actions.register(resetUI, cache=False)
def setUI(request):
'''
param data {
key.subkey: value
}
you can set nested keys
api.setUI({"lists|my|ListView": "icons"})
return {
'status': {'code': int, 'text': string}
}
'''
data = json.loads(request.POST['data'])
if request.user.is_authenticated():
for key in data:
keys = key.split('|')
value = data[key]
profile = request.user.get_profile()
p = profile.ui
while len(keys)>1:
key = keys.pop(0)
if isinstance(p, list):
p = p[getPositionById(p, key)]
else:
if key not in p:
p[key] = {}
p = p[key]
p[keys[0]] = value
profile.save()
if data.get('item', False):
item = Item.objects.get(itemId=data['item'])
if request.user.is_authenticated():
access, created = Access.objects.get_or_create(item=item, user=request.user)
else:
access, created = Access.objects.get_or_create(item=item, user=None)
access.save()
response = json_response()
return render_to_json_response(response)
actions.register(setUI, cache=False)