# HG changeset patch # User Shantanu # Date 1263987592 -19800 # Node ID a1fe7806d6a0bf203c692976fc17dce18a6eb23a # Parent 6a2fdf0b4f7e7cbc76bcbdece0c31ab24a886f42 Added apache wsgi scripts. diff -r 6a2fdf0b4f7e -r a1fe7806d6a0 apache/django.wsgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache/django.wsgi Wed Jan 20 17:09:52 2010 +0530 @@ -0,0 +1,10 @@ +import os +import sys + +sys.path.append('/home/hg/repos/') + +os.environ['DJANGO_SETTINGS_MODULE'] = 'ws_reg.settings' + +import django.core.handlers.wsgi +application = django.core.handlers.wsgi.WSGIHandler() + diff -r 6a2fdf0b4f7e -r a1fe7806d6a0 template/index.html --- a/template/index.html Wed Jan 20 15:11:33 2010 +0530 +++ b/template/index.html Wed Jan 20 17:09:52 2010 +0530 @@ -7,24 +7,12 @@ - diff -r 6a2fdf0b4f7e -r a1fe7806d6a0 upload/views.py --- a/upload/views.py Wed Jan 20 15:11:33 2010 +0530 +++ b/upload/views.py Wed Jan 20 17:09:52 2010 +0530 @@ -6,33 +6,13 @@ from forms import ParticipantForm from models import Participant -#view to handle uploaded file, showing content of file, and option of uploading a file def upload_file(request, template_name='index.html'): if request.method == 'POST': form = ParticipantForm(request.POST, request.FILES) - if form.is_valid(): - #handle_uploaded_file(request.FILES['file']) + if form.is_valid(): form.save() return render_to_response(template_name, {'form': form, 'value': False,}) else: return render_to_response(template_name, {'form': form, 'value': True,}) return render_to_response(template_name, {'form': ParticipantForm(), 'value': True}) - -def submission(request, template_name='submission.html'): - """View to return the submitted videos - """ - context_participants = [] - - participants = Participant.objects.all() - for participant in participants: - context_participants.append({ - 'participant': participant, - 'file_name': str(participant.filename).split('/')[-1], - }) - - context = { - 'participants': context_participants, - } - - return render_to_response(template_name, context)