Exemple #1
0
 def get_post_images(self, obj):
     if obj.images:
         images = []
         for image in obj.images.all():
             images.append(get_absolute_url(image.image.url))
         return images
     return None
Exemple #2
0
 def get_qr_code(self, obj):
     if hasattr(obj, "qr_code"):
         return get_absolute_url(obj.qr_code.qr_code.url)
     return None
Exemple #3
0
 def get_image(self, obj):
     if obj.image:
         return get_absolute_url(obj.image.url)
     return None