[Debconf-video-commits] r395 - package/branches/pycon09/src/pyconvideo/pyconvideo
benh at alioth.debian.org
benh at alioth.debian.org
Thu Mar 26 17:24:22 UTC 2009
Author: benh
Date: 2009-03-26 17:24:21 +0000 (Thu, 26 Mar 2009)
New Revision: 395
Modified:
package/branches/pycon09/src/pyconvideo/pyconvideo/views.py
Log:
Use form.cleaned_data not form attributes.
Modified: package/branches/pycon09/src/pyconvideo/pyconvideo/views.py
===================================================================
--- package/branches/pycon09/src/pyconvideo/pyconvideo/views.py 2009-03-26 17:11:20 UTC (rev 394)
+++ package/branches/pycon09/src/pyconvideo/pyconvideo/views.py 2009-03-26 17:24:21 UTC (rev 395)
@@ -79,16 +79,19 @@
# process review
form = RecordingReviewForm(request.POST)
if form.is_valid():
+ data = form.cleaned_data
recording.file_status = \
models.VideoFileStatus.objects.get(
- file_status_code=form.file_status)
+ file_status_code=data['file_status'])
+ recording.comments = data['comments']
if request.POST.get('finish'):
recording.locked_by = None
recording.save()
event_recording = models.VideoEventRecording(
event=event, recording=recording,
- start_time=form.start_time, end_time=form.end_time,
- event_recording_base_name=form.base_name)
+ start_time=data['start_time'],
+ end_time=data['end_time'],
+ event_recording_base_name=data['base_name'])
event_recording.save()
if request.POST.get('finish'):
return list_recordings(request, completed=True)
@@ -174,9 +177,11 @@
# process review
form = TargetReviewForm(request.POST)
if form.is_valid():
+ data = form.cleaned_data
target.file_status = \
models.VideoFileStatus.objects.get(
- file_status_code=form.file_status)
+ file_status_code=data['file_status'])
+ target.comments = data['comments']
target.locked_by = None
target.save()
return list_targets(request, completed=True)
More information about the Debconf-video-commits
mailing list