f0e81576cb1557a377fb4aca291f772937053d4f,django/comicmodels/views.py,,upload_handler,#Any#Any#,20
Before Change
uploadsforcurrentsite = UploadModel.objects.filter(comicsite=comicsite)
return direct_to_template(request, "upload/comicupload.html",
{"form": form, "upload_url": upload_url, "upload_data": upload_data,
"uploads": uploadsforcurrentsite})
After Change
upload_url, upload_data = prepare_upload(request, view_url)
standardvars = site_get_standard_vars(site_short_name)
comicsite = standardvars["site"]
uploadsforcurrentsite = UploadModel.objects.filter(comicsite=comicsite)
// set inital values
form = UploadForm(initial = {"comicsite": comicsite.pk})
// FIXME: I want to make the comicsite field uneditable, but setting
// disabled using line below will trigger "field required" error
// How to disable this field but still send it when the form is
// submitted?
//form.fields["comicsite"].widget.attrs["disabled"] = True
templatevars = {"form": form, "upload_url": upload_url, "upload_data": upload_data,
"uploads": uploadsforcurrentsite}
allvars = concatdicts(standardvars,templatevars)
return direct_to_template(request, "upload/comicupload.html",
allvars)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 10
Instances
Project Name: comic/grand-challenge.org
Commit Name: f0e81576cb1557a377fb4aca291f772937053d4f
Time: 2012-10-03
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/views.py
Class Name:
Method Name: upload_handler
Project Name: comic/grand-challenge.org
Commit Name: 69dce0e03291081ef99a52b61b5a50574acabbc5
Time: 2012-10-03
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/views.py
Class Name:
Method Name: upload_handler
Project Name: comic/grand-challenge.org
Commit Name: f0e81576cb1557a377fb4aca291f772937053d4f
Time: 2012-10-03
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/views.py
Class Name:
Method Name: upload_handler
Project Name: comic/grand-challenge.org
Commit Name: 084b66945c2a35bb66479eaa08c92bc2076b6c59
Time: 2012-10-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/views.py
Class Name:
Method Name: upload_handler
Project Name: comic/grand-challenge.org
Commit Name: e42908cba1059d86b7a03615e2e707c1b15d10be
Time: 2012-10-08
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/views.py
Class Name:
Method Name: upload_handler