+ return response(200, 'Apply Success', u'申请成功', {
|
|
|
240
|
+ 'current_id': latest_photo and latest_photo.pk or current_id,
|
|
|
241
|
+ 'photos': [photo.photo_info(user_id) for photo in group_photos],
|
|
|
242
|
+ 'group_id': group_id,
|
|
|
243
|
+ 'group': group_info,
|
|
|
244
|
+ 'user_id': user_id,
|
|
|
245
|
+ 'users': group_users,
|
|
261
|
246
|
})
|
|
262
|
247
|
|
|
263
|
248
|
|
|
|
249
|
+@logit
|
|
264
|
250
|
def session_detail(request, session_id):
|
|
265
|
251
|
photos = PhotosInfo.objects.filter(session_id=session_id)
|
|
266
|
252
|
return render(request, 'photo/session_detail.html', {'photos': photos})
|
|
267
|
253
|
|
|
268
|
254
|
|
|
|
255
|
+@logit
|
|
269
|
256
|
def photo_standard(request, photo_id):
|
|
270
|
257
|
photo = PhotosInfo.objects.get(photo_id=photo_id)
|
|
271
|
258
|
return render(request, 'photo/photo_detail.html', {'photo_url': photo.p_photo_url})
|
|
272
|
259
|
|
|
273
|
260
|
|
|
|
261
|
+@logit
|
|
274
|
262
|
def photo_standard_api(request, photo_id):
|
|
275
|
263
|
photo = PhotosInfo.objects.get(photo_id=photo_id)
|
|
276
|
|
- return JsonResponse({
|
|
277
|
|
- 'status': 200,
|
|
278
|
|
- 'message': u'获取照片详情成功',
|
|
279
|
|
- 'data': {
|
|
280
|
|
- 'photo': photo.detail,
|
|
281
|
|
- }
|
|
|
264
|
+ return response(200, 'Get Photo Detail Success', u'获取照片详情成功', {
|
|
|
265
|
+ 'photo': photo.detail,
|
|
282
|
266
|
})
|
|
283
|
267
|
|
|
284
|
268
|
|
|
|
269
|
+@logit
|
|
285
|
270
|
def photo_medium(request, photo_id):
|
|
286
|
271
|
photo = PhotosInfo.objects.get(photo_id=photo_id)
|
|
287
|
272
|
return render(request, 'photo/photo_detail.html', {'photo_url': photo.m_photo_url})
|
|
288
|
273
|
|
|
289
|
274
|
|
|
|
275
|
+@logit
|
|
290
|
276
|
def photo_large(request, photo_id):
|
|
291
|
277
|
photo = PhotosInfo.objects.get(photo_id=photo_id)
|
|
292
|
278
|
return render(request, 'photo/photo_detail.html', {'photo_url': photo.l_photo_url})
|
|
293
|
279
|
|
|
294
|
280
|
|
|
|
281
|
+@logit
|
|
295
|
282
|
def photo_raw(request, photo_id):
|
|
296
|
283
|
photo = PhotosInfo.objects.get(photo_id=photo_id)
|
|
297
|
284
|
return render(request, 'photo/photo_detail.html', {'photo_url': photo.r_photo_url})
|