Mercurial > public > sg101
comparison gpp/downloads/views.py @ 204:b4305e18d3af
Resolve ticket #74. Add user badges. Some extra credit was done here: also refactored how pending news, links, and downloads are handled.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 01 May 2010 21:53:59 +0000 |
parents | 0e4961833cdf |
children | 2022c0409296 |
comparison
equal
deleted
inserted
replaced
203:40e5903903e1 | 204:b4305e18d3af |
---|---|
159 form = AddDownloadForm(request.POST, request.FILES) | 159 form = AddDownloadForm(request.POST, request.FILES) |
160 if form.is_valid(): | 160 if form.is_valid(): |
161 dl = form.save(commit=False) | 161 dl = form.save(commit=False) |
162 dl.user = request.user | 162 dl.user = request.user |
163 dl.ip_address = request.META.get('REMOTE_ADDR', None) | 163 dl.ip_address = request.META.get('REMOTE_ADDR', None) |
164 dl.is_public = False | |
165 dl.save() | 164 dl.save() |
166 email_admins('New download for approval', """Hello, | 165 email_admins('New download for approval', """Hello, |
167 | 166 |
168 A user has uploaded a new download for your approval. | 167 A user has uploaded a new download for your approval. |
169 """) | 168 """) |