Added apache wsgi scripts.
--- /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()
+
--- 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 @@
<meta name="description" content="" />
<link href="/base.css" rel="stylesheet" type="text/css" media="screen" />
<link href="/forms.css" rel="stylesheet" type="text/css" media="screen" />
-<script type="text/javascript" language="JavaScript">
-function check(form) {
- var ext = form.sourcefile;
- ext = ext.substring(ext.length-3,ext.length);
- ext = ext.toLowerCase();
- if(ext != 'txt') {
- alert('You selected a .'+ext+
- ' file; please select a .jpg file instead!');
- return false; }
- else
- return true; }
-</script>
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Registration for upcoming workshop</a></h1>
- <h2><a href="http://fossee.in/">from FOSSEE Team</a></h2>
+ <h2><a href="http://fossee.in/">From FOSSEE Team</a></h2>
</div>
</div>
<!-- start page -->
--- 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)