(request, uid)
return render(request, "project_edit.html", context=context)
Edit meta-data associated with a project.
Edit meta-data associated with a project.
Edit meta - data associated with a project .
def project_edit(request, uid):
    "Edit meta-data associated with a project."

    project = Project.objects.filter(uid=uid).first()
    form = forms.ProjectForm(instance=project, request=request)
    if request.method == "POST":
        form = forms.ProjectForm(data=request.POST, files=request.FILES, instance=project, request=request)
        if form.is_valid():
            project = form.save()
            Project.objects.filter(uid=uid).update(lastedit_user=request.user)
            return redirect(reverse("project_view", kwargs=dict(uid=project.uid)))

    context = dict(project=project, form=form, activate='Edit Project')

    context.update(get_counts(project))
    return render(request, "project_edit.html", context=context)
def project_edit ( request , uid ) : project = Project . objects . filter ( uid = uid ) . first ( ) form = forms . ProjectForm ( instance = project , request = request ) if request . method == "POST" : form = forms . ProjectForm ( data = request . POST , files = request . FILES , instance = project , request = request ) if form . is_valid ( ) : project = form . save ( ) Project . objects . filter ( uid = uid ) . update ( lastedit_user = request . user ) return redirect ( reverse ( "project_view" , kwargs = dict ( uid = project . uid ) ) ) context = dict ( project = project , form = form , activate = 'Edit Project' ) context . update ( get_counts ( project ) ) return render ( request , "project_edit.html" , context = context )