comparison downloads/views.py @ 1152:fa5d03c5c28c

Finish (?) converting downloads to V3 design.
author Brian Neal <bgneal@gmail.com>
date Sun, 18 Dec 2016 21:19:34 -0600
parents f56798c96ec2
children
comparison
equal deleted inserted replaced
1151:f56798c96ec2 1152:fa5d03c5c28c
95 raise Http404 95 raise Http404
96 96
97 return render(request, 'downloads/download_summary.html', { 97 return render(request, 'downloads/download_summary.html', {
98 'page': the_page, 98 'page': the_page,
99 'title': 'Newest Downloads', 99 'title': 'Newest Downloads',
100 'V3_DESIGN': True,
100 }) 101 })
101 102
102 ####################################################################### 103 #######################################################################
103 104
104 @login_required 105 @login_required
115 raise Http404 116 raise Http404
116 117
117 return render(request, 'downloads/download_summary.html', { 118 return render(request, 'downloads/download_summary.html', {
118 'page': the_page, 119 'page': the_page,
119 'title': 'Popular Downloads', 120 'title': 'Popular Downloads',
121 'V3_DESIGN': True,
120 }) 122 })
121 123
122 ####################################################################### 124 #######################################################################
123 125
124 @login_required 126 @login_required
134 raise Http404 136 raise Http404
135 137
136 return render(request, 'downloads/download_summary.html', { 138 return render(request, 'downloads/download_summary.html', {
137 'page': the_page, 139 'page': the_page,
138 'title': 'Highest Rated Downloads', 140 'title': 'Highest Rated Downloads',
141 'V3_DESIGN': True,
139 }) 142 })
140 143
141 ####################################################################### 144 #######################################################################
142 145
143 @login_required 146 @login_required
145 download = get_object_or_404(Download.public_objects, pk=id) 148 download = get_object_or_404(Download.public_objects, pk=id)
146 if not download.is_public: 149 if not download.is_public:
147 raise Http404 150 raise Http404
148 return render(request, 'downloads/download_detail.html', { 151 return render(request, 'downloads/download_detail.html', {
149 'download' : download, 152 'download' : download,
153 'V3_DESIGN': True,
150 }) 154 })
151 155
152 ####################################################################### 156 #######################################################################
153 157
154 @login_required 158 @login_required
168 else: 172 else:
169 form = AddDownloadForm() 173 form = AddDownloadForm()
170 174
171 return render(request, 'downloads/add.html', { 175 return render(request, 'downloads/add.html', {
172 'add_form': form, 176 'add_form': form,
177 'V3_DESIGN': True,
173 }) 178 })
174 179
175 ####################################################################### 180 #######################################################################
176 181
177 @login_required 182 @login_required
178 def thanks(request): 183 def thanks(request):
179 return render(request, 'downloads/thanks.html', { 184 return render(request, 'downloads/thanks.html', {
185 'V3_DESIGN': True,
180 }) 186 })
181 187
182 ####################################################################### 188 #######################################################################
183 189
184 @require_POST 190 @require_POST