From 250d1c8df658ed6a0854a060c466ef2f831176c4 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 25 May 2012 04:14:10 +0530 Subject: [PATCH] major cleanup --- itf/aldensNotes.txt | 97 - itf/api/__init__.py | 0 itf/api/actions.py | 95 - itf/api/models.py | 3 - itf/api/tests.py | 23 - itf/api/views.py | 408 --- itf/app/models.py | 4 +- itf/boxes/__init__.py | 0 itf/boxes/admin.py | 24 - itf/boxes/models.py | 241 -- itf/boxes/tests.py | 23 - itf/boxes/views.py | 48 - itf/dropandcreatedb.py | 20 - itf/erang/__init__.py | 0 itf/erang/admin.py | 44 - itf/erang/models.py | 99 - itf/erang/tests.py | 23 - itf/erang/views.py | 1 - itf/erang_organised/__init__.py | 0 itf/erang_organised/admin.py | 13 - itf/erang_organised/models.py | 59 - itf/erang_organised/templatetags/__init__.py | 0 itf/erang_organised/templatetags/erangtags.py | 8 - itf/erang_organised/tests.py | 23 - itf/erang_organised/urls.py | 13 - itf/erang_organised/views.py | 108 - itf/insidepages/urls.py | 3 +- itf/insidepages/views.py | 46 + itf/meetingdata.json | 1 - itf/settings.py | 10 +- itf/sqldiff011111.sql | 3 - itf/static/js/jquery.pandoravideo.js | 93 +- itf/templates/404.html | 6 +- itf/templates/500.html | 6 +- itf/templates/base.html | 17 - itf/templates/bestpractices.html | 168 -- .../bestpractices/BestPractice/info.html | 14 - .../bestpractices/BestPractice/preview.html | 7 - itf/templates/bpdownload.html | 21 - itf/templates/bpfaq.html | 32 - itf/templates/bpglossary.html | 31 - itf/templates/bpguideline.html | 6 - itf/templates/bpguidelines.html | 25 - itf/templates/bpstories.html | 25 - itf/templates/bpstory.html | 14 - itf/templates/erang.html | 34 - itf/templates/erang/home.html | 114 - itf/templates/erang_organised/Issue/info.html | 14 - .../erang_organised/Issue/preview.html | 5 - itf/templates/festival/Project/preview.html | 5 - itf/templates/festival_base.html | 71 - itf/templates/festival_index.html | 88 - itf/templates/festival_wireframe.html | 106 - itf/templates/home.html | 72 - itf/templates/index.html | 33 - itf/templates/meeting.html | 313 -- itf/templates/meeting_details.html | 41 - itf/templates/meetings.html | 48 - itf/templates/mockup.html | 241 -- itf/templates/noel/insidepage.html | 18 - itf/templates/people.html | 49 - itf/templates/project.html | 13 - itf/templates/projects.html | 39 - itf/templates/publications.html | 76 - itf/templates/resources.html | 54 - itf/templates/surveys.html | 39 - itf/templates/video.html | 44 - itf/templates/x0disc.html | 2609 ----------------- itf/templates/x0erang.html | 58 - itf/templates/x0multi.html | 84 - itf/templates/x0news.html | 84 - itf/templates/x0profile.html | 57 - itf/templates/x0resources.html | 94 - itf/urls.py | 18 +- itf/user/__init__.py | 0 itf/user/models.py | 110 - itf/user/templates/contact_email.txt | 4 - itf/user/templates/password_reset_email.txt | 7 - itf/user/tests.py | 23 - itf/user/urls.py | 13 - itf/user/views.py | 478 --- 81 files changed, 123 insertions(+), 6938 deletions(-) delete mode 100755 itf/aldensNotes.txt delete mode 100755 itf/api/__init__.py delete mode 100755 itf/api/actions.py delete mode 100755 itf/api/models.py delete mode 100755 itf/api/tests.py delete mode 100755 itf/api/views.py delete mode 100755 itf/boxes/__init__.py delete mode 100755 itf/boxes/admin.py delete mode 100755 itf/boxes/models.py delete mode 100755 itf/boxes/tests.py delete mode 100755 itf/boxes/views.py delete mode 100755 itf/dropandcreatedb.py delete mode 100755 itf/erang/__init__.py delete mode 100755 itf/erang/admin.py delete mode 100755 itf/erang/models.py delete mode 100755 itf/erang/tests.py delete mode 100755 itf/erang/views.py delete mode 100755 itf/erang_organised/__init__.py delete mode 100755 itf/erang_organised/admin.py delete mode 100755 itf/erang_organised/models.py delete mode 100755 itf/erang_organised/templatetags/__init__.py delete mode 100755 itf/erang_organised/templatetags/erangtags.py delete mode 100755 itf/erang_organised/tests.py delete mode 100755 itf/erang_organised/urls.py delete mode 100755 itf/erang_organised/views.py delete mode 100755 itf/meetingdata.json delete mode 100755 itf/sqldiff011111.sql delete mode 100755 itf/templates/base.html delete mode 100755 itf/templates/bestpractices.html delete mode 100755 itf/templates/bestpractices/BestPractice/info.html delete mode 100755 itf/templates/bestpractices/BestPractice/preview.html delete mode 100755 itf/templates/bpdownload.html delete mode 100755 itf/templates/bpfaq.html delete mode 100755 itf/templates/bpglossary.html delete mode 100755 itf/templates/bpguideline.html delete mode 100755 itf/templates/bpguidelines.html delete mode 100755 itf/templates/bpstories.html delete mode 100755 itf/templates/bpstory.html delete mode 100755 itf/templates/erang.html delete mode 100755 itf/templates/erang/home.html delete mode 100755 itf/templates/erang_organised/Issue/info.html delete mode 100755 itf/templates/erang_organised/Issue/preview.html delete mode 100755 itf/templates/festival/Project/preview.html delete mode 100755 itf/templates/festival_base.html delete mode 100755 itf/templates/festival_index.html delete mode 100755 itf/templates/festival_wireframe.html delete mode 100755 itf/templates/home.html delete mode 100755 itf/templates/index.html delete mode 100755 itf/templates/meeting.html delete mode 100755 itf/templates/meeting_details.html delete mode 100755 itf/templates/meetings.html delete mode 100755 itf/templates/mockup.html delete mode 100755 itf/templates/people.html delete mode 100755 itf/templates/project.html delete mode 100755 itf/templates/projects.html delete mode 100755 itf/templates/publications.html delete mode 100755 itf/templates/resources.html delete mode 100755 itf/templates/surveys.html delete mode 100755 itf/templates/video.html delete mode 100755 itf/templates/x0disc.html delete mode 100755 itf/templates/x0erang.html delete mode 100755 itf/templates/x0multi.html delete mode 100755 itf/templates/x0news.html delete mode 100755 itf/templates/x0profile.html delete mode 100755 itf/templates/x0resources.html delete mode 100755 itf/user/__init__.py delete mode 100755 itf/user/models.py delete mode 100755 itf/user/templates/contact_email.txt delete mode 100755 itf/user/templates/password_reset_email.txt delete mode 100755 itf/user/tests.py delete mode 100755 itf/user/urls.py delete mode 100755 itf/user/views.py diff --git a/itf/aldensNotes.txt b/itf/aldensNotes.txt deleted file mode 100755 index c21b30b..0000000 --- a/itf/aldensNotes.txt +++ /dev/null @@ -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 diff --git a/itf/api/__init__.py b/itf/api/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/api/actions.py b/itf/api/actions.py deleted file mode 100755 index 787a9f4..0000000 --- a/itf/api/actions.py +++ /dev/null @@ -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() diff --git a/itf/api/models.py b/itf/api/models.py deleted file mode 100755 index 71a8362..0000000 --- a/itf/api/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/itf/api/tests.py b/itf/api/tests.py deleted file mode 100755 index 2247054..0000000 --- a/itf/api/tests.py +++ /dev/null @@ -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 -"""} - diff --git a/itf/api/views.py b/itf/api/views.py deleted file mode 100755 index e1ece3e..0000000 --- a/itf/api/views.py +++ /dev/null @@ -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', '
\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', '
\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 diff --git a/itf/app/models.py b/itf/app/models.py index 8125d35..6788a5e 100755 --- a/itf/app/models.py +++ b/itf/app/models.py @@ -334,7 +334,9 @@ class ItfModel(models.Model): results = paginator.page(paginator.num_pages) 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 { diff --git a/itf/boxes/__init__.py b/itf/boxes/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/boxes/admin.py b/itf/boxes/admin.py deleted file mode 100755 index c7098bf..0000000 --- a/itf/boxes/admin.py +++ /dev/null @@ -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) diff --git a/itf/boxes/models.py b/itf/boxes/models.py deleted file mode 100755 index f4f4d66..0000000 --- a/itf/boxes/models.py +++ /dev/null @@ -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 -''' diff --git a/itf/boxes/tests.py b/itf/boxes/tests.py deleted file mode 100755 index 2247054..0000000 --- a/itf/boxes/tests.py +++ /dev/null @@ -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 -"""} - diff --git a/itf/boxes/views.py b/itf/boxes/views.py deleted file mode 100755 index 3cb330e..0000000 --- a/itf/boxes/views.py +++ /dev/null @@ -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 diff --git a/itf/dropandcreatedb.py b/itf/dropandcreatedb.py deleted file mode 100755 index 94127e4..0000000 --- a/itf/dropandcreatedb.py +++ /dev/null @@ -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") - - diff --git a/itf/erang/__init__.py b/itf/erang/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/erang/admin.py b/itf/erang/admin.py deleted file mode 100755 index 935edb6..0000000 --- a/itf/erang/admin.py +++ /dev/null @@ -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) - diff --git a/itf/erang/models.py b/itf/erang/models.py deleted file mode 100755 index 0aa81c7..0000000 --- a/itf/erang/models.py +++ /dev/null @@ -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) diff --git a/itf/erang/tests.py b/itf/erang/tests.py deleted file mode 100755 index 2247054..0000000 --- a/itf/erang/tests.py +++ /dev/null @@ -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 -"""} - diff --git a/itf/erang/views.py b/itf/erang/views.py deleted file mode 100755 index 60f00ef..0000000 --- a/itf/erang/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/itf/erang_organised/__init__.py b/itf/erang_organised/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/erang_organised/admin.py b/itf/erang_organised/admin.py deleted file mode 100755 index bc64e49..0000000 --- a/itf/erang_organised/admin.py +++ /dev/null @@ -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) - - diff --git a/itf/erang_organised/models.py b/itf/erang_organised/models.py deleted file mode 100755 index fc4bc4f..0000000 --- a/itf/erang_organised/models.py +++ /dev/null @@ -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) diff --git a/itf/erang_organised/templatetags/__init__.py b/itf/erang_organised/templatetags/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/erang_organised/templatetags/erangtags.py b/itf/erang_organised/templatetags/erangtags.py deleted file mode 100755 index 7084212..0000000 --- a/itf/erang_organised/templatetags/erangtags.py +++ /dev/null @@ -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) diff --git a/itf/erang_organised/tests.py b/itf/erang_organised/tests.py deleted file mode 100755 index 2247054..0000000 --- a/itf/erang_organised/tests.py +++ /dev/null @@ -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 -"""} - diff --git a/itf/erang_organised/urls.py b/itf/erang_organised/urls.py deleted file mode 100755 index f3c20d4..0000000 --- a/itf/erang_organised/urls.py +++ /dev/null @@ -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), -) diff --git a/itf/erang_organised/views.py b/itf/erang_organised/views.py deleted file mode 100755 index b6b334b..0000000 --- a/itf/erang_organised/views.py +++ /dev/null @@ -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") -''' diff --git a/itf/insidepages/urls.py b/itf/insidepages/urls.py index 58bfda1..246ece9 100755 --- a/itf/insidepages/urls.py +++ b/itf/insidepages/urls.py @@ -5,5 +5,6 @@ urlpatterns = patterns('', (r'^get_list$', views.get_list), (r'^get_details$', views.get_details), (r'^get_tab$', views.get_tab), - (r'^(?P.*)/$', views.main), + #(r'^static/(?P.*)/$', views.render_object), + (r'^(?P.*)/$', views.render_object), ) diff --git a/itf/insidepages/views.py b/itf/insidepages/views.py index 390a8f3..33086ba 100755 --- a/itf/insidepages/views.py +++ b/itf/insidepages/views.py @@ -80,3 +80,49 @@ def get_details(request): 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) diff --git a/itf/meetingdata.json b/itf/meetingdata.json deleted file mode 100755 index 45d9a49..0000000 --- a/itf/meetingdata.json +++ /dev/null @@ -1 +0,0 @@ -[{"pk": 22, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 8}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_message", "name": "Can add message", "content_type": 4}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 1}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_message", "name": "Can change message", "content_type": 4}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 1}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_message", "name": "Can delete message", "content_type": 4}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 1}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 5}}, {"pk": 94, "model": "auth.permission", "fields": {"codename": "add_audio", "name": "Can add audio", "content_type": 32}}, {"pk": 103, "model": "auth.permission", "fields": {"codename": "add_document", "name": "Can add document", "content_type": 35}}, {"pk": 100, "model": "auth.permission", "fields": {"codename": "add_image", "name": "Can add image", "content_type": 34}}, {"pk": 82, "model": "auth.permission", "fields": {"codename": "add_meeting", "name": "Can add meeting", "content_type": 28}}, {"pk": 91, "model": "auth.permission", "fields": {"codename": "add_meetingday", "name": "Can add meeting day", "content_type": 31}}, {"pk": 106, "model": "auth.permission", "fields": {"codename": "add_project", "name": "Can add project", "content_type": 36}}, {"pk": 88, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 30}}, {"pk": 85, "model": "auth.permission", "fields": {"codename": "add_talk", "name": "Can add talk", "content_type": 29}}, {"pk": 97, "model": "auth.permission", "fields": {"codename": "add_video", "name": "Can add video", "content_type": 33}}, {"pk": 95, "model": "auth.permission", "fields": {"codename": "change_audio", "name": "Can change audio", "content_type": 32}}, {"pk": 104, "model": "auth.permission", "fields": {"codename": "change_document", "name": "Can change document", "content_type": 35}}, {"pk": 101, "model": "auth.permission", "fields": {"codename": "change_image", "name": "Can change image", "content_type": 34}}, {"pk": 83, "model": "auth.permission", "fields": {"codename": "change_meeting", "name": "Can change meeting", "content_type": 28}}, {"pk": 92, "model": "auth.permission", "fields": {"codename": "change_meetingday", "name": "Can change meeting day", "content_type": 31}}, {"pk": 107, "model": "auth.permission", "fields": {"codename": "change_project", "name": "Can change project", "content_type": 36}}, {"pk": 89, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 30}}, {"pk": 86, "model": "auth.permission", "fields": {"codename": "change_talk", "name": "Can change talk", "content_type": 29}}, {"pk": 98, "model": "auth.permission", "fields": {"codename": "change_video", "name": "Can change video", "content_type": 33}}, {"pk": 96, "model": "auth.permission", "fields": {"codename": "delete_audio", "name": "Can delete audio", "content_type": 32}}, {"pk": 105, "model": "auth.permission", "fields": {"codename": "delete_document", "name": "Can delete document", "content_type": 35}}, {"pk": 102, "model": "auth.permission", "fields": {"codename": "delete_image", "name": "Can delete image", "content_type": 34}}, {"pk": 84, "model": "auth.permission", "fields": {"codename": "delete_meeting", "name": "Can delete meeting", "content_type": 28}}, {"pk": 93, "model": "auth.permission", "fields": {"codename": "delete_meetingday", "name": "Can delete meeting day", "content_type": 31}}, {"pk": 108, "model": "auth.permission", "fields": {"codename": "delete_project", "name": "Can delete project", "content_type": 36}}, {"pk": 90, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 30}}, {"pk": 87, "model": "auth.permission", "fields": {"codename": "delete_talk", "name": "Can delete talk", "content_type": 29}}, {"pk": 99, "model": "auth.permission", "fields": {"codename": "delete_video", "name": "Can delete video", "content_type": 33}}, {"pk": 112, "model": "auth.permission", "fields": {"codename": "add_multilingualflatpage", "name": "Can add multilingual flat page", "content_type": 38}}, {"pk": 109, "model": "auth.permission", "fields": {"codename": "add_multilingualflatpagetranslation", "name": "Can add multilingual flat page translation", "content_type": 37}}, {"pk": 113, "model": "auth.permission", "fields": {"codename": "change_multilingualflatpage", "name": "Can change multilingual flat page", "content_type": 38}}, {"pk": 110, "model": "auth.permission", "fields": {"codename": "change_multilingualflatpagetranslation", "name": "Can change multilingual flat page translation", "content_type": 37}}, {"pk": 114, "model": "auth.permission", "fields": {"codename": "delete_multilingualflatpage", "name": "Can delete multilingual flat page", "content_type": 38}}, {"pk": 111, "model": "auth.permission", "fields": {"codename": "delete_multilingualflatpagetranslation", "name": "Can delete multilingual flat page translation", "content_type": 37}}, {"pk": 52, "model": "auth.permission", "fields": {"codename": "add_event", "name": "Can add event", "content_type": 18}}, {"pk": 73, "model": "auth.permission", "fields": {"codename": "add_file", "name": "Can add file", "content_type": 25}}, {"pk": 70, "model": "auth.permission", "fields": {"codename": "add_image", "name": "Can add image", "content_type": 24}}, {"pk": 55, "model": "auth.permission", "fields": {"codename": "add_language", "name": "Can add language", "content_type": 19}}, {"pk": 79, "model": "auth.permission", "fields": {"codename": "add_link", "name": "Can add link", "content_type": 27}}, {"pk": 58, "model": "auth.permission", "fields": {"codename": "add_location", "name": "Can add location", "content_type": 20}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_nickname", "name": "Can add nickname", "content_type": 13}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "add_performance", "name": "Can add performance", "content_type": 17}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_production", "name": "Can add production", "content_type": 12}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "add_profile", "name": "Can add profile", "content_type": 15}}, {"pk": 67, "model": "auth.permission", "fields": {"codename": "add_profilegroup", "name": "Can add Person to Theatre Group Relation", "content_type": 23}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_profileproduction", "name": "Can add Peoples Role in Production", "content_type": 11}}, {"pk": 61, "model": "auth.permission", "fields": {"codename": "add_profileprofile", "name": "Can add Person to Person Relation", "content_type": 21}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "add_profiletranslation", "name": "Can add profile translation", "content_type": 14}}, {"pk": 76, "model": "auth.permission", "fields": {"codename": "add_randomquote", "name": "Can add random quote", "content_type": 26}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_script", "name": "Can add script", "content_type": 10}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_scripttranslation", "name": "Can add script translation", "content_type": 9}}, {"pk": 64, "model": "auth.permission", "fields": {"codename": "add_theatregroup", "name": "Can add theatre group", "content_type": 22}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "add_venue", "name": "Can add venue", "content_type": 16}}, {"pk": 53, "model": "auth.permission", "fields": {"codename": "change_event", "name": "Can change event", "content_type": 18}}, {"pk": 74, "model": "auth.permission", "fields": {"codename": "change_file", "name": "Can change file", "content_type": 25}}, {"pk": 71, "model": "auth.permission", "fields": {"codename": "change_image", "name": "Can change image", "content_type": 24}}, {"pk": 56, "model": "auth.permission", "fields": {"codename": "change_language", "name": "Can change language", "content_type": 19}}, {"pk": 80, "model": "auth.permission", "fields": {"codename": "change_link", "name": "Can change link", "content_type": 27}}, {"pk": 59, "model": "auth.permission", "fields": {"codename": "change_location", "name": "Can change location", "content_type": 20}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_nickname", "name": "Can change nickname", "content_type": 13}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "change_performance", "name": "Can change performance", "content_type": 17}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_production", "name": "Can change production", "content_type": 12}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "change_profile", "name": "Can change profile", "content_type": 15}}, {"pk": 68, "model": "auth.permission", "fields": {"codename": "change_profilegroup", "name": "Can change Person to Theatre Group Relation", "content_type": 23}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_profileproduction", "name": "Can change Peoples Role in Production", "content_type": 11}}, {"pk": 62, "model": "auth.permission", "fields": {"codename": "change_profileprofile", "name": "Can change Person to Person Relation", "content_type": 21}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "change_profiletranslation", "name": "Can change profile translation", "content_type": 14}}, {"pk": 77, "model": "auth.permission", "fields": {"codename": "change_randomquote", "name": "Can change random quote", "content_type": 26}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_script", "name": "Can change script", "content_type": 10}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_scripttranslation", "name": "Can change script translation", "content_type": 9}}, {"pk": 65, "model": "auth.permission", "fields": {"codename": "change_theatregroup", "name": "Can change theatre group", "content_type": 22}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "change_venue", "name": "Can change venue", "content_type": 16}}, {"pk": 54, "model": "auth.permission", "fields": {"codename": "delete_event", "name": "Can delete event", "content_type": 18}}, {"pk": 75, "model": "auth.permission", "fields": {"codename": "delete_file", "name": "Can delete file", "content_type": 25}}, {"pk": 72, "model": "auth.permission", "fields": {"codename": "delete_image", "name": "Can delete image", "content_type": 24}}, {"pk": 57, "model": "auth.permission", "fields": {"codename": "delete_language", "name": "Can delete language", "content_type": 19}}, {"pk": 81, "model": "auth.permission", "fields": {"codename": "delete_link", "name": "Can delete link", "content_type": 27}}, {"pk": 60, "model": "auth.permission", "fields": {"codename": "delete_location", "name": "Can delete location", "content_type": 20}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_nickname", "name": "Can delete nickname", "content_type": 13}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "delete_performance", "name": "Can delete performance", "content_type": 17}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_production", "name": "Can delete production", "content_type": 12}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "delete_profile", "name": "Can delete profile", "content_type": 15}}, {"pk": 69, "model": "auth.permission", "fields": {"codename": "delete_profilegroup", "name": "Can delete Person to Theatre Group Relation", "content_type": 23}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_profileproduction", "name": "Can delete Peoples Role in Production", "content_type": 11}}, {"pk": 63, "model": "auth.permission", "fields": {"codename": "delete_profileprofile", "name": "Can delete Person to Person Relation", "content_type": 21}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "delete_profiletranslation", "name": "Can delete profile translation", "content_type": 14}}, {"pk": 78, "model": "auth.permission", "fields": {"codename": "delete_randomquote", "name": "Can delete random quote", "content_type": 26}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_script", "name": "Can delete script", "content_type": 10}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_scripttranslation", "name": "Can delete script translation", "content_type": 9}}, {"pk": 66, "model": "auth.permission", "fields": {"codename": "delete_theatregroup", "name": "Can delete theatre group", "content_type": 22}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "delete_venue", "name": "Can delete venue", "content_type": 16}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 6}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 7}}, {"pk": 1, "model": "auth.user", "fields": {"username": "admin", "first_name": "", "last_name": "", "is_active": 1, "is_superuser": 1, "is_staff": 1, "last_login": "2009-10-25 11:16:45", "groups": [], "user_permissions": [], "password": "sha1$045e4$69bb2e103469e47a7e3cec5aa588eb0368ded2b2", "email": "user@user.com", "date_joined": "2009-10-25 11:16:27"}}, {"pk": 32, "model": "contenttypes.contenttype", "fields": {"model": "audio", "name": "audio", "app_label": "festival"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 35, "model": "contenttypes.contenttype", "fields": {"model": "document", "name": "document", "app_label": "festival"}}, {"pk": 18, "model": "contenttypes.contenttype", "fields": {"model": "event", "name": "event", "app_label": "itfcore"}}, {"pk": 25, "model": "contenttypes.contenttype", "fields": {"model": "file", "name": "file", "app_label": "itfcore"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 24, "model": "contenttypes.contenttype", "fields": {"model": "image", "name": "image", "app_label": "itfcore"}}, {"pk": 34, "model": "contenttypes.contenttype", "fields": {"model": "image", "name": "image", "app_label": "festival"}}, {"pk": 19, "model": "contenttypes.contenttype", "fields": {"model": "language", "name": "language", "app_label": "itfcore"}}, {"pk": 27, "model": "contenttypes.contenttype", "fields": {"model": "link", "name": "link", "app_label": "itfcore"}}, {"pk": 20, "model": "contenttypes.contenttype", "fields": {"model": "location", "name": "location", "app_label": "itfcore"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 28, "model": "contenttypes.contenttype", "fields": {"model": "meeting", "name": "meeting", "app_label": "festival"}}, {"pk": 31, "model": "contenttypes.contenttype", "fields": {"model": "meetingday", "name": "meeting day", "app_label": "festival"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "message", "name": "message", "app_label": "auth"}}, {"pk": 38, "model": "contenttypes.contenttype", "fields": {"model": "multilingualflatpage", "name": "multilingual flat page", "app_label": "flatpages"}}, {"pk": 37, "model": "contenttypes.contenttype", "fields": {"model": "multilingualflatpagetranslation", "name": "multilingual flat page translation", "app_label": "flatpages"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "nickname", "name": "nickname", "app_label": "itfcore"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "profileproduction", "name": "Peoples Role in Production", "app_label": "itfcore"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "performance", "name": "performance", "app_label": "itfcore"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 21, "model": "contenttypes.contenttype", "fields": {"model": "profileprofile", "name": "Person to Person Relation", "app_label": "itfcore"}}, {"pk": 23, "model": "contenttypes.contenttype", "fields": {"model": "profilegroup", "name": "Person to Theatre Group Relation", "app_label": "itfcore"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "production", "name": "production", "app_label": "itfcore"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "profile", "name": "profile", "app_label": "itfcore"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "profiletranslation", "name": "profile translation", "app_label": "itfcore"}}, {"pk": 36, "model": "contenttypes.contenttype", "fields": {"model": "project", "name": "project", "app_label": "festival"}}, {"pk": 26, "model": "contenttypes.contenttype", "fields": {"model": "randomquote", "name": "random quote", "app_label": "itfcore"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "script", "name": "script", "app_label": "itfcore"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "scripttranslation", "name": "script translation", "app_label": "itfcore"}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 30, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "festival"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 29, "model": "contenttypes.contenttype", "fields": {"model": "talk", "name": "talk", "app_label": "festival"}}, {"pk": 22, "model": "contenttypes.contenttype", "fields": {"model": "theatregroup", "name": "theatre group", "app_label": "itfcore"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "venue", "name": "venue", "app_label": "itfcore"}}, {"pk": 33, "model": "contenttypes.contenttype", "fields": {"model": "video", "name": "video", "app_label": "festival"}}, {"pk": "29131b0fa71c7b4b19de6fa9bc9ee28c", "model": "sessions.session", "fields": {"expire_date": "2009-11-08 11:16:45", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEEigEBdS42YmQxNTU2ZmRjYTMxOGZmZWVh\nNWE4MDQyNGNjMTgzZQ==\n"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 3, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2009-10-25 11:18:13", "object_repr": "today meeting", "object_id": "3", "change_message": "", "user": 1, "content_type": 28}}, {"pk": 2, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2009-10-25 11:17:58", "object_repr": "future meeting", "object_id": "2", "change_message": "", "user": 1, "content_type": 28}}, {"pk": 1, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2009-10-25 11:17:31", "object_repr": "old meeting", "object_id": "1", "change_message": "", "user": 1, "content_type": 28}}, {"pk": 1, "model": "festival.meeting", "fields": {"intro": "old meeting", "slug": "old-meeting", "title": "old meeting"}}, {"pk": 2, "model": "festival.meeting", "fields": {"intro": "future meeting", "slug": "future-meeting", "title": "future meeting"}}, {"pk": 3, "model": "festival.meeting", "fields": {"intro": "today meeting", "slug": "today-meeting", "title": "today meeting"}}, {"pk": 1, "model": "festival.meetingday", "fields": {"meeting": 1, "meeting_date": "2009-09-03"}}, {"pk": 2, "model": "festival.meetingday", "fields": {"meeting": 2, "meeting_date": "2009-10-26"}}, {"pk": 3, "model": "festival.meetingday", "fields": {"meeting": 3, "meeting_date": "2009-10-25"}}] diff --git a/itf/settings.py b/itf/settings.py index 23e1fbc..8dd978e 100755 --- a/itf/settings.py +++ b/itf/settings.py @@ -5,7 +5,7 @@ from os.path import join # import markdown SITENAME = "India Theatre Forum" -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG JSON_DEBUG = DEBUG @@ -69,7 +69,7 @@ TWITTER_ID = "sachin_rt" # 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', # 'LOCATION': '127.0.0.1:11211', # } -#} +#} CACHES = { 'default': { @@ -177,7 +177,7 @@ INSTALLED_APPS = ( 'festival', 'insidepages', # 'erang', - 'erang_organised', +# 'erang_organised', 'scriptbank', 'bestpractices', 'emailer', @@ -186,7 +186,7 @@ INSTALLED_APPS = ( 'tagging', 'app', 'padmavideos', - 'api', +# 'api', # 'boxes', 'frontpage', # 'solango', @@ -198,7 +198,7 @@ INSTALLED_APPS = ( 'crispy_forms', 'floppyforms', # 'south', - 'user', +# 'user', 'ckeditor', 'fccv', 'haystack', diff --git a/itf/sqldiff011111.sql b/itf/sqldiff011111.sql deleted file mode 100755 index 0bb39f8..0000000 --- a/itf/sqldiff011111.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `bestpractices_bestpractice` - ADD `display_image` varchar(100); - diff --git a/itf/static/js/jquery.pandoravideo.js b/itf/static/js/jquery.pandoravideo.js index 9ccc297..87f79fe 100644 --- a/itf/static/js/jquery.pandoravideo.js +++ b/itf/static/js/jquery.pandoravideo.js @@ -1,57 +1,68 @@ 'use strict'; +/* + jQuery plugin to embed video from a pan.do/ra instance + Usage: + html: +
+ js: + $('#video').pandoravideo(); + + Options can be passed as data- attributes in the html or in an options object - read code for docs +*/ + (function($) { $.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. var options = options || {}, namespace = options.namespace || "pandora", - $this = this; - - - var optionTypes = { - 'strings': ['api', 'base', 'resolution', 'action', 'id'], - 'integers': ['width', 'interval'], - 'floats': ['in', 'out'], - 'arrays': ['layers', 'keys'], - 'booleans': [] - //'functions': ['callback'] FIXME: lets not. - }; + + optionTypes = { + '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)); + + return this.each(function() { + + 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 = $('
').addClass("pandoraLoading").text("Loading video...").appendTo($this), + sendData = JSON.stringify({'id': id, 'keys': opts.keys}); - var 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); + //get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback + 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"); - //get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback - var id = opts.id, - $loading = $('
').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"); + deferred.error(function(data) { + alert("failed to load video data"); + }); }); }; - /* pandoraVideo class Parameters: diff --git a/itf/templates/404.html b/itf/templates/404.html index 297a073..53c4c6f 100755 --- a/itf/templates/404.html +++ b/itf/templates/404.html @@ -1,11 +1,11 @@ -{% extends 'festival_wireframe.html' %} +{% extends 'noel/base.html' %} {% block title %} Page Not Found {% endblock %} {% block extra_head %} - + {% endblock %} -{% block centerCol %} +{% block content %}
This is a website acting like it found the page you were looking for, but really didn't.

diff --git a/itf/templates/500.html b/itf/templates/500.html index 0d38533..32c4ef3 100755 --- a/itf/templates/500.html +++ b/itf/templates/500.html @@ -1,11 +1,11 @@ -{% extends 'festival_wireframe.html' %} +{% extends 'noel/base.html' %} {% block title %} Oops.. we made an error.. {% endblock %} {% block extra_head %} - + {% endblock %} -{% block centerCol %} +{% block content %}
Oops.. the website made a booboo.

Please contact admin@theatreforum.in if this error persists.

diff --git a/itf/templates/base.html b/itf/templates/base.html deleted file mode 100755 index c75d119..0000000 --- a/itf/templates/base.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - {% block head %} - {% endblock %} - - -
- {% block body %} - - {% endblock %} -
- - diff --git a/itf/templates/bestpractices.html b/itf/templates/bestpractices.html deleted file mode 100755 index 63b1478..0000000 --- a/itf/templates/bestpractices.html +++ /dev/null @@ -1,168 +0,0 @@ -{% extends 'festival_wireframe.html' %} - -{% block title %} -India Theatre Forum - Best Practices -{% endblock %} - -{% block extra_head %} - - -{% endblock %} - - {% block leftCol %} - - {% endblock %} - - -{% block centerCol %} -
-

Best Practices

-
- {% block bpTabs %} -
- -
-
- {% endblock %} - {% block bpContent %} -
-

- 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?’ -

- -

- 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 Deshpande’s discussion with Prabir Purkayastha on the idea of a script archive on the ITF website had led to Prabir’s talk on Creative Commons at the seminar. -

- - -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- The ITF organized a forum for playwrights, theatre practitioners and lawyers in Delhi in 2009. -

- -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- 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. -

- -

- For the ease of reading, the stories are abbreviated with parts of the conflict phrased as dialogue.
- Some of the intra-text is brought out through sketches. -

- -

- 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. -

- -

- 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? -

- -

- Pravin Chennai October 28, 2010 -

- -
-
- Download Booklet:

- {% for d in downloads %} - - {% endfor %} -
- {% endblock %} -
-
-{% endblock %} diff --git a/itf/templates/bestpractices/BestPractice/info.html b/itf/templates/bestpractices/BestPractice/info.html deleted file mode 100755 index cfc8f08..0000000 --- a/itf/templates/bestpractices/BestPractice/info.html +++ /dev/null @@ -1,14 +0,0 @@ -
- {{each stories}} - Story ${$index + 1}: {{html tmplToHtml($value.text) }} - -

- {{/each}} - Law: {{html tmplToHtml(law)}} - {{if law_image}} - - {{/if}} -

- Relevance to Theatre: {{html tmplToHtml(theatre)}}

- Quick Howto: {{html tmplToHtml(quick_howto)}}

-
diff --git a/itf/templates/bestpractices/BestPractice/preview.html b/itf/templates/bestpractices/BestPractice/preview.html deleted file mode 100755 index 9427bef..0000000 --- a/itf/templates/bestpractices/BestPractice/preview.html +++ /dev/null @@ -1,7 +0,0 @@ -
- ${title}

-
- {{each images}} {{/each}} -
- Story: {{html tmplTrunc(tmplToHtml(story), 512)}} -
diff --git a/itf/templates/bpdownload.html b/itf/templates/bpdownload.html deleted file mode 100755 index a2cbf60..0000000 --- a/itf/templates/bpdownload.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends 'bestpractices.html' %} - -{% block bpTabs %} -
- -
-
-{% endblock %} - -{% block bpContent %} - -{% endblock %} diff --git a/itf/templates/bpfaq.html b/itf/templates/bpfaq.html deleted file mode 100755 index f801557..0000000 --- a/itf/templates/bpfaq.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends 'bestpractices.html' %} - -{% block bpTabs %} -
- -
-
-{% endblock %} - -{% block bpContent %} - -
- {% for f in faqs %} -
-

{{ f.question }}

-

{{ f.answer }}

-
- - {% endfor %} -
-{% endblock %} diff --git a/itf/templates/bpglossary.html b/itf/templates/bpglossary.html deleted file mode 100755 index d75bfd2..0000000 --- a/itf/templates/bpglossary.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends 'bestpractices.html' %} - -{% block bpTabs %} -
- -
-
-{% endblock %} - -{% block bpContent %} -
- {% for t in terms %} -
-
- {{t.term}} -
-
- {{t.definition}} -
-
- - {% endfor %} -
-{% endblock %} diff --git a/itf/templates/bpguideline.html b/itf/templates/bpguideline.html deleted file mode 100755 index d9dc301..0000000 --- a/itf/templates/bpguideline.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load guidelines %} -
- {% autoescape off %} - {{ text|link_bps|linebreaksbr }} - {% endautoescape %} -
diff --git a/itf/templates/bpguidelines.html b/itf/templates/bpguidelines.html deleted file mode 100755 index 799e319..0000000 --- a/itf/templates/bpguidelines.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'bestpractices.html' %} - -{% block bpTabs %} -
- -
-
-{% endblock %} - -{% block bpContent %} -
- {% for g in guidelines %} - - {% endfor %} -
-{% endblock %} diff --git a/itf/templates/bpstories.html b/itf/templates/bpstories.html deleted file mode 100755 index 3fc14d6..0000000 --- a/itf/templates/bpstories.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'bestpractices.html' %} - -{% block bpTabs %} -
- -
-
-{% endblock %} - -{% block bpContent %} -
- {% for s in stories %} - - {% endfor %} -
-{% endblock %} diff --git a/itf/templates/bpstory.html b/itf/templates/bpstory.html deleted file mode 100755 index 143af9b..0000000 --- a/itf/templates/bpstory.html +++ /dev/null @@ -1,14 +0,0 @@ -
- {% for s in stories %} - Story {{forloop.counter}}: {{ s.text|linebreaksbr }} - -

- {% endfor %} - Law: {{ law|linebreaksbr }} - {% if law_image %} - - {% endif %} -

- Relevance to Theatre: {{ theatre|linebreaksbr }}

- Quick Howto: {{ quick_howto|linebreaksbr }}

-
diff --git a/itf/templates/erang.html b/itf/templates/erang.html deleted file mode 100755 index 104d96d..0000000 --- a/itf/templates/erang.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends 'festival_wireframe.html' %} -{% block title %} - India Theatre Forum - eRang -{% endblock %} - {% block leftCol %} -
    -
  • Home
  • -
  • Activities
    ITF Meetings - transcripts, audio, discussions.
  • -
  • Projects
    Projects undertaken by the ITF...
  • -
  • e-Rang
    The theatre newsletter...
  • -
  • Resources
    Downloadable reading materials and resources
  • -
  • Surveys
    Surveys about theatre in India...
  • -
  • Publications
    Publications by the ITF..
  • -
  • Participants
    A list of participants for all ITF meetings
  • - -
- {% endblock %} -
-
- {% block centerCol %} -
-

e-Rang

-
-
-

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.

- -

e-Rang will be sent out free to readers.

- -

Update: e-Rang sent out it's first issue on July 15th, 2010. You can subscribe and view current and past issues at http://theatreforum.in/erang/

-
-
- {% endblock %} - - diff --git a/itf/templates/erang/home.html b/itf/templates/erang/home.html deleted file mode 100755 index c888682..0000000 --- a/itf/templates/erang/home.html +++ /dev/null @@ -1,114 +0,0 @@ -{% extends 'base.html' %} - -{% block head %} -India Theatre Forum - {{ current_issue.title }} - - - - - - -{% endblock %} - -{% block body %} - -
- -
-

Past Issues:

-
- -
-
-
-
- -
- -{% load erangtags %} -
- {% autoescape off %} - {{ current_issue.html|absolutify_links }} - {% endautoescape %} -
- {% load comments %} -

Comments and Feedback

-
- {% get_comment_list for erang_organised.issue current_issue.id as comment_list %} - - {% ifnotequal comment_list|length 0 %} -
- - {% for comment in comment_list %} -
-
- {{ comment.user_name }}: -
-
- {{ comment.comment }} -
-
- {% endfor %} -
- {% endifnotequal %} - - - {% get_comment_form for current_issue as form %} - -
-

- Leave a Response: -

-
{% csrf_token %} - - - - - - - {{ form }} - - - - -
- -
-
-
-
-
-{% endblock %} diff --git a/itf/templates/erang_organised/Issue/info.html b/itf/templates/erang_organised/Issue/info.html deleted file mode 100755 index cfc8f08..0000000 --- a/itf/templates/erang_organised/Issue/info.html +++ /dev/null @@ -1,14 +0,0 @@ -
- {{each stories}} - Story ${$index + 1}: {{html tmplToHtml($value.text) }} - -

- {{/each}} - Law: {{html tmplToHtml(law)}} - {{if law_image}} - - {{/if}} -

- Relevance to Theatre: {{html tmplToHtml(theatre)}}

- Quick Howto: {{html tmplToHtml(quick_howto)}}

-
diff --git a/itf/templates/erang_organised/Issue/preview.html b/itf/templates/erang_organised/Issue/preview.html deleted file mode 100755 index d29dac2..0000000 --- a/itf/templates/erang_organised/Issue/preview.html +++ /dev/null @@ -1,5 +0,0 @@ -
- ${title}
- View on site

- Summary: >{{html tmplToHtml(summary) }} -
diff --git a/itf/templates/festival/Project/preview.html b/itf/templates/festival/Project/preview.html deleted file mode 100755 index 4569ea6..0000000 --- a/itf/templates/festival/Project/preview.html +++ /dev/null @@ -1,5 +0,0 @@ -
- ${title}

- View on site
- Intro: >{{html tmplToHtml(intro) }} -
diff --git a/itf/templates/festival_base.html b/itf/templates/festival_base.html deleted file mode 100755 index 6f64677..0000000 --- a/itf/templates/festival_base.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - {% block extra_head %} - {% endblock %} - - -
- -
-
- {% block leftCol %} -
    -
  • Home
  • -
  • Meetings
    ITF Meetings - transcripts, audio, discussions.
  • -
  • Projects
    Projects undertaken by the ITF...
  • -
  • eRang
    The theatre newsletter...
  • -
  • Participants
    A list of participants for all ITF meetings
  • -
  • Resources
    Downloadable reading materials and resources
  • -
- {% endblock %} -
-
- {% block centerCol %} -
-

Meetings

-
-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. -

-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. -

-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. -

-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. -

-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. -
-
- {% endblock %} -
-
- {% block rightCol %} -

About Us

-
-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. -
- {% endblock %} -
-
-
- - - diff --git a/itf/templates/festival_index.html b/itf/templates/festival_index.html deleted file mode 100755 index b2b97ab..0000000 --- a/itf/templates/festival_index.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - {% block extra_head %} - {% endblock %} - - -
- -
-
- {% block leftCol %} - - {% endblock %} -
-
- {% block centerCol %} -
-

Meetings

-
- -
-

Latest Meetings

- - -
- - - - -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. -

-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. -

- -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. -

-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. -

-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. -
-
- {% endblock %} -
-
- {% block rightCol %} -

About Us

-
-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. -
- {% endblock %} -
-
-
- - - diff --git a/itf/templates/festival_wireframe.html b/itf/templates/festival_wireframe.html deleted file mode 100755 index 7ebed48..0000000 --- a/itf/templates/festival_wireframe.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - {% block title %} India Theatre Forum {% endblock %} - - - - - - - - - - {% block extra_head %} - {% endblock %} - - -
- -
-
- {% block leftCol %} - - {% endblock %} -
-
- {% block centerCol %} -
-

Meetings

-
-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. -

-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. -

-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. -

-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. -

-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. -
-
- {% endblock %} -
-
- {% block rightCol %} -

About Us

-
- -
-

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.

- -

Theatre practice and livelihood in India is unsurprisingly like the country itself – vast, diverse, and often unconnected and unaware of each other’s 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 country’s social fabric. - more >>>

-
-
-

- 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. -

- -

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.

- -

-In addition to bringing out Our Stage, The ITF is currently working on: -

-
    - -
  • Guidelines for Best Practices in Theatre
  • -
  • a website for the theatre community in India
  • -
  • a social security scheme for artists
  • -
  • an arts management programme
  • -
  • a fortnightly e-newsletter
  • -
  • theatre survey
  • - -
-

Supported by the Arts Management of the Sir Ratan Tata Trust

- -
-
- {% endblock %} -
-
-
- - - diff --git a/itf/templates/home.html b/itf/templates/home.html deleted file mode 100755 index 709b188..0000000 --- a/itf/templates/home.html +++ /dev/null @@ -1,72 +0,0 @@ -{% extends 'festival_wireframe.html' %} - -{% block title %} -India Theatre Forum - Home -{% endblock %} - - {% block leftCol %} - - {% endblock %} -
-
- {% block centerCol %} -
-

Welcome to the ITF Website

-
- -

Welcome to the India Theatre Forum Website!

- -

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.

- - - -

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.

- - - -

Examples of some things you can get:

-
    -
  • a space of your own on the site
  • -
  • information on theatre activity, people and groups across India
  • -
  • a calendar of theatre activity across India
  • -
  • a fortnightly newsletter, emailed to your inbox
  • -
  • links between you and people you have worked with
  • -
  • 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
  • -
  • theatre-related information – schemes, grants, government reports, policies and more
  • -
  • Guidelines for Best Practices in Theatre
  • -
- - - -

Examples of some things you can give:

-
    -
  • information on yourself and your theatre activity
  • -
  • theatre-related information you have access to
  • -
  • offers of resources you or your group may have
  • -
- - - -

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.

- - - - - - - -
-
- {% endblock %} - - diff --git a/itf/templates/index.html b/itf/templates/index.html deleted file mode 100755 index 245c3ff..0000000 --- a/itf/templates/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - India Theatre Forum - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/itf/templates/meeting.html b/itf/templates/meeting.html deleted file mode 100755 index f71a3be..0000000 --- a/itf/templates/meeting.html +++ /dev/null @@ -1,313 +0,0 @@ -{% extends 'festival_wireframe.html' %} -{% block title %} -India Theatre Forum - {{data.meeting.title}} -{% endblock %} - -{% block extra_head %} - - - - - - - - - - - -{% endblock %} - - -{% block centerCol %} - -
-
-
    -
  • Synopsis
  • - {% ifnotequal data.sessions|length 0%} -
  • Talks
  • - {% endifnotequal %} - {% ifnotequal data.documents|length 0%} -
  • Pre-Reading
  • - {% endifnotequal %} - {% ifnotequal data.imagegallery|length 0 %} -
  • Gallery
  • - {% endifnotequal %} - {% ifnotequal data.participants|length 0 %} -
  • Participants
  • - {% endifnotequal %} -
  • Comments
  • -
-
-

{{data.meeting.title}}

-
- {{data.meeting.intro}} -
-
- {% ifnotequal data.sessions|length 0 %} -
-

Programme

-
- {% for s in data.sessions %} -
-
- {{ s.title|title }} -
-
-
- {{ s.intro|linebreaksbr }} -
- {% ifnotequal s.talks|length 0 %} -
    - {% for talk in s.talks %} -
  • - - {% for d in talk.documents %} - - - - - - {% endfor %} - {% for a in talk.audio %} - - - - - - {% endfor %} - {% for v in talk.video %} - - - - - - {% endfor %} - -    {{ talk.title }} by {{ talk.presenter }} -
  • - {% endfor %} -
- {% endifnotequal %} -
-
- {% endfor %} -
-
- {% endifnotequal %} - {% ifnotequal data.documents|length 0%} -
-

Reading Materials

-
- {% for d in data.documents %} -
- -
- {{ d.intro }} -
-
- {% endfor %} -
-
- {% endifnotequal %} - {% ifnotequal data.imagegallery|length 0 %} - - {% endifnotequal %} - {% ifnotequal data.participants|length 0 %} -
-

Participant List

-
- {% for p in data.participants %} -
- -
- {{ p.short_bio }} -
-
- {% endfor %} -
-
- {% endifnotequal %} -
-

Comments

-
- {% ifequal data.comments|length 0 %} - No comments yet.. Be the first! - {% else %} -
- {% for c in data.comments %} -
-
- posted by {{ c.name }} {{ c.epoch_date }}: -
-
- {{ c.comment }} -
-
- {% endfor %} -
- {% endifequal %} -
-

Add a Comment:

-
-
- {{comment_form.as_p}} - -
-

Please answer this question to prove you are human (sorry):

-

{{ captcha.question }}

-
- - - - - -
-
-
-
-
-
- -{% endblock %} diff --git a/itf/templates/meeting_details.html b/itf/templates/meeting_details.html deleted file mode 100755 index 25ec5c0..0000000 --- a/itf/templates/meeting_details.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends 'festival_base.html' %} - -{% block centerCol %} - -
-

Meeting Information

- -

- -Title: {{ data.meeting.title }}
-Intro: {{ data.meeting.intro }}
-Slug: {{ data.meeting.slug }}
- -{% for s in data.sessions %} -
{{s.title}}:
- {% if s.talks %} -
    - {% for t in s.talks %} -
  • {{ t.title }}
  • - {% if t.documents %} -
      - {% for d in t.documents %} -
    • {{ d.title }}
    • - {% endfor %} -
    - {% endif %} - {% if t.images %} -
      - {% for i in t.images %} -
    • {{ i.title }}
    • - {% endfor %} -
    - {% endif %} - {% endfor %} -
- {% endif %} -{% endfor %} - - -
-{% endblock %} diff --git a/itf/templates/meetings.html b/itf/templates/meetings.html deleted file mode 100755 index f3b7855..0000000 --- a/itf/templates/meetings.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends 'festival_wireframe.html' %} - -{% block title %} -India Theatre Forum - Activities -{% endblock %} - - {% block extra_head %} - - - {% endblock %} - - - {% block leftCol %} - - {% endblock %} - - {% block centerCol %} -
-

Activities

- - -
- - {% endblock %} - diff --git a/itf/templates/mockup.html b/itf/templates/mockup.html deleted file mode 100755 index 38a490b..0000000 --- a/itf/templates/mockup.html +++ /dev/null @@ -1,241 +0,0 @@ - - - India Theatre Forum - Home - - - - - - - - -
- -
-
-
- This is an important message from admin... -
-
- X -
-
- - -
-
-
- Calendar -
-
- Map -
-
- Newsfeed -
-
- Discussion -
-
- Multimedia -
-
- Resources -
-
- e-Rang -
-
- -
-
-
-
-
- -
-
-
- Loading... -
-
- Loading... -
-
- Loading... -
-
- Loading... -
-
- Loading... -
-
- Loading... -
-
- -
- -
-
-

India Theatre Forum:

-
    -
  • Documentation of Meetings
  • -
  • Government Reports
  • -
  • Theatre in the Press
  • -
  • Reviews
  • -
  • Audio / Video
  • -
-
-
- - - - - - - - - - - -
-
- - -
- Username:
- Password:
- -
-
- Sign up stuff goes here -
-
- Advanced search stuff goes here. -
- - - - diff --git a/itf/templates/noel/insidepage.html b/itf/templates/noel/insidepage.html index e69366a..a666fe1 100755 --- a/itf/templates/noel/insidepage.html +++ b/itf/templates/noel/insidepage.html @@ -211,25 +211,7 @@
Loading... -
diff --git a/itf/templates/people.html b/itf/templates/people.html deleted file mode 100755 index 96cad33..0000000 --- a/itf/templates/people.html +++ /dev/null @@ -1,49 +0,0 @@ -{% extends 'festival_wireframe.html' %} - {% block extra_head %} - - - - - {% endblock %} - - -{% block title %} - India Theatre Forum - People -{% endblock %} - - - {% block leftCol %} - - {% endblock %} - - {% block centerCol %} -
-

Meeting Participants

-
- {% for p in participants %} -
- -
{{p.short_bio}}
-
- {% endfor %} -
-
- - {% endblock %} diff --git a/itf/templates/project.html b/itf/templates/project.html deleted file mode 100755 index f9ec91e..0000000 --- a/itf/templates/project.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'festival_wireframe.html' %} -{% block title %} -India Theatre Forum - {{ project.title }} -{% endblock %} - -{% block centerCol %} -
-

{{project.title}}

-
- {{project.intro|linebreaksbr}} -
-
-{% endblock %} diff --git a/itf/templates/projects.html b/itf/templates/projects.html deleted file mode 100755 index 35ba029..0000000 --- a/itf/templates/projects.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends 'festival_wireframe.html' %} - -{% block title %} -India Theatre Forum - Projects -{% endblock %} - - {% block leftCol %} - - {% endblock %} - - -{% block centerCol %} -
-

Projects

-
- {% for p in projects %} -
- -
- {{ p.intro|truncatewords:'25' }} more >>> -
-
- {% endfor %} -
-
-{% endblock %} diff --git a/itf/templates/publications.html b/itf/templates/publications.html deleted file mode 100755 index f5bb882..0000000 --- a/itf/templates/publications.html +++ /dev/null @@ -1,76 +0,0 @@ -{% extends 'festival_wireframe.html' %} - -{% block title %} -India Theatre Forum - Publications -{% endblock %} - -{% block extra_head %} - - -{% endblock %} - {% block leftCol %} - - {% endblock %} - - {% block centerCol %} -
-

Publications

- -OUR STAGE: Pleasures and Perils of Theatre Practice in India
-Edited by: Sudhanva Deshpande, Akshara K.V., Sameera Iyengar -
-
- -

Monday 16th | 7 pm | Prithvi Theatre

- -

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.

-

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. -

- - -
- - -
- -

To buy the book online:

- -

http://www.leftword.com/bookdetails.php?BkId=269&type=PB

- -

-Details: -
-Our Stage: Pleasures and Perils of Theatre Practice in India
-Edited by: Sudhanva Deshpande, Akshara K. V. and Sameera Iyengar
-ISBN: 978-81-89487-61-4
-Paperback
-Tulika, 2009, Rs 350
-Distributed by IPD Alternatives

- -Using these details, you can also ask your local bookshops to order the book. - -

- -
-
- {% endblock %} - diff --git a/itf/templates/resources.html b/itf/templates/resources.html deleted file mode 100755 index 3b2c99f..0000000 --- a/itf/templates/resources.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends 'festival_wireframe.html' %} -{% block title %} - India Theatre Forum - Resources -{% endblock %} - {% block extra_head %} - - - - {% endblock %} - - {% block leftCol %} - - {% endblock %} - - -{% block centerCol %} -
-

Resources

-
- {% for r in resources %} -
- -
- {% autoescape off %} - {{ r.intro }} - {% endautoescape %} -
- {% if r.file %} - Download Full Text - {% endif %} -
-
- {% endfor %} -
-
-{% endblock %} - diff --git a/itf/templates/surveys.html b/itf/templates/surveys.html deleted file mode 100755 index ee37d5f..0000000 --- a/itf/templates/surveys.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends 'festival_wireframe.html' %} -{% block title %} - India Theatre Forum - Surveys -{% endblock %} - {% block leftCol %} - - {% endblock %} - - - {% block centerCol %} -
-

Surveys

-
-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. -

- 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. -

-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) -

-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. -

-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! - -
-
- {% endblock %} - - diff --git a/itf/templates/video.html b/itf/templates/video.html deleted file mode 100755 index d746160..0000000 --- a/itf/templates/video.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - -
You will need Flash 9 to be able to view the videos.
-
Download Video
(Right click and select "Save As...")
- - - - diff --git a/itf/templates/x0disc.html b/itf/templates/x0disc.html deleted file mode 100755 index e2fe11b..0000000 --- a/itf/templates/x0disc.html +++ /dev/null @@ -1,2609 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - Thread (457 Threads) - RatingReplies - - Last Message -

- - - - - - -
- - - - Tag-Soup- versus XML-Parser - - by - Ernst Beiglböck-2 -
-
- - - 1 - - - - - - -
- - - - - - -by Boris Zbarsky -
-

- - - - - - -
- - - - - Typing in integrated iframe not possible. - by - nl2.2 -
-
- - - - 0 - - - - - - -
- - - - - - - -by nl2.2 -
- -

- - - - - - -
- - - - - - User Agent stylesheets - by - johnjbarton -
-
- - - 3 - - - - - - - -
- - - - - - -by johnjbarton - -
-

- - - - - - -
- - - - - - how to time animation when interrupting transitions in progress? - by - L. David Baron -
-
- - 1 - - - - - - - -
- - - - - - - -by Robert O'Callahan-3 -
-

- - - - - -
- - - - - - Re: CSS sprite: -moz-image-with-region(foo, 10, 10, 10, 10) or foo#xywh=10, 10, 10, 10 ? - by - - fantasai -
-
- - - 10 - - - - - - -
- - - - - - - -by Robert O'Callahan-3 -
-

- - - - - - -
- - - - - transitions and separating style changes - - by - L. David Baron -
-
- - - - 1 - - - - - - -
- - - - - - - -by Robert O'Callahan-3 -
-

- - - - - - -
- - - - - CSS sprite: -moz-image-with-region(foo,10,10,10,10) or foo#xywh=10,10,10,10 ? - by - Ryo Kawaguchi -
-
- - - 0 - - - - - - -
- - - - - - - -by Ryo Kawaguchi -
- -

- - - - - - -
- - - - Some useful CSS testing tasks - by - L. David Baron -
-
- - - 0 - - - - - - - -
- - - - - - -by L. David Baron - -
-

- - - - - - -
- - - - - - Table internal frames and whitespace - by - Boris Zbarsky -
-
- - - 14 - - - - - - - -
- - - - - - - -by Boris Zbarsky -
-

- - - - - -
- - - - - - Tangled up! - by - - Emanuele D'Arrigo -
-
- - - 7 - - - - - - -
- - - - - - - -by Boris Zbarsky -
-

- - - - - - -
- - - - - Canvas in front of HTML content - - by - Mike Ratcliffe -
-
- - - - 14 - - - - - - -
- - - - - - - -by Mike Ratcliffe -
-

- - - - - - -
- - - - - Vertical table margins do not collapse with adjacent margins - by - Stanimir Stamenkov-3 -
-
- - - - 1 - - - - - - -
- - - - - - - -by Stanimir Stamenkov-3 -
- -

- - - - - - -
- - - - - - -moz-image-region for background-image - by - CyberSliver -
-
- - - 1 - - - - - - - -
- - - - - - -by L. David Baron - -
-

- - - - - - -
- - - - - - Problem in extracting images of generated PDF - by - Gecko Embedding -
-
- - - 2 - - - - - - - -
- - - - - - - -by Gecko Embedding -
-

- - - - - -
- - - - - - Extracting images from PDF Generated from Firefox3 - by - - Gecko Embedding -
-
- - - 0 - - - - - - -
- - - - - - - -by Gecko Embedding -
-

- - - - - - -
- - - - - Where does resizing of windows start? - - by - Taraman -
-
- - - - 1 - - - - - - -
- - - - - - - -by Boris Zbarsky -
-

- - - - - - -
- - - - - NEED MONEY FAST READ THIS ARTICLE 38355 - by - Jose L. Sagado -
-
- - - - 0 - - - - - - -
- - - - - - - -by Jose L. Sagado -
- -

- - - - - - -
- - - - - - autocad electrical 2010 autodesk full download crack torrent rapidshare 00442872 - by - autodesk autocad ele... -
-
- - - 0 - - - - - - - -
- - - - - - -by autodesk autocad ele... - -
-

- - - - - - -
- - - - - - 0.8252925 Look Inside Now For It ... 0.9895576 - by - iwantsex-73 -
-
- - - 0 - - - - - - - -
- - - - - - - -by iwantsex-73 -
-

- - - - - -
- - - - - - when is clientHeight set? - by - - johnjbarton -
-
- - - 3 - - - - - - -
- - - - - - - -by johnjbarton -
-

- - - - - - -
- - - - - 0.2922279 I Have To See This ...0.2601839 - - by - iwantsex-50 -
-
- - - - 0 - - - - - - -
- - - - - - - -by iwantsex-50 -
-

- - - - - - -
- - - - - 0.6526391 Feel Curious Now? ... 0.9623977 - by - iwantsex-26 -
-
- - - - 0 - - - - - - -
- - - - - - - -by iwantsex-26 -
- -

- - - - - - -
- - - - - - Re: nsIFrame and nsIPresContext are internal in firefox3, how to achieve the same functionality of these 2 interfaces - by - Boris Zbarsky -
-
- - - 0 - - - - - - - -
- - - - - - -by Boris Zbarsky - -
-

- - - - - - -
- - - - - - Optimizing pseudo-style probing - by - Boris Zbarsky -
-
- - - 3 - - - - - - - -
- - - - - - - -by L. David Baron -
-

- - - - - -
- - - - - - HTML 5 Database Support - by - - ChromoX -
-
- - - 1 - - - - - - -
- - - - - - - -by Boris Zbarsky -
-

- - - - - - -
- - - - - How to simulate mouse click on a frame? - - by - harvinder singh-6 -
-
- - - - 2 - - - - - - -
- - - - - - - -by Robert O'Callahan-3 -
-

- - - - - - -
- - - - - Port of XUL to EMC's Unix - by - Takis Psarogiannakop... -
-
- - - - 5 - - - - - - -
- - - - - - - -by Takis Psarogiannakop... -
- -

- - - - - - -
- - - - - - Frame construction plans - by - Boris Zbarsky -
-
- - - 7 - - - - - - - -
- - - - - - -by Robert O'Callahan-3 - -
-

- - - - - - -
- - - - - - save as pdf - font rendering - by - saravanan.sengamalan -
-
- - - 1 - - - - - - - -
- - - - - - - -by fantasai -
-

- - - - - -
- - - - - - Re: Gecko & HTML to PDF conversion - by - - fantasai -
-
- - - 0 - - - - - - -
- - - - - - - -by fantasai -
-

- - - - - - -
- - - - - Is Israel a Democracy? -- The problem with intellectually insecure whites -- Should Christians Support Israeli Terrorism in Gaza? - - by - Dan Mosedale -
-
- - - - 0 - - - - - - -
- - - - - - - -by Dan Mosedale -
-

- - - - - - -
- - - - - Re: Compositing and Transformations - by - Robert O'Callahan-2 -
-
- - - - 0 - - - - - - -
- - - - - - - -by Robert O'Callahan-2 -
- -

- - - - - - -
- - - - - - :after and :before on input elements - by - dotnetCarpenter -
-
- - - 2 - - - - - - - -
- - - - - - -by dotnetCarpenter - -
-

- - - - - - -
- - - - - - Load and register stylesheet dynamically (nsIStyleSheetService) - by - PM-17 -
-
- - - 17 - - - - - - - -
- - - - - - - -by PM-17 -
-

- - - - - -
- - - - - - Sub-pixel gap on Mozilla.org header tabs - by - - Stanimir Stamenkov-3 -
-
- - - 2 - - - - - - -
- - - - - - - -by Stanimir Stamenkov-3 -
-
- - - - - - - -
-
- -Post to Mozilla - Layout -Post New Message - - ::  -Alert me of new posts - - - - - - ::  -Atom feed for Mozilla - Layout - -
-
- - - -« Newest  -‹ Newer  - -—  Threads 1-35  — - - - Older › - - - -
-
- - - - - - - - - - - - diff --git a/itf/templates/x0erang.html b/itf/templates/x0erang.html deleted file mode 100755 index bca36af..0000000 --- a/itf/templates/x0erang.html +++ /dev/null @@ -1,58 +0,0 @@ - -
- - -
-

E-Rang

- -

- E-rang is our weekly newsletter. Subscribe. -

-
- -
-

Issues

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Issue No.NameDate
1E-rang August1-Aug-2009
2E-rang September1-Aug-2009
3E-rang October1-Aug-2009
4E-rang November1-Aug-2009
5E-rang December1-Aug-2009
- -
- - -
- diff --git a/itf/templates/x0multi.html b/itf/templates/x0multi.html deleted file mode 100755 index 6450886..0000000 --- a/itf/templates/x0multi.html +++ /dev/null @@ -1,84 +0,0 @@ - -
- - -
-

Categories

- -

- -

    -
  • Comedy
  • -
  • Drama
  • -
  • Political
  • -
  • Musical
  • -
  • Fantasy
  • -
- -

- - -
- -
-

Videos

-

- -

    -
  • -
  • -
  • -
  • -
  • -
- -

- - See more Videos -
- -
-

Images

- -

- -

    -
  • -
  • -
  • -
  • -
  • -
- -

- - See more Images -
- -
-

Audio

- -

- -

    -
  • -
  • -
  • -
  • -
  • -
- -

- - - See more Audio -
- -
-
-
-
-
- -
- diff --git a/itf/templates/x0news.html b/itf/templates/x0news.html deleted file mode 100755 index 74a3195..0000000 --- a/itf/templates/x0news.html +++ /dev/null @@ -1,84 +0,0 @@ - -
-
-
- Lorem Ipsum -
-
- -
-
- 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. -
- Read More... -
-
-
- -
-
- 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. -
- Read More... -
-
-
-
- - -
- 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. -
- Read More... -
-
-
- -
- -
- 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. -
- Read More... -
-
-
-
- -
-
diff --git a/itf/templates/x0profile.html b/itf/templates/x0profile.html deleted file mode 100755 index 34a9dae..0000000 --- a/itf/templates/x0profile.html +++ /dev/null @@ -1,57 +0,0 @@ - -
- - -
-

amar_singh's Profile

- -

- - - - - - - -
- - -
-

Amar Singh

-

Occupation(s): Director, Producer

-

Location(s): Mumbai, Goa, Delhi

-

-

Groups:

- - -

Latest Posts:

- - -

Uploads:

- - - -
-
- - - -

- -
- - -
- diff --git a/itf/templates/x0resources.html b/itf/templates/x0resources.html deleted file mode 100755 index 327a668..0000000 --- a/itf/templates/x0resources.html +++ /dev/null @@ -1,94 +0,0 @@ - -
- - -
-

Categories

- -

- -

    -
  • Scripts
  • -
  • Funding
  • -
  • Training
  • -
  • Tributes
  • -
- -

- - -
- -
-

Resources

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionCategoriesType
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
Hamlet - Full ScriptFull text of Hamlet the famous Shakespearean play.Shakespere, Hamlet, DramaPDF Document
- -
- - -
- diff --git a/itf/urls.py b/itf/urls.py index 46c3e7a..720b79d 100755 --- a/itf/urls.py +++ b/itf/urls.py @@ -18,29 +18,29 @@ urlpatterns = patterns('', # (r'^bhangar/', include('bhangar.foo.urls')), #(r'^search/', include('solango.urls')), (r'^$', "frontpage.views.index"), - (r'^t/$', "frontpage.views.index"), +# (r'^t/$', "frontpage.views.index"), (r'm/', include('insidepages.urls')), (r'^page/(?P[a-zA-Z].*?)/', 'pages.views.render_page'), (r'^contact/$', 'frontpage.views.contact'), (r'^emailer/issue/(?P\d+)/$', 'emailer.views.show_emailer'), # ('m/(?P.*)', 'insidepages.views.main'), (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'^erang/', include('erang_organised.urls')), - (r'api/', 'api.views.api'), - (r'jsdoc/', 'api.views.jsdoc'), - (r'site.json', 'app.views.site_json'), +# (r'^erang/', include('erang_organised.urls')), +# (r'api/', 'api.views.api'), +# (r'jsdoc/', 'api.views.jsdoc'), +# (r'site.json', 'app.views.site_json'), (r'^itf/', include('festival.urls')), # (r'^accounts/register/', 'registration.views.register', {'form_class': ItfRegistrationForm }), (r'^accounts/', include('registration.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' # to INSTALLED_APPS to enable admin documentation: #Core views: (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'^search/', include('haystack.urls')), (r'^markitup/', include('markitup.urls')), @@ -51,7 +51,7 @@ urlpatterns = patterns('', # (r'^ajax_filtered_fields/', include('ajax_filtered_fields.urls')), # Uncomment the next line to enable the admin: - (r'^test$', 'app.views.index'), +# (r'^test$', 'app.views.index'), # (r'^$', 'festival.views.home') ) diff --git a/itf/user/__init__.py b/itf/user/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/itf/user/models.py b/itf/user/models.py deleted file mode 100755 index 899f182..0000000 --- a/itf/user/models.py +++ /dev/null @@ -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 diff --git a/itf/user/templates/contact_email.txt b/itf/user/templates/contact_email.txt deleted file mode 100755 index 43243d0..0000000 --- a/itf/user/templates/contact_email.txt +++ /dev/null @@ -1,4 +0,0 @@ -Hi {{sitename}} admin, - -someone sent you a message: -{{message}} diff --git a/itf/user/templates/password_reset_email.txt b/itf/user/templates/password_reset_email.txt deleted file mode 100755 index 84d11c6..0000000 --- a/itf/user/templates/password_reset_email.txt +++ /dev/null @@ -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}} diff --git a/itf/user/tests.py b/itf/user/tests.py deleted file mode 100755 index 2247054..0000000 --- a/itf/user/tests.py +++ /dev/null @@ -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 -"""} - diff --git a/itf/user/urls.py b/itf/user/urls.py deleted file mode 100755 index 5866193..0000000 --- a/itf/user/urls.py +++ /dev/null @@ -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'), -) - diff --git a/itf/user/views.py b/itf/user/views.py deleted file mode 100755 index 5eb8430..0000000 --- a/itf/user/views.py +++ /dev/null @@ -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) -