From 0ef53bf6dd5ec4a5c9a74405d8766e6e139402f4 Mon Sep 17 00:00:00 2001 From: sanj Date: Wed, 3 Mar 2010 19:58:00 +0530 Subject: [PATCH] added stuff to tree --- itf/.bzrignore | 2 + itf/README.txt | 64 + itf/TODO | 1 + itf/__init__.py | 0 itf/aldensNotes.txt | 97 + itf/dropandcreatedb.py | 20 + itf/erang/__init__.py | 0 itf/erang/models.py | 22 + itf/erang/tests.py | 23 + itf/erang/views.py | 1 + itf/festival/__init__.py | 0 itf/festival/admin.py | 83 + itf/festival/forms.py | 11 + itf/festival/models.py | 132 + itf/festival/tests.py | 23 + itf/festival/utils.py | 8 + itf/festival/views.py | 178 ++ itf/itfcore/__init__.py | 0 itf/itfcore/admin.py | 67 + itf/itfcore/fields.py | 58 + itf/itfcore/models.py | 253 ++ itf/itfcore/views.py | 49 + itf/manage.py | 11 + itf/meetingdata.json | 1 + itf/monitor.py | 113 + itf/settings.py | 125 + itf/static/css/colorbox.css | 63 + itf/static/css/error_pages.css | 10 + itf/static/css/festival.css | 113 + itf/static/css/festival_index.css | 54 + itf/static/css/fullcalendar.css | 184 ++ itf/static/css/index.css | 419 +++ itf/static/css/jScrollPane.css | 65 + itf/static/css/jcarousel.css | 49 + itf/static/css/jcarouselskin.css | 50 + itf/static/css/jquery-ui-1.7.2.custom.css | 406 +++ itf/static/css/jquery.tooltip.css | 9 + itf/static/css/meeting.css | 104 + itf/static/css/people.css | 28 + itf/static/css/thickbox.css | 163 + itf/static/css/wireframe.css | 200 ++ itf/static/images/150x150.jpg | Bin 0 -> 9916 bytes itf/static/images/50x50.jpg | Bin 0 -> 1821 bytes itf/static/images/Audio.jpg | Bin 0 -> 1465 bytes itf/static/images/Lowbg_bak.jpg | Bin 0 -> 14051 bytes itf/static/images/PDFIcon.jpg | Bin 0 -> 1322 bytes itf/static/images/VideoIcon.jpg | Bin 0 -> 1476 bytes itf/static/images/audio.gif | Bin 0 -> 1135 bytes itf/static/images/bg1.jpg | Bin 0 -> 62890 bytes itf/static/images/book.jpg | Bin 0 -> 27111 bytes itf/static/images/border.png | Bin 0 -> 112 bytes itf/static/images/controls.png | Bin 0 -> 1249 bytes itf/static/images/document.gif | Bin 0 -> 1146 bytes itf/static/images/favicon.ico | Bin 0 -> 1406 bytes itf/static/images/image.gif | Bin 0 -> 1182 bytes .../internet_explorer/borderBottomCenter.png | Bin 0 -> 111 bytes .../internet_explorer/borderBottomLeft.png | Bin 0 -> 215 bytes .../internet_explorer/borderBottomRight.png | Bin 0 -> 217 bytes .../internet_explorer/borderMiddleLeft.png | Bin 0 -> 108 bytes .../internet_explorer/borderMiddleRight.png | Bin 0 -> 108 bytes .../internet_explorer/borderTopCenter.png | Bin 0 -> 111 bytes .../internet_explorer/borderTopLeft.png | Bin 0 -> 216 bytes .../internet_explorer/borderTopRight.png | Bin 0 -> 214 bytes itf/static/images/large_audio.gif | Bin 0 -> 15749 bytes itf/static/images/loading.gif | Bin 0 -> 9427 bytes itf/static/images/loadingAnimation.gif | Bin 0 -> 5886 bytes itf/static/images/loading_background.png | Bin 0 -> 157 bytes itf/static/images/overlay.png | Bin 0 -> 145 bytes itf/static/images/player.swf | Bin 0 -> 50038 bytes itf/static/images/playvid.jpg | Bin 0 -> 38891 bytes itf/static/images/playvid100.jpg | Bin 0 -> 4661 bytes itf/static/images/profileimage.jpg | Bin 0 -> 8143 bytes itf/static/images/theatre.jpg | Bin 0 -> 3134 bytes itf/static/images/video-mini.gif | Bin 0 -> 384 bytes itf/static/js/festival.js | 73 + itf/static/js/fullcalendar.js | 1238 ++++++++ itf/static/js/fullcalendar.min.js | 16 + itf/static/js/jScrollPane-1.2.3.min.js | 1 + itf/static/js/jcarousel.js | 16 + itf/static/js/jquery-1.3.2.min.js | 19 + itf/static/js/jquery-ui-1.7.2.custom.min.js | 34 + itf/static/js/jquery.colorbox-min.js | 2 + itf/static/js/jquery.mousewheel.js | 60 + itf/static/js/jquery.tooltip.js | 294 ++ itf/static/js/jquery.transliterate.js | 26 + itf/static/js/mockup.js | 256 ++ itf/static/js/mytrans.js | 54 + itf/static/js/people.js | 12 + itf/static/js/pretty.js | 36 + itf/static/js/swfobject.js | 8 + itf/static/js/thickbox.js | 10 + itf/templates/404.html | 16 + itf/templates/500.html | 14 + itf/templates/admin/base_site.html | 10 + itf/templates/erang.html | 32 + itf/templates/festival_base.html | 71 + itf/templates/festival_index.html | 86 + itf/templates/festival_wireframe.html | 100 + itf/templates/home.html | 71 + itf/templates/index.html | 1 + itf/templates/meeting.html | 308 ++ itf/templates/meeting_details.html | 41 + itf/templates/meetings.html | 47 + itf/templates/mockup.html | 241 ++ itf/templates/people.html | 48 + itf/templates/project.html | 13 + itf/templates/projects.html | 38 + itf/templates/publications.html | 75 + itf/templates/registration/logged_out.html | 12 + .../registration/password_change_done.html | 14 + .../registration/password_change_form.html | 26 + .../registration/password_reset_complete.html | 16 + .../registration/password_reset_confirm.html | 32 + .../registration/password_reset_done.html | 14 + .../registration/password_reset_email.html | 15 + .../registration/password_reset_form.html | 19 + itf/templates/resources.html | 39 + itf/templates/surveys.html | 38 + 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 | 58 + itf/wsgi/django.wsgi | 20 + requirements.txt | 2 + 128 files changed, 9961 insertions(+) create mode 100644 itf/.bzrignore create mode 100644 itf/README.txt create mode 100644 itf/TODO create mode 100755 itf/__init__.py create mode 100644 itf/aldensNotes.txt create mode 100755 itf/dropandcreatedb.py create mode 100644 itf/erang/__init__.py create mode 100644 itf/erang/models.py create mode 100644 itf/erang/tests.py create mode 100644 itf/erang/views.py create mode 100644 itf/festival/__init__.py create mode 100755 itf/festival/admin.py create mode 100644 itf/festival/forms.py create mode 100644 itf/festival/models.py create mode 100644 itf/festival/tests.py create mode 100644 itf/festival/utils.py create mode 100644 itf/festival/views.py create mode 100755 itf/itfcore/__init__.py create mode 100755 itf/itfcore/admin.py create mode 100755 itf/itfcore/fields.py create mode 100644 itf/itfcore/models.py create mode 100644 itf/itfcore/views.py create mode 100755 itf/manage.py create mode 100644 itf/meetingdata.json create mode 100755 itf/monitor.py create mode 100644 itf/settings.py create mode 100644 itf/static/css/colorbox.css create mode 100644 itf/static/css/error_pages.css create mode 100644 itf/static/css/festival.css create mode 100644 itf/static/css/festival_index.css create mode 100644 itf/static/css/fullcalendar.css create mode 100644 itf/static/css/index.css create mode 100644 itf/static/css/jScrollPane.css create mode 100644 itf/static/css/jcarousel.css create mode 100644 itf/static/css/jcarouselskin.css create mode 100644 itf/static/css/jquery-ui-1.7.2.custom.css create mode 100644 itf/static/css/jquery.tooltip.css create mode 100644 itf/static/css/meeting.css create mode 100644 itf/static/css/people.css create mode 100644 itf/static/css/thickbox.css create mode 100644 itf/static/css/wireframe.css create mode 100644 itf/static/images/150x150.jpg create mode 100644 itf/static/images/50x50.jpg create mode 100644 itf/static/images/Audio.jpg create mode 100644 itf/static/images/Lowbg_bak.jpg create mode 100644 itf/static/images/PDFIcon.jpg create mode 100644 itf/static/images/VideoIcon.jpg create mode 100644 itf/static/images/audio.gif create mode 100644 itf/static/images/bg1.jpg create mode 100644 itf/static/images/book.jpg create mode 100644 itf/static/images/border.png create mode 100644 itf/static/images/controls.png create mode 100644 itf/static/images/document.gif create mode 100644 itf/static/images/favicon.ico create mode 100644 itf/static/images/image.gif create mode 100644 itf/static/images/internet_explorer/borderBottomCenter.png create mode 100644 itf/static/images/internet_explorer/borderBottomLeft.png create mode 100644 itf/static/images/internet_explorer/borderBottomRight.png create mode 100644 itf/static/images/internet_explorer/borderMiddleLeft.png create mode 100644 itf/static/images/internet_explorer/borderMiddleRight.png create mode 100644 itf/static/images/internet_explorer/borderTopCenter.png create mode 100644 itf/static/images/internet_explorer/borderTopLeft.png create mode 100644 itf/static/images/internet_explorer/borderTopRight.png create mode 100644 itf/static/images/large_audio.gif create mode 100644 itf/static/images/loading.gif create mode 100644 itf/static/images/loadingAnimation.gif create mode 100644 itf/static/images/loading_background.png create mode 100644 itf/static/images/overlay.png create mode 100644 itf/static/images/player.swf create mode 100644 itf/static/images/playvid.jpg create mode 100644 itf/static/images/playvid100.jpg create mode 100644 itf/static/images/profileimage.jpg create mode 100644 itf/static/images/theatre.jpg create mode 100644 itf/static/images/video-mini.gif create mode 100644 itf/static/js/festival.js create mode 100644 itf/static/js/fullcalendar.js create mode 100644 itf/static/js/fullcalendar.min.js create mode 100644 itf/static/js/jScrollPane-1.2.3.min.js create mode 100644 itf/static/js/jcarousel.js create mode 100755 itf/static/js/jquery-1.3.2.min.js create mode 100644 itf/static/js/jquery-ui-1.7.2.custom.min.js create mode 100644 itf/static/js/jquery.colorbox-min.js create mode 100755 itf/static/js/jquery.mousewheel.js create mode 100644 itf/static/js/jquery.tooltip.js create mode 100644 itf/static/js/jquery.transliterate.js create mode 100644 itf/static/js/mockup.js create mode 100644 itf/static/js/mytrans.js create mode 100644 itf/static/js/people.js create mode 100644 itf/static/js/pretty.js create mode 100644 itf/static/js/swfobject.js create mode 100644 itf/static/js/thickbox.js create mode 100644 itf/templates/404.html create mode 100644 itf/templates/500.html create mode 100644 itf/templates/admin/base_site.html create mode 100644 itf/templates/erang.html create mode 100644 itf/templates/festival_base.html create mode 100644 itf/templates/festival_index.html create mode 100644 itf/templates/festival_wireframe.html create mode 100644 itf/templates/home.html create mode 100755 itf/templates/index.html create mode 100644 itf/templates/meeting.html create mode 100644 itf/templates/meeting_details.html create mode 100644 itf/templates/meetings.html create mode 100644 itf/templates/mockup.html create mode 100644 itf/templates/people.html create mode 100644 itf/templates/project.html create mode 100644 itf/templates/projects.html create mode 100644 itf/templates/publications.html create mode 100755 itf/templates/registration/logged_out.html create mode 100755 itf/templates/registration/password_change_done.html create mode 100755 itf/templates/registration/password_change_form.html create mode 100755 itf/templates/registration/password_reset_complete.html create mode 100755 itf/templates/registration/password_reset_confirm.html create mode 100755 itf/templates/registration/password_reset_done.html create mode 100755 itf/templates/registration/password_reset_email.html create mode 100755 itf/templates/registration/password_reset_form.html create mode 100644 itf/templates/resources.html create mode 100644 itf/templates/surveys.html create mode 100644 itf/templates/video.html create mode 100644 itf/templates/x0disc.html create mode 100644 itf/templates/x0erang.html create mode 100644 itf/templates/x0multi.html create mode 100644 itf/templates/x0news.html create mode 100644 itf/templates/x0profile.html create mode 100644 itf/templates/x0resources.html create mode 100644 itf/urls.py create mode 100755 itf/wsgi/django.wsgi diff --git a/itf/.bzrignore b/itf/.bzrignore new file mode 100644 index 0000000..fb38d95 --- /dev/null +++ b/itf/.bzrignore @@ -0,0 +1,2 @@ +settings.py +.bzrlog diff --git a/itf/README.txt b/itf/README.txt new file mode 100644 index 0000000..bbf0238 --- /dev/null +++ b/itf/README.txt @@ -0,0 +1,64 @@ +db name = 'theatre' - change if different. + +Install Solango: + svn checkout http://django-solr-search.googlecode.com/svn/trunk/ django-solr-search + cd django-solr-search + sudo python setup.py install + + You will also need to install Solr, follow instructions here: + http://www.screeley.com/djangosolr/install.html#install + +Install Django-Multilingual: + svn checkout http://django-multilingual.googlecode.com/svn/trunk/ django-multilingual + cd django-multilingual + sudo python setup.py install + +Install Djangologging for debugging (svn checkout http://django-logging.googlecode.com/svn/trunk/ django-logging-read-only): + svn checkout http://django-logging.googlecode.com/svn/trunk/ django-logging-read-only djangologging + sudo mv djangologging/ /var/lib/python-support/python2.6/ + +For Django-Extensions and Graphing Tool: + sudo apt-get install graphviz graphviz-dev + sudo easy_install pygraphviz + Download and install django_extensions: http://code.google.com/p/django-command-extensions/downloads/list + Add django_extensions to your INSTALLED_APPS in settings.py + Command to generate PNG visualization of your models: ./manage.py graph_models -a -g -o my_project_visualized.png + + + + + mysqld --verbose --help | grep character-set + +You’ll probably see: + +character-set-server latin1 + +You want this to be uft8. To modify it, edit your my.conf file ( /etc/mysql/my.conf on ubuntu ), adding the following lines to the appropriate sections: + +[client] +… +default-character-set = utf8 + +[mysqld] +… +character-set-server=utf8 +collation-server=utf8_unicode_ci +init_connect=’set collation_connection = utf8_unicode_ci;’ + +Now restart mysql: + + +sudo /etc/init.d/mysql restart + +And alter your existing tables to use the utf8 encoding: + + +mysql your_db_name + +alter table your_table_name convert to character set utf8; + +And that should do it. + + + + diff --git a/itf/TODO b/itf/TODO new file mode 100644 index 0000000..aeee6cb --- /dev/null +++ b/itf/TODO @@ -0,0 +1 @@ +To do: diff --git a/itf/__init__.py b/itf/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/itf/aldensNotes.txt b/itf/aldensNotes.txt new file mode 100644 index 0000000..c21b30b --- /dev/null +++ b/itf/aldensNotes.txt @@ -0,0 +1,97 @@ +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/dropandcreatedb.py b/itf/dropandcreatedb.py new file mode 100755 index 0000000..94127e4 --- /dev/null +++ b/itf/dropandcreatedb.py @@ -0,0 +1,20 @@ +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 new file mode 100644 index 0000000..e69de29 diff --git a/itf/erang/models.py b/itf/erang/models.py new file mode 100644 index 0000000..b9c6098 --- /dev/null +++ b/itf/erang/models.py @@ -0,0 +1,22 @@ +from django.db import models + +class Issue(models.Model): + name = models.CharField(max_length=255) + date = models.DateField() + def __unicode__(self): + return self.name + +class Article(models.Model): + author = models.ForeignKey("Contributor", blank=True, null=True) + title = models.CharField(max_length=255) + text = models.TextField() + 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 + diff --git a/itf/erang/tests.py b/itf/erang/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/itf/erang/tests.py @@ -0,0 +1,23 @@ +""" +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 new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/itf/erang/views.py @@ -0,0 +1 @@ +# Create your views here. diff --git a/itf/festival/__init__.py b/itf/festival/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/itf/festival/admin.py b/itf/festival/admin.py new file mode 100755 index 0000000..d249e09 --- /dev/null +++ b/itf/festival/admin.py @@ -0,0 +1,83 @@ +from django.contrib import admin +from models import * + +class AudioInline(admin.StackedInline): + model = Audio + extra = 2 + +class ImageInline(admin.StackedInline): + model = Image + extra = 3 + +class DocumentInline(admin.StackedInline): + model = Document + extra = 2 + +class TalkAdmin(admin.ModelAdmin): + inlines = [AudioInline, ImageInline, DocumentInline] + save_on_top = True + list_display = ('__unicode__', 'presenter', 'session',) + list_filter = ['session'] + search_fields = ('title', 'intro', 'presenter',) + #hide meeting field + +class MeetingDayInline(admin.StackedInline): + model = MeetingDay + extra = 3 + +class ParticipantInline(admin.StackedInline): + model = Participant + extra = 3 + +class MeetingAdmin(admin.ModelAdmin): + inlines = [MeetingDayInline, ImageInline, DocumentInline, ParticipantInline] + prepopulated_fields = {"slug": ("title",)} + save_on_top = True + +class ProjectAdmin(admin.ModelAdmin): + prepopulated_fields = {"slug": ("title",)} + save_on_top = True + +class SessionAdmin(admin.ModelAdmin): + search_fields = ('title', 'intro',) + list_filter = ['day'] + list_display = ('__unicode__',) + +class ParticipantAdmin(admin.ModelAdmin): + search_fields = ('title', 'short_bio',) + list_display = ('name', 'title', 'meeting',) + list_filter = ['meeting'] + +class CommentAdmin(admin.ModelAdmin): + list_display = ('__unicode__', 'is_displayed',) + list_editable = ('is_displayed',) + list_filter = ['meeting'] + +class SignupAdmin(admin.ModelAdmin): + search_fields = ('email',) + +class ImageAdmin(admin.ModelAdmin): + search_fields = ('title', 'intro',) + list_filter = ['meeting', 'talk'] + +class AudioAdmin(admin.ModelAdmin): + search_fields = ('title', 'intro',) + list_filter = ['meeting', 'talk'] + +class VideoAdmin(admin.ModelAdmin): + search_fields = ('title', 'intro',) + list_filter = ['meeting', 'talk'] + +admin.site.register(Comment, CommentAdmin) +admin.site.register(Meeting, MeetingAdmin) +admin.site.register(Audio, AudioAdmin) +admin.site.register(Video, VideoAdmin) +admin.site.register(Image, ImageAdmin) +admin.site.register(Document) +admin.site.register(Project, ProjectAdmin) +#admin.site.register(MeetingDay) +admin.site.register(Session, SessionAdmin) +admin.site.register(Talk, TalkAdmin) +admin.site.register(Participant, ParticipantAdmin) +admin.site.register(Signup, SignupAdmin) +admin.site.register(CommentCaptcha) diff --git a/itf/festival/forms.py b/itf/festival/forms.py new file mode 100644 index 0000000..8fd25c9 --- /dev/null +++ b/itf/festival/forms.py @@ -0,0 +1,11 @@ +from django import forms +from models import Comment + +class MeetingCommentForm(forms.ModelForm): + pass + + class Meta: + model = Comment + exclude = ['is_displayed', 'meeting', 'parent', 'posted_date'] + + diff --git a/itf/festival/models.py b/itf/festival/models.py new file mode 100644 index 0000000..bb53240 --- /dev/null +++ b/itf/festival/models.py @@ -0,0 +1,132 @@ +from django.db import models +import datetime +import time + +class Comment(models.Model): + name = models.CharField(max_length=255) + email = models.EmailField(max_length=255) + comment = models.TextField() + is_displayed = models.BooleanField(default=True) + meeting = models.ForeignKey('Meeting') + parent = models.ForeignKey('Comment', default=0, related_name='child') + posted_date = models.DateTimeField(default=datetime.datetime.now()) + + def __unicode__(self): + return "%s by %s on %s" % (self.comment, self.name, self.posted_date,) + + def epoch_date(self): + return time.mktime(self.posted_date.timetuple()) + + +class CommentCaptcha(models.Model): + question = models.CharField(max_length=500) + answer = models.CharField(max_length=10) + + def __unicode__(self): + return self.question + +#Not using this class right now - but use this as a constant reminder ... +# class CommentVote(models.Model): + + +class Meeting(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + slug = models.SlugField() + + def __unicode__(self): + return self.title + +class Participant(models.Model): + name = models.CharField(max_length=255) + title = models.CharField(max_length=255, blank=True, null=True) + short_bio = models.TextField(max_length=255, blank=True, null=True) + meeting = models.ForeignKey('Meeting') + + def __unicode__(self): + return self.name + +class Talk(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + presenter = models.CharField(max_length=255) + session = models.ForeignKey('Session') # name of meeting - name of session + + def __unicode__(self): + return "%s - %s" % (self.session.day.meeting.title, self.title) # name of meeting - name of session + +class Session(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + day = models.ForeignKey('MeetingDay') + session_no = models.IntegerField(blank=True, null=True) + + def __unicode__(self): + return "%s - %s" % (self.day.meeting.title, self.title) # name of meeting - name of session + +class MeetingDay(models.Model): + meeting = models.ForeignKey('Meeting') + meeting_date = models.DateField() + + def __unicode__(self): + return "%s - %s" % (self.meeting, self.meeting_date) + +class Audio(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + file = models.FileField(upload_to='upload/audio') + meeting = models.ForeignKey('Meeting', blank=True, null=True) + talk = models.ForeignKey('Talk', blank=True, null=True) + + class Meta: + verbose_name_plural = "Audio" + + def __unicode__(self): + return self.title + +class Video(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + file = models.FileField(upload_to='upload/video') + meeting = models.ForeignKey('Meeting', blank=True, null=True) + talk = models.ForeignKey('Talk', blank=True, null=True) + + def __unicode__(self): + return self.title + +class Image(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + file = models.FileField(upload_to='upload/images') + meeting = models.ForeignKey('Meeting', blank=True, null=True) + talk = models.ForeignKey('Talk', blank=True, null=True) + + def __unicode__(self): + return self.title + +class Document(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + file = models.FileField(upload_to='upload/docs') + meeting = models.ForeignKey('Meeting', blank=True, null=True) + talk = models.ForeignKey('Talk', blank=True, null=True) + is_resource = models.BooleanField() + + def __unicode__(self): + return self.title + +class Project(models.Model): + title = models.CharField(max_length=255) + intro = models.TextField(blank=True, null=True) + start_date = models.DateField(blank=True, null=True) + end_date = models.DateField(blank=True, null=True) + slug = models.SlugField() + + def __unicode__(self): + return self.title + +class Signup(models.Model): + email = models.EmailField() + + def __unicode__(self): + return self.email diff --git a/itf/festival/tests.py b/itf/festival/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/itf/festival/tests.py @@ -0,0 +1,23 @@ +""" +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/festival/utils.py b/itf/festival/utils.py new file mode 100644 index 0000000..5aef759 --- /dev/null +++ b/itf/festival/utils.py @@ -0,0 +1,8 @@ +import re + +def validateEmail(email): + + if len(email) > 7: + if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", email) != None: + return 1 + return 0 diff --git a/itf/festival/views.py b/itf/festival/views.py new file mode 100644 index 0000000..4f64f82 --- /dev/null +++ b/itf/festival/views.py @@ -0,0 +1,178 @@ +# Create your views here. +from django.shortcuts import render_to_response, get_object_or_404 +from django.http import HttpResponse +from festival.models import * +from utils import validateEmail +from forms import MeetingCommentForm +import random +try: + import json +except: + import simplejson as json +from django.core.mail import send_mail + +def index(request): + index_data = {} + new_meetings = MeetingDay.objects.all().order_by('-meeting_date')[:5] # get 5 latest meetings + projects = Project.objects.all().order_by('start_date') + + index_data['latest_meetings'] = new_meetings + index_data['projects'] = projects + + return render_to_response("festival_index.html", { 'data' : index_data }) + + +def meeting_details(request, meeting_id): + meeting_data = {} + meeting_data['meeting'] = get_object_or_404(Meeting, id=meeting_id) +# meeting_data['sessions'] = Session.objects.filter(day__meeting__id=meeting_id) # get meetings session objs + meeting_data['talks'] = Talk.objects.filter(session__day__meeting__id=meeting_id) + meeting_data['images'] = Image.objects.filter(meeting__id=meeting_id) + meeting_data['sessions'] = Session.objects.filter(day__meeting__id=meeting_id).order_by("day").order_by("session_no") + meeting_data['documents'] = Document.objects.filter(meeting__id=meeting_id).exclude(talk__isnull=False) + meeting_data['comments'] = Comment.objects.filter(meeting__id=meeting_id).exclude(is_displayed=False) + captcha_length = CommentCaptcha.objects.all().count() + random_captcha = random.randint(1,captcha_length) + captcha = CommentCaptcha.objects.get(pk=random_captcha) + captcha_d = { + 'question': captcha.question, + 'id': captcha.id + } + + for s in meeting_data['sessions']: + s.talks = Talk.objects.select_related('image', 'audio', 'document').filter(session__id=s.id) + for t in s.talks: + t.images = Image.objects.filter(talk__id=t.id) + t.documents = Document.objects.filter(talk__id=t.id) + t.audio = Audio.objects.filter(talk__id=t.id) + t.video = Video.objects.filter(talk__id=t.id) + + meeting_data['imagegallery'] = Image.objects.filter(meeting__id=meeting_id) + meeting_data['participants'] = Participant.objects.filter(meeting__id=meeting_id).order_by('name') + comment_form = MeetingCommentForm() + return render_to_response("meeting.html", { 'data' : meeting_data, 'comment_form': comment_form, 'id': meeting_id, 'captcha': captcha_d }) + +def meetings(request): + meetings = list(Meeting.objects.all()) + for m in meetings: + m.dates = MeetingDay.objects.filter(meeting__id=m.id).order_by('-meeting_date') + m.end_date = m.dates[0].meeting_date + m.start_date = m.dates[len(m.dates) - 1].meeting_date + + meetings.sort(sort_meetings) + + return render_to_response("meetings.html", {'meetings': meetings}) + + +def meeting_comment(request): + if request.GET.has_key('captcha') and request.is_ajax(): + captcha_answer = str(request.GET['captcha']).strip() + captcha_id = int(request.GET['captcha_id']) + captcha_obj = CommentCaptcha.objects.get(pk=captcha_id) + correct_answer = str(captcha_obj.answer).strip() +# print captcha_answer.lower + " " + correct_answer + if correct_answer.lower() != captcha_answer.lower(): + r = { + 'status': 0, + 'msg': 'Please answer the question in the box correctly. Thanks.' + } + else: + comment_form = MeetingCommentForm(request.GET) + if comment_form.is_valid(): + c = comment_form.save(commit=False) + meeting_id = int(request.GET['meeting_id']) + meeting_obj = Meeting.objects.get(pk=meeting_id) + c.meeting = meeting_obj + c.save() + r = { + 'status': 1, + 'msg': 'Comment saved.' + } + else: + #TODO: Pass validation errors properly accessing form.errors + r = { + 'status': 0, + 'msg': 'Please enter a valid email address. We will never display it publicly, sell it, or use it to send you unsolicited email. Thanks.' + } + else: + r = { + 'status': 0, + 'msg': 'Please answer the question in the box correctly. Thanks.' + } + return HttpResponse(json.dumps(r), mimetype="application/json") + +def sort_meetings(m1, m2): + if m1.start_date < m2.end_date: + return 1 + else: + return -1 + +def wireframe(request): + return render_to_response("festival_wireframe.html") + +def erang(request): + return render_to_response("erang.html") + +def publications(request): + return render_to_response("publications.html") + +def surveys(request): + return render_to_response("surveys.html") + +def home(request): + return render_to_response("home.html") + + +def projects(request): + projects = Project.objects.all(); + return render_to_response("projects.html", {'projects': projects}) + +def resources(request): + resources = Document.objects.filter(is_resource=True) + return render_to_response("resources.html", {'resources': resources}) + +def people(request): + participants = Participant.objects.all().order_by('name') + + l = [] + l2 = [] + for p in participants: + if p.name in l: + pass + else: + l.append(p.name) + l2.append(p) + + participants = l2 + + return render_to_response("people.html", {'participants': participants}) + + +def project(request, project_id): + project = get_object_or_404(Project, id=project_id) + return render_to_response("project.html", {'project': project}) + +def save_email(request): + email = request.GET['email'] + if validateEmail(email): + t = Signup(email=email) + t.save() + return HttpResponse("1") + else: + return HttpResponse("0") + +def email_signups(request): + to_emails = ['sanjaybhangar@gmail.com'] + arr = [] + for s in Signup.objects.all(): + arr.append(s.email) + eml_list = "\n".join(arr) + message_pre = "Someone pinged http://theatreforum.in/emailsharvarialltheemails/ , so here it is: \n\n" + message = message_pre + eml_list + send_mail("List of Signups on theatreforum.in", message, 'do_not_reply@theatreforum.in', to_emails, fail_silently=False) + return HttpResponse("ok") + +def video(request, video_id): + video = get_object_or_404(Video, id=video_id) + return render_to_response("video.html", {'video': video}) + diff --git a/itf/itfcore/__init__.py b/itf/itfcore/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/itf/itfcore/admin.py b/itf/itfcore/admin.py new file mode 100755 index 0000000..7f0535f --- /dev/null +++ b/itf/itfcore/admin.py @@ -0,0 +1,67 @@ +from django.contrib import admin +from django.contrib.auth.models import User +from models import * + +#class NicknameInline(admin.StackedInline): +# model = Nickname +# extra = 3 + +#class LinkInlineModelAdmin(admin.InlineModelAdmin): +# pass + +#class LinkInline(LinkInlineModelAdmin): +# model = Link +# extra = 3 + +class ProfileInline(admin.StackedInline): + model = Profile + extra = 1 + +class PerformanceAdmin(admin.ModelAdmin): + filter_horizontal = ('links', 'images') + +class EventAdmin(admin.ModelAdmin): + filter_horizontal = ('links',) + +class ProfileAdmin(admin.ModelAdmin): + filter_horizontal = ('links', 'files', 'images',) +# inlines = [NicknameInline] +# inlines = [LinkInline] + +class VenueAdmin(admin.ModelAdmin): + ordering = ('name',) + prepopulated_fields = {'slug': ('name',)} + filter_horizontal = ('links', 'images') + +class TheatreGroupAdmin(admin.ModelAdmin): + prepopulated_fields = {'slug': ('name',)} + filter_horizontal = ('links', 'files', 'images') + +class ProductionAdmin(admin.ModelAdmin): + prepopulated_fields = {'slug': ('title',)} + filter_horizontal = ('links', 'files', 'images',) + inlines = [ProfileInline] + +class ScriptAdmin(admin.ModelAdmin): + filter_horizontal = ('links', 'downloads') + + +#admin.site.register(Nickname3) +#admin.site.register(Nickname2) +admin.site.register(Performance, PerformanceAdmin) +admin.site.register(Event, EventAdmin) +admin.site.register(Location) +admin.site.register(ProfileProfile) +admin.site.register(ProfileGroup) +admin.site.register(Script, ScriptAdmin) +admin.site.register(Production, ProductionAdmin) +admin.site.register(Image) +admin.site.register(File) +admin.site.register(Link) +admin.site.register(RandomQuote) +admin.site.register(ProfileProduction) +admin.site.register(Nickname) +admin.site.register(TheatreGroup, TheatreGroupAdmin) +admin.site.register(Venue, VenueAdmin) +admin.site.register(Profile, ProfileAdmin) + diff --git a/itf/itfcore/fields.py b/itf/itfcore/fields.py new file mode 100755 index 0000000..e152fb7 --- /dev/null +++ b/itf/itfcore/fields.py @@ -0,0 +1,58 @@ +from django.db import models +from django import forms +from django.utils.text import capfirst + +class MultiSelectFormField(forms.MultipleChoiceField): + widget = forms.CheckboxSelectMultiple + + def __init__(self, *args, **kwargs): + self.max_choices = kwargs.pop('max_choices', 0) + super(MultiSelectFormField, self).__init__(*args, **kwargs) + + def clean(self, value): + if not value and self.required: + raise forms.ValidationError(self.error_messages['required']) + if value and self.max_choices and len(value) > self.max_choices: + raise forms.ValidationError('You must select a maximum of %s choice%s.' + % (apnumber(self.max_choices), pluralize(self.max_choices))) + return value + +class MultiSelectField(models.Field): + __metaclass__ = models.SubfieldBase + + def get_internal_type(self): + return "CharField" + + def get_choices_default(self): + return self.get_choices(include_blank=False) + + def _get_FIELD_display(self, field): + value = getattr(self, field.attname) + choicedict = dict(field.choices) + + def formfield(self, **kwargs): + # don't call super, as that overrides default widget if it has choices + defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), + 'help_text': self.help_text, 'choices':self.choices} + if self.has_default(): + defaults['initial'] = self.get_default() + defaults.update(kwargs) + return MultiSelectFormField(**defaults) + + def get_db_prep_value(self, value): + if isinstance(value, basestring): + return value + elif isinstance(value, list): + return ",".join(value) + + def to_python(self, value): + if isinstance(value, list): + return value + return value.split(",") + + def contribute_to_class(self, cls, name): + super(MultiSelectField, self).contribute_to_class(cls, name) + if self.choices: + func = lambda self, fieldname = name, choicedict = dict(self.choices):",".join([choicedict.get(value,value) for value in getattr(self,fieldname)]) + setattr(cls, 'get_%s_display' % self.name, func) + diff --git a/itf/itfcore/models.py b/itf/itfcore/models.py new file mode 100644 index 0000000..e5e5001 --- /dev/null +++ b/itf/itfcore/models.py @@ -0,0 +1,253 @@ +from django.db import models +from django.contrib.auth.models import User +import datetime +from fields import MultiSelectField, MultiSelectFormField +import multilingual +from django.utils.translation import ugettext as _ + +EVENT_TYPES = ( + ('workshop', 'Workshop'), + ('seminar', 'Seminar'), + ('exhibition', 'Exhibition'), + ('course', 'Course / Training'), + ('other', 'Other'), +) + +OCCUPATION_TYPES = ( + ('make_up_artist', 'Make-up Artist'), + ('director', 'Director'), + ('actor', 'Actor'), + ('other', 'Other'), +) + +FILE_TYPES = ( + ('audio', 'Audio'), + ('video', 'Video'), + ('pdf', 'PDF'), + ('text', 'Text Document'), + ('other', 'Other'), +) + +PP_RELATION_TYPES = ( + ('friend', 'Friend'), + ('worked_under', 'Worked Under'), + ('worked_with', 'Worked with'), + ('directed', 'Directed'), + ('fanof', 'Fan Of'), + ('other', 'Other'), +) + +PG_RELATION_TYPES = ( + ('member', 'Member'), + ('admin', 'Admin'), + ('fan', 'Fan'), + ('other', 'Other'), +) + +class Script(models.Model): + author = models.CharField(max_length=255) + downloads = models.ManyToManyField('File', blank=True) + links = models.ManyToManyField('Link', blank=True) + language = models.CharField(max_length=50, blank=True) + + class Translation(multilingual.Translation): + title = models.CharField(max_length=255) + synopsis = models.TextField(blank=True) + + def __unicode__(self): + return self.title + +class ProfileProduction(models.Model): + profile = models.ForeignKey('Profile') + production = models.ForeignKey('Production') + role = models.CharField(max_length=255) + is_approved = models.BooleanField(default=False) + is_original = models.BooleanField(default=False) + def __unicode__(self): + return self.role + + class Meta: + verbose_name = 'Peoples Role in Production' + +class Production(models.Model): + title = models.CharField(max_length=255) + description = models.TextField(blank=True) + author = models.ForeignKey('Profile', related_name="AuthoredProduction") + director = models.ForeignKey('Profile', related_name="DirectedProduction") + cast = models.ManyToManyField('Profile', through='ProfileProduction', blank=True, symmetrical=False) + theatregroup = models.ForeignKey('TheatreGroup', blank=True, null=True, verbose_name="Theatre Group") + script = models.ForeignKey('Script', blank=True, null=True) + images = models.ManyToManyField('Image', blank=True) + files = models.ManyToManyField('File', blank=True) + links = models.ManyToManyField('Link', blank=True) + language = models.CharField(max_length=50, blank=True) + slug = models.SlugField() + + def get_absolute_url(self): + return "/production/" + str(self.id) + + def __unicode__(self): + return self.title + +#class Nickname2(models.Model): +# name = models.CharField('Nick2', max_length=255, blank=True) +## nick_profile = models.ForeignKey('Profile') + +# def __unicode__(self): +# return self.name + +#class Nickname3(models.Model): +# name = models.CharField('Nick3', max_length=255, blank=True) +## nick_profile = models.ForeignKey('Profile') + +# def __unicode__(self): +# return self.name + + +class Nickname(models.Model): + name = models.CharField('Nick', max_length=255, blank=True) + profile = models.ForeignKey('Profile') + + def __unicode__(self): + return self.name + +class Profile(models.Model): + user = models.ForeignKey(User, blank=True, unique=True, null=True) + phone = models.CharField(max_length=255, blank=True) + email = models.CharField(max_length=255, blank=True) + groups = models.ManyToManyField('TheatreGroup', through='ProfileGroup', blank=True, symmetrical=False) + occupation = MultiSelectField(max_length=1000, choices=OCCUPATION_TYPES, verbose_name="Occupation Type", blank=True) + connections = models.ManyToManyField('Profile', through='ProfileProfile', blank=True, symmetrical=False) + profile_image = models.ForeignKey('Image', blank=True, null=True, related_name="profile_image") + dob = models.DateField(blank=True, verbose_name="DoB", null=True) + location = models.ForeignKey('Location', blank=True, null=True) + images = models.ManyToManyField('Image', blank=True) + files = models.ManyToManyField('File', blank=True) + links = models.ManyToManyField('Link', blank=True) + related_productions = models.ManyToManyField('Production', blank=True, null=True) + # nickname = models.ForeignKey(Nickname, blank=True, null=True) +# nickname2 = models.ForeignKey('Nickname2', related_name="MyNick", blank=True) +# nickname3 = models.ManyToManyField('Nickname3', blank=True) + + + class Translation(multilingual.Translation): + firstname = models.CharField(max_length=255, verbose_name=_("First Name")) + lastname = models.CharField(max_length=255, blank=True, verbose_name=_("Last Name")) + about = models.TextField(blank=True) + + def __unicode__(self): + return self.firstname + " " + self.lastname + +class Venue(models.Model): + name = models.CharField(max_length=255) + location = models.ForeignKey('Location') + images = models.ManyToManyField('Image', blank=True) + links = models.ManyToManyField('Link', blank=True) + slug = models.SlugField() + def __unicode__(self): + return self.name + +class Performance(models.Model): + production = models.ForeignKey('Production') + venue = models.ForeignKey('Venue', blank=True, null=True) + datetime = models.DateTimeField(verbose_name="Date & Time", blank=True, null=True) + ticketslink = models.URLField(max_length=255, blank=True, verbose_name="Tickets link") + images = models.ManyToManyField('Image', blank=True) + links = models.ManyToManyField('Link', blank=True) + + def __unicode__(self): + return self.production + + class Meta: + get_latest_by = "datetime" + +class Event(models.Model): + title = models.CharField(max_length=255, blank=True) + synopsis = models.TextField(blank=True) + venue = models.ForeignKey('Venue') + theatregroup = models.ForeignKey('TheatreGroup', blank=True, null=True, verbose_name="Theatre Group") + time = models.DateTimeField(blank=True, null=True) + eventtype = models.CharField(max_length=255, choices=EVENT_TYPES, verbose_name="Event Type") + links = models.ManyToManyField('Link', blank=True) + cost = models.CharField(max_length=255, blank=True) + language = models.ForeignKey("Language", blank=True, null=True) + + def __unicode__(self): + return self.title + +class Language(models.Model): + name = models.CharField(max_length=100) + short_name = models.CharField(max_length=3) + +class Location(models.Model): + address = models.TextField(blank=True) + lat = models.CharField(max_length=255, blank=True, verbose_name="Latitude", editable=False) + lon = models.CharField(max_length=255, blank=True, verbose_name="Longitude", editable=False) + def __unicode__(self): + return self.address + +class ProfileProfile(models.Model): + fromProfile = models.ForeignKey('Profile', related_name='relatedFrom', verbose_name="From Profile") + toProfile = models.ForeignKey('Profile', related_name='relatedTo', verbose_name="To Profile") + rel_type = MultiSelectField(max_length=1000, choices=PP_RELATION_TYPES, verbose_name="Relation Type") + is_approved = models.BooleanField(default=False) + + class Meta: + verbose_name = 'Person to Person Relation' + + +class TheatreGroup(models.Model): + name = models.CharField(max_length=255) + about = models.TextField(blank=True) + location = models.ManyToManyField('Location', blank=True) + images = models.ManyToManyField('Image', blank=True) + files = models.ManyToManyField('File', blank=True) + links = models.ManyToManyField('Link', blank=True) + slug = models.SlugField() + def __unicode__(self): + return self.name + +class ProfileGroup(models.Model): + profile = models.ForeignKey('Profile') + group = models.ForeignKey('TheatreGroup') + rel_type = MultiSelectField(max_length=1000, choices=PG_RELATION_TYPES, verbose_name="Relation Type") + is_approved = models.BooleanField(default=False) + is_admin = models.BooleanField(default=False) + + class Meta: + verbose_name = 'Person to Theatre Group Relation' + +class Image(models.Model): + image = models.ImageField(upload_to='/profiles/', width_field='width', height_field='height', null=False) + width = models.IntegerField(editable=False) + height = models.IntegerField(editable=False) + caption = models.CharField(max_length=255, blank=True) + + def __unicode__(self): + if self.caption: + return self.caption + else: + return self.path + +class File(models.Model): + file = models.FileField(upload_to='/uploads/') + file_type = models.CharField(max_length=255, choices=FILE_TYPES, verbose_name="File Type") + description = models.TextField(blank=True) + def __unicode__(self): + return self.caption + +class RandomQuote(models.Model): + quote = models.TextField() + author = models.CharField(max_length=255) + +class Link(models.Model): + url = models.URLField() + caption = models.CharField(max_length=255, blank=True) +# related_profile = models.ForeignKey(Profile) + + def __unicode__(self): + if self.caption: + return self.caption + else: + return self.url + diff --git a/itf/itfcore/views.py b/itf/itfcore/views.py new file mode 100644 index 0000000..e8d1cd2 --- /dev/null +++ b/itf/itfcore/views.py @@ -0,0 +1,49 @@ +from django.shortcuts import render_to_response +from django.http import HttpResponse +from django.contrib import admin +from settings import LANGUAGES +import simplejson +import sys + +def index(request): + return HttpResponse("India Theatre Forum - Coming Soon") + +def getLanguages(request): + languages = LANGUAGES + langArr = [] + for l in languages: + langDict = {} + langDict['short'] = l[0] + langDict['long'] = l[1] + langArr.append(langDict) + + print langArr + json = simplejson.dumps(langArr) + return HttpResponse(json, mimetype='application/javascript') + +def mockup(request): + return render_to_response("mockup.html") + +def allnews(request): + return render_to_response("x0news.html") + +def disc(request): + return render_to_response("x0disc.html") + +def multi(request): + return render_to_response("x0multi.html") + +def resources(request): + return render_to_response("x0resources.html") + +def erang(request): + return render_to_response("x0erang.html") + +def profile(request): + return render_to_response("x0profile.html") + +def googlehosted(request): + return HttpResponse('googlefffffffffc014cb4') + +# Create your views here. + diff --git a/itf/manage.py b/itf/manage.py new file mode 100755 index 0000000..bcdd55e --- /dev/null +++ b/itf/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + 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) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/itf/meetingdata.json b/itf/meetingdata.json new file mode 100644 index 0000000..45d9a49 --- /dev/null +++ b/itf/meetingdata.json @@ -0,0 +1 @@ +[{"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/monitor.py b/itf/monitor.py new file mode 100755 index 0000000..6f88edc --- /dev/null +++ b/itf/monitor.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# vi:si:et:sw=4:sts=4:ts=4 +import os +import sys +import time +import signal +import threading +import atexit +import Queue + +_interval = 1.0 +_times = {} +_files = [] + +_running = False +_queue = Queue.Queue() +_lock = threading.Lock() + +def _restart(path): + _queue.put(True) + prefix = 'monitor (pid=%d):' % os.getpid() + print >> sys.stderr, '%s Change detected to \'%s\'.' % (prefix, path) + print >> sys.stderr, '%s Triggering process restart.' % prefix + os.kill(os.getpid(), signal.SIGINT) + +def _modified(path): + try: + # If path doesn't denote a file and were previously + # tracking it, then it has been removed or the file type + # has changed so force a restart. If not previously + # tracking the file then we can ignore it as probably + # pseudo reference such as when file extracted from a + # collection of modules contained in a zip file. + + if not os.path.isfile(path): + return path in _times + + # Check for when file last modified. + + mtime = os.stat(path).st_mtime + if path not in _times: + _times[path] = mtime + + # Force restart when modification time has changed, even + # if time now older, as that could indicate older file + # has been restored. + + if mtime != _times[path]: + return True + except: + # If any exception occured, likely that file has been + # been removed just before stat(), so force a restart. + + return True + + return False + +def _monitor(): + while 1: + # Check modification times on all files in sys.modules. + + for module in sys.modules.values(): + if not hasattr(module, '__file__'): + continue + path = getattr(module, '__file__') + if not path: + continue + if os.path.splitext(path)[1] in ['.pyc', '.pyo', '.pyd']: + path = path[:-1] + if _modified(path): + return _restart(path) + + # Check modification times on files which have + # specifically been registered for monitoring. + + for path in _files: + if _modified(path): + return _restart(path) + + # Go to sleep for specified interval. + + try: + return _queue.get(timeout=_interval) + except: + pass + +_thread = threading.Thread(target=_monitor) +_thread.setDaemon(True) + +def _exiting(): + try: + _queue.put(True) + except: + pass + _thread.join() + +atexit.register(_exiting) + +def track(path): + if not path in _files: + _files.append(path) + +def start(interval=1.0): + global _interval + if interval < _interval: + _interval = interval + + global _running + _lock.acquire() + if not _running: + _running = True + _thread.start() + _lock.release() diff --git a/itf/settings.py b/itf/settings.py new file mode 100644 index 0000000..1f10a58 --- /dev/null +++ b/itf/settings.py @@ -0,0 +1,125 @@ +# Django settings for theatre project. + +import os +from os.path import join + +DEBUG = True +TEMPLATE_DEBUG = DEBUG +LOCAL_DEVELOPMENT = True +LOGGING_INTERCEPT_REDIRECTS = True +LOGGING_LOG_SQL = True +LOGGING_SHOW_METRICS = True +LOGGING_OUTPUT_ENABLED = True + +PROJECT_PATH = os.path.dirname(__file__) + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +INTERNAL_IPS = ('127.0.0.1',) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = 'theatre' # Or path to database file if using sqlite3. +DATABASE_USER = 'root' # Not used with sqlite3. +DATABASE_PASSWORD = '' # Not used with sqlite3. +DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. +DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/Chicago' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +LANGUAGES = ( + ('en', 'English'), + ('hi', 'Hindi'), + ('kn', 'Kannada'), + ) + +DEFAULT_LANGUAGE = 1 + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = join(PROJECT_PATH, 'static') + +TEMPLATE_CONTEXT_PROCESSORS = ( + "django.core.context_processors.auth", + "django.core.context_processors.debug", + "django.core.context_processors.i18n", + "django.core.context_processors.media", + "multilingual.context_processors.multilingual", + ) + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '/static/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/admin/media/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'fognneiw#s_o-#^tiny@^f-$x#1&29$3a37w5=kll57i!^uo@r' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', + 'django.template.loaders.eggs.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'multilingual.middleware.DefaultLanguageMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', +# 'djangologging.middleware.LoggingMiddleware', +) + +#SOLR_ROOT = '/home/sanj/satan/apache-solr-1.3.0/example/' +#SOLR_SCHEMA_PATH = SOLR_ROOT + 'solr/conf/schema.xml' +#SOLR_DATA_DIR = SOLR_ROOT + 'solr/data' + +ROOT_URLCONF = 'urls' + +TEMPLATE_DIRS = ( + join(PROJECT_PATH, 'templates'), + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'itfcore', + 'festival', + 'erang', +# 'solango', + 'multilingual', +# 'multilingual.flatpages', + 'django_extensions', + 'debug_toolbar', + 'sorl.thumbnail', +) diff --git a/itf/static/css/colorbox.css b/itf/static/css/colorbox.css new file mode 100644 index 0000000..86039a1 --- /dev/null +++ b/itf/static/css/colorbox.css @@ -0,0 +1,63 @@ +/* + ColorBox Core Style + The following rules are the styles that are consistant between themes. + Avoid changing this area to maintain compatability with future versions of ColorBox. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative; overflow:hidden;} +#cboxLoadedContent{overflow:auto;} +#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} + +/* + Example user style + The following rules are ordered and tabbed in a way that represents the + order/nesting of the generated HTML, so that the structure easier to understand. +*/ +#cboxOverlay{background:url(/static/images/overlay.png) 0 0 repeat;} +#colorbox{} + #cboxTopLeft{width:21px; height:21px; background:url(/static/images/controls.png) -100px 0 no-repeat;} + #cboxTopRight{width:21px; height:21px; background:url(/static/images/controls.png) -129px 0 no-repeat;} + #cboxBottomLeft{width:21px; height:21px; background:url(/static/images/controls.png) -100px -29px no-repeat;} + #cboxBottomRight{width:21px; height:21px; background:url(/static/images/controls.png) -129px -29px no-repeat;} + #cboxMiddleLeft{width:21px; background:url(/static/images/controls.png) left top repeat-y;} + #cboxMiddleRight{width:21px; background:url(/static/images/controls.png) right top repeat-y;} + #cboxTopCenter{height:21px; background:url(/static/images/border.png) 0 0 repeat-x;} + #cboxBottomCenter{height:21px; background:url(/static/images/border.png) 0 -29px repeat-x;} + #cboxContent{background:#fff;} + #cboxLoadedContent{margin-bottom:28px;} + #cboxTitle{position:absolute; bottom:3px; left:0; text-align:center; width:100%; color:#949494; font-size: 13px;} + #cboxCurrent{position:absolute; bottom:3px; left:58px; color:#949494;} + #cboxSlideshow{position:absolute; bottom:3px; right:30px; color:#0092ef;} + #cboxPrevious{position:absolute; bottom:0; left:0px; background:url(/static/images/controls.png) -75px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;} + #cboxPrevious.hover{background-position:-75px -25px;} + #cboxNext{position:absolute; bottom:0; left:27px; background:url(/static/images/controls.png) -50px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;} + #cboxNext.hover{background-position:-50px -25px;} + #cboxLoadingOverlay{background:url(/static/images/loading_background.png) center center no-repeat;} + #cboxLoadingGraphic{background:url(/static/images/loading.gif) center center no-repeat;} + #cboxClose{position:absolute; bottom:0; right:0; background:url(/static/images/controls.png) -25px 0px no-repeat; width:25px; height:25px; text-indent:-9999px;} + #cboxClose.hover{background-position:-25px -25px;} + +/* + The following fixes png-transparency for IE6. + It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition + + Since this method does not support CSS background-positioning, it is incompatible with CSS sprites. + Colorbox preloads navigation hover classes to account for this. + + !! Important Note: AlphaImageLoader src paths are relative to the HTML document, + while regular CSS background images are relative to the CSS document. +*/ +.cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderTopLeft.png, sizingMethod='scale');} +.cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderTopCenter.png, sizingMethod='scale');} +.cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderTopRight.png, sizingMethod='scale');} +.cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');} +.cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');} +.cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderBottomRight.png, sizingMethod='scale');} +.cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');} +.cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/static/images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');} + diff --git a/itf/static/css/error_pages.css b/itf/static/css/error_pages.css new file mode 100644 index 0000000..de6e102 --- /dev/null +++ b/itf/static/css/error_pages.css @@ -0,0 +1,10 @@ +.errorTxt { + text-align: center; + padding: 25px; + width: 70%; + margin-left: auto; + margin-right: auto; + color: #333; + font-weight: bold; + font-size: 18px; + } diff --git a/itf/static/css/festival.css b/itf/static/css/festival.css new file mode 100644 index 0000000..f12fa33 --- /dev/null +++ b/itf/static/css/festival.css @@ -0,0 +1,113 @@ +body, html { + margin: 0px; + padding: 0px; + font-family: Arial, Georgia, Helvetica, mono; + background: #ee9b11; + } + +#wrapper { + background: url('/static/images/bg1.jpg') no-repeat; + border: 0px solid #000; + width: 1016px; + height: 175px; + z-index: 1000; + margin-top: 0px; + margin-left: auto; + margin-right: auto; + padding: 0px; + } + +#header { + width: 100%; + height: 100px; + position: relative; +/* background: #1f1a17; */ + + } + + +#body_wrapper { + width: 100%; + } + +#leftCol { + float: left; + width: 200px; + padding-top: 25px; + } + +#centerCol { + margin-top: 25px; + width: 540px; + float: left; + overflow: auto; + padding-left: 5px; + margin-left: 0px; + } + +#rightCol { + margin-top: 25px; + margin-left: 5px; + text-align: left; + width: 240px; + float: left; + background: #f8c301; + padding-left: 3px; + padding-right: 3px; + padding-bottom: 25px; + } + +#rightCol h1 { + padding-top: 0px; + } + +#newsletter_signup +{ +text-align: right; +} + +#email +{ + +} + + +#meeting_list { + } + +#meeting_list_title { + } + +.box +{ +margin: 30px 5px 15px 10px; +border: #3c5a86 1px dashed; +padding:5px; +font-size: 12px; +font-weight: normal; +color: #000000; +background-color: #d1e0ef; +} + +.box a +{ +text-decoration: none; +color: #142908; +} + +.box H1 +{ +margin : 0px 0px -12px 5px; +position: relative; +top : -12px; +border: #3c5a86 1px solid; +padding-top : 3px; +padding-bottom: 3px; +padding-left : 5px; +padding-right : 5px; +font-size : 18px; +font-weight: bold; +color : #000000; +display: inline; +background-color: #99bbdd; +} diff --git a/itf/static/css/festival_index.css b/itf/static/css/festival_index.css new file mode 100644 index 0000000..60dd9ca --- /dev/null +++ b/itf/static/css/festival_index.css @@ -0,0 +1,54 @@ +body { + margin: 0px; + padding: 0px; + } + +#leftbox +{ + +} + +#rightbox +{ + +} + +#meeting_list { + } + +#meeting_list_title { + } + +.box +{ +margin: 30px 5px 15px 10px; +border: #3c5a86 1px dashed; +padding:5px; +font-size: 12px; +font-weight: normal; +color: #000000; +background-color: #d1e0ef; +} + +.box a +{ +text-decoration: none; +color: #142908; +} + +.box H1 +{ +margin : 0px 0px -12px 5px; +position: relative; +top : -12px; +border: #3c5a86 1px solid; +padding-top : 3px; +padding-bottom: 3px; +padding-left : 5px; +padding-right : 5px; +font-size : 18px; +font-weight: bold; +color : #000000; +display: inline; +background-color: #99bbdd; +} diff --git a/itf/static/css/fullcalendar.css b/itf/static/css/fullcalendar.css new file mode 100644 index 0000000..c972a51 --- /dev/null +++ b/itf/static/css/fullcalendar.css @@ -0,0 +1,184 @@ + +/* top area w/ month title and buttons */ + +.full-calendar-title { + text-align: left; + } + +.full-calendar-buttons { + float: right; + margin: 0 0 1em; + } + +.full-calendar-buttons button { + vertical-align: middle; + margin: 0 0 0 5px; + font-size: 1em; + } + +.full-calendar-buttons button span { + padding: 0 10px; + } + + /* To always display the "today" button: + * + * .full-calendar-buttons button.today { + * visibility: visible !important; + * } + */ + + + + +/* table layout & outer border */ + +.full-calendar-month-wrap { + clear: both; + border: 1px solid #333; /* outer border color & style */ + } + +.full-calendar-month { + width: 100%; + overflow: hidden; + } + +.full-calendar-month table { + border-collapse: collapse; + border-spacing: 0; + } + + + + +/* cell styling */ + +.full-calendar-month th, +.full-calendar-month td.day { + padding: 0; + vertical-align: top; + border-style: solid; /* inner border style */ + border-color: #333; /* inner border color */ + border-width: 1px 0 0 1px; + } + +.full-calendar-month th { + border-top: 0; + text-align: center; + } + +.full-calendar-month th.first, +.full-calendar-month td.first { + border-left: 0; + } + +.full-calendar-month td.today { + background: #FFFFCC; + } + +.full-calendar-month .day-number { + text-align: right; + padding: 0 2px; + } + +.full-calendar-month .other-month .day-number { + color: #fff; + } + +.full-calendar-month .day-content { + padding: 2px 2px 0; /* distance between events and day edges */ + } + + /* FullCalendar automatically chooses a cell's height, + * but this can be overridden: + * + * .full-calendar-month td.day { + * height: 100px !important; + * } + */ + + + + +/* event styling */ + +.full-calendar-month .event { + margin-bottom: 2px; + font-size: .85em; + cursor: pointer; + text-align: left; + } + +.full-calendar-month .ui-draggable-dragging td { + cursor: move; + } + +.full-calendar-month .event td { + background: #C1D9EC; + padding: 0; + } + +.full-calendar-month .event td.ne, +.full-calendar-month .event td.nw, +.full-calendar-month .event td.se, +.full-calendar-month .event td.sw { + background: none; + width: 1px; /* <-- remove if you dont want "rounded" corners */ + height: 1px; /* <-- */ + } + +.full-calendar-month .nobg td { + background: none; + } + +.full-calendar-month .event td.c { + padding: 0 2px; + } + +.full-calendar-month .event-time { + font-weight: bold; + } + + /* To change the color of events on a per-class basis (such as with the + * "className" attribute of a CalEvent), do something like this: + * + * .full-calendar-month .myclass td { + * background: green; + * } + */ + + + + +/* the rectangle that covers a day when dragging an event */ + +.full-calendar-month .over-day { + background: #ADDBFF; + opacity: .2; + filter: alpha(opacity=20); /* for IE */ + } + + + + +/* right-to-left support */ + +.r2l .full-calendar-title { + text-align: right; + } + +.r2l .full-calendar-buttons { + float: left; + } + +.r2l .full-calendar-buttons button { + margin: 0 5px 0 0; + } + +.r2l .full-calendar-month .day-number { + text-align: left; + } + +.r2l .full-calendar-month .event { + text-align: right; + } + diff --git a/itf/static/css/index.css b/itf/static/css/index.css new file mode 100644 index 0000000..e1a03d8 --- /dev/null +++ b/itf/static/css/index.css @@ -0,0 +1,419 @@ +body { + background: #D5DBE8; + } + +ul { + list-style-type: none; + margin-left: 3px; + margin-top: 0px; + padding-left: 3px; + } + +.loggedIn { + float: left; + } + +#loggedInButtons { + width: 300px; + margin-left: auto; + margin-right: auto; + } + +#header { + position: fixed; + z-index: 25000; + left: 0px; + top: 0px; + height: 50px; + width: 100%; + text-align: center; + background: #000; + font-size: 14px; + color: #fff; + border-bottom: 1px dashed #f00; + } + +#mainWrapper { + position: relative; + top: 50px; + } +#searchDiv { + position: absolute; + right: 5px; + top: 0px; + } + +#leftBar { + float: left; + width: 19%; + height: 100%; + } + +#locationSelect { + text-align: center; + background: #361848; + border: 2px solid #61AAF2; + padding: 4px; + color: #fff; + font-weight: bold; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + } + +#center { + float: left; + width: 60%; + } + +#rightBar { + float: left; + width: 19%; + height: 100%; + } + +.toplink { + cursor: pointer; + color: #eee; + font-size: 11px; + text-decoration: underline; + position: relative; + left: -12px; + } + +.toplink:hover { + color: #f00; + } + +.small { + font-size: 10px; + color: yellow; + } + +#signUp { + color: #E21515; + font-size: 20px; + font-weight: bolder; + } + +#title { + font-size: 18px; + letter-spacing: 2px; + font-weight: bold; + color: #361848; + } + +#loginDiv { + font-size: 13px; + color: #ccc; + } + +#signupDiv { + position: absolute; + top: 16px; + left: 65%; + } + +.topBtn { + font-weight: bold; + font-size: 16px; + cursor: pointer; + } + +.dialogBox { + position: fixed; + top: 50px; + left: 25%; + width: 50%; + text-align: center; + background: #2B86E0; + border: 1px dashed #361848; + display: none; + padding: 4px; + } + +.dialogTitle { + position: relative; + background: #61AAF2; + margin-bottom: 4px; + color: #666; + font-weight: bold; + } + +.closeBtn { + position: absolute; + cursor: pointer; + color: #f00; + font-size: 18px; + right: 4px; + top: 1px; + } + +#centerBtns { + width: 700px; + margin-left: auto; + margin-right: auto; + background: #61AAF2; + margin-bottom: 10px; + } + +.centerBtn { + float: left; + margin-right: 5px; + border: 2px solid #61AAF2; + color: #61AAF2; + font-size: 13px; + font-weight: bold; + background: #361848; + padding: 6px; + cursor: pointer; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + } + +.centerBtnHover { + color: #FCB281; + } + +.centerBtnSelected { + color: #fff; + } + +.tab { + display: none; + } + +#tabContainer { + margin-top: 20px; + padding-top: 10px; + width: 96%; + margin-left: 2%; + margin-right: 2%; + height: 100%; + clear: both; + } + +#leftTabs { + padding-top: 12px; + } + + +.leftTab { + background: #61AAF2; + border: 1px dashed #361848; + margin-bottom: 3px; + width: 96%; + margin-left: auto; + margin-right: auto; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 5px; + color: #361848; + cursor: pointer; + font-weight: bold; + } + +.leftTabContent { + display: none; + position: relative; + width: 97%; + margin-left: 1%; + margin-right: 2%; + border-left: 1px dashed #361848; + border-right: 1px dashed #361848; + border-bottom: 1px dashed #361848; + border-top: 1px dotted #D5DBE8; + top: -8px; + padding-top: 1px; + padding-bottom: 0px; + margin-bottom: 0px; + background: #61AAF2; + font-size: 11px; + font-weight: bold; + color: #333; + } + +.leftTabContent a { + text-decoration: none; + color: #444; + } + +.leftTabContent a:hover { + color: #FCB281; + } + +.seeAll { + position: absolute; + bottom: 0px; + right: 10px; + color: #f00; + font-size: 10px; + cursor: pointer; + } + +#adminMessageBox { + position: relative; + width: 60%; + margin-left: auto; + margin-right: auto; + text-align: center; + background: yellow; + margin-bottom: 4px; + border: 1px dashed #f00; + } + +#basicLinks { + } + +.basicLink { + position: relative; + height: 24px; + width: 100%; + cursor: pointer; + background: #ccc; + opacity: 0.5; + margin: 5px; + } + +.basicLinkInner { + height: 24px; + width: 70px; + z-index: 100; + position: absolute; + right: 1px; + font-weight: bold; + opacity: 1.0; + } + +.basicLinkInner a { + text-decoration: none; + } + +#map { + width: 100%; + height: 100%; + } + +#footer + { + position: fixed; + bottom: 0px; + left: 0px; + width: 100%; + height: 28px; + background-color: #000; + border-top: 1px dashed #f00; + z-index: 500; + } + +#footer-nav { + position: absolute; + text-align: center; + bottom: 4px; + color: #000; + height: 18px; + width: 100%; + } +#footer-nav ul, +#footer-nav li { + display: inline; + } + +#mycarousel { + width: 100px; + } + +.center-div +{ + position: relative; + margin-bottom: 10px; + padding: 15px; + width: 95%; + background: #2B86E0; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; +} + +.roundborder +{ + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; +} + +.multi-content +{ + font-size: 12px; +} + +#photoID { + height: 300px; +} + + +#multi-categories { + +} + +#multi-video { + +} + +#multi-audio { + +} + +#multi-images { + +} + +h2 { + font-size: 13px; + } + +#itfList li { + border: 1px solid #000; + background: #000; + color: #fff; + margin-bottom: 7px; + padding: 5px; + font-size: 12px; + cursor: pointer; + } + +#itfBox { + border: 2px solid #fff; + margin-top: 15px; + padding: 4px; + } + +.seemore +{ + float: right; + bottom: 10px; + font-size: 11px; +} + +.seemore a +{ + font-weight: bold; + color:black; + text-decoration:none; +} + +.content-ul +{ +} + +.content-ul li +{ + display: inline; + list-style-type: none; + padding-right: 20px; + font-size: 12px; +} + + + diff --git a/itf/static/css/jScrollPane.css b/itf/static/css/jScrollPane.css new file mode 100644 index 0000000..fab0fb9 --- /dev/null +++ b/itf/static/css/jScrollPane.css @@ -0,0 +1,65 @@ + +.jScrollPaneContainer { + position: relative; + overflow: hidden; + z-index: 1; +} + +.jScrollPaneTrack { + position: absolute; + cursor: pointer; + right: 0; + top: 0; + height: 100%; + background: #aaa; +} +.jScrollPaneDrag { + position: absolute; + background: #666; + cursor: pointer; + overflow: hidden; +} +.jScrollPaneDragTop { + position: absolute; + top: 0; + left: 0; + overflow: hidden; +} +.jScrollPaneDragBottom { + position: absolute; + bottom: 0; + left: 0; + overflow: hidden; +} +a.jScrollArrowUp { + display: block; + position: absolute; + z-index: 1; + top: 0; + right: 0; + text-indent: -2000px; + overflow: hidden; + background-color: #666; + height: 9px; +} +a.jScrollArrowUp:hover { + background-color: #f60; +} + +a.jScrollArrowDown { + display: block; + position: absolute; + z-index: 1; + bottom: 0; + right: 0; + text-indent: -2000px; + overflow: hidden; + background-color: #666; + height: 9px; +} +a.jScrollArrowDown:hover { + background-color: #f60; +} +a.jScrollActiveArrowButton, a.jScrollActiveArrowButton:hover { + background-color: #f00; +} diff --git a/itf/static/css/jcarousel.css b/itf/static/css/jcarousel.css new file mode 100644 index 0000000..f62f705 --- /dev/null +++ b/itf/static/css/jcarousel.css @@ -0,0 +1,49 @@ +/** + * This
element is wrapped by jCarousel around the list + * and has the classname "jcarousel-container". + */ +.jcarousel-container { + position: relative; +} + +.jcarousel-clip { + z-index: 2; + padding: 0; + margin: 0; + overflow: hidden; + position: relative; +} + +.jcarousel-list { + z-index: 1; + overflow: hidden; + position: relative; + top: 0; + left: 0; + margin: 0; + padding: 0; +} + +.jcarousel-list li, +.jcarousel-item { + float: left; + list-style: none; + /* We set the width/height explicitly. No width/height causes infinite loops. */ + width: 75px; + height: 75px; +} + +/** + * The buttons are added dynamically by jCarousel before + * the