@receiver(post_save, sender=Story)
def update_successstories_supernav(sender, instance, signal, created, **kwargs):
 if kwargs.get('raw', False):
  return
 if (instance.is_published and instance.featured):
  content = render_to_string('successstories/supernav.html', {'story': instance})
  (box, _) = Box.objects.get_or_create(label='supernav-python-success-stories')
  box.content = content
  box.save()

@ receiver ( post_save , sender = Story ) def update_successstories_supernav ( sender , instance , signal , created , ** kwargs ) : if kwargs . get ( 'raw' , False ) : return if ( instance . is_published and instance . featured ) : content = render_to_string ( 'successstories/supernav.html' , { 'story' : instance } ) ( box , _ ) = Box . objects . get_or_create ( label = 'supernav-python-success-stories' ) box . content = content box . save ( )
update download supernav .