(request, uid)
return render(request, 'job_edit.html', context)
Edit meta-data associated with a job.
Edit meta-data associated with a job.
Edit meta - data associated with a job .
def job_edit(request, uid):
    "Edit meta-data associated with a job."

    job = Job.objects.filter(uid=uid).first()
    project = job.project
    form = forms.JobEditForm(instance=job, user=request.user)

    if request.method == "POST":
        form = forms.JobEditForm(data=request.POST, files=request.FILES, instance=job, user=request.user)
        if form.is_valid():
            form.save()
            return redirect(reverse("job_view", kwargs=dict(uid=job.uid)))

    context = dict(job=job, project=project, form=form, activate='Edit Result')

    context.update(get_counts(project))
    return render(request, 'job_edit.html', context)
def job_edit ( request , uid ) : job = Job . objects . filter ( uid = uid ) . first ( ) project = job . project form = forms . JobEditForm ( instance = job , user = request . user ) if request . method == "POST" : form = forms . JobEditForm ( data = request . POST , files = request . FILES , instance = job , user = request . user ) if form . is_valid ( ) : form . save ( ) return redirect ( reverse ( "job_view" , kwargs = dict ( uid = job . uid ) ) ) context = dict ( job = job , project = project , form = form , activate = 'Edit Result' ) context . update ( get_counts ( project ) ) return render ( request , 'job_edit.html' , context )