def urun_sprite(sender, **kwargs): instance = kwargs['instance'] if instance.yeni == True: pic_urun = [urun.resim for urun in Urun.objects.filter(yeni=True)] pic_ver = [pic.version_generate('yeni_ufak') for pic in pic_urun] sprite_generator('products', pic_ver) if 'panel' in instance.kategori.isim: pic_urun = [urun.resim for urun in Urun.objects.filter( kategori__isim__contains='panel')] pic_ver = [pic.version_generate('panel_ufak') for pic in pic_urun] sprite_generator('panels', pic_ver)
def sistem_sprite(sender, **kwargs): pic_sistem = [sistem.resim for sistem in Sistem.objects.all()] pic_ver = [pic.version_generate('sistem_ufak') for pic in pic_sistem] sprite_generator('systems', pic_ver)
def haber_sprite(sender, **kwargs): pic_haber = [haber.resim for haber in Haber.objects.filter(anasayfa=True)] pic_ver = [pic.version_generate('haber_ufak') for pic in pic_haber] sprite_generator('news', pic_ver)