mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 05:28:03 +00:00
Track access counts and show them on mouseover
This commit is contained in:
@@ -136,7 +136,10 @@ class AvatarImageView(TemplateView):
|
||||
data = BytesIO()
|
||||
photodata.save(data, pil_format(imgformat), quality=JPEG_QUALITY)
|
||||
data.seek(0)
|
||||
|
||||
obj.photo.access_count += 1
|
||||
obj.photo.save()
|
||||
obj.access_count += 1
|
||||
obj.save()
|
||||
return HttpResponse(
|
||||
data,
|
||||
content_type='image/%s' % imgformat)
|
||||
|
||||
Reference in New Issue
Block a user