comparison downloads/views.py @ 1023:a5ebc74dc3f3

Perform image_check on downloads.
author Brian Neal <bgneal@gmail.com>
date Thu, 10 Dec 2015 20:57:50 -0600
parents 41d0389fc85a
children e1c03da72818
comparison
equal deleted inserted replaced
1022:82f1f6f905eb 1023:a5ebc74dc3f3
160 form = AddDownloadForm(request.POST, request.FILES) 160 form = AddDownloadForm(request.POST, request.FILES)
161 if form.is_valid(): 161 if form.is_valid():
162 dl = form.save(commit=False) 162 dl = form.save(commit=False)
163 dl.user = request.user 163 dl.user = request.user
164 dl.ip_address = request.META.get('REMOTE_ADDR', None) 164 dl.ip_address = request.META.get('REMOTE_ADDR', None)
165 dl.save() 165 dl.save(html=form.html)
166 email_admins('New download for approval', """Hello, 166 email_admins('New download for approval', """Hello,
167 167
168 A user has uploaded a new download for your approval. 168 A user has uploaded a new download for your approval.
169 """) 169 """)
170 return HttpResponseRedirect(reverse('downloads-add_thanks')) 170 return HttpResponseRedirect(reverse('downloads-add_thanks'))