BG
Size: a a a
BG
TC
TC
general.css для общей части, home.css для домашней страницы, about.css для страницы "О сайте" и т.д. А в шаблонах в родительском шаблоне прописываешь только general и делаешь блок для дочерних файлов. В соответствующих дочерних шаблонах добавляешь нужные ссылки на нужные стилиYK
@receiver(post_save, sender=Order)
def order_re_save(sender, instance, **kwargs):
instance.history_sn = f"{instance.first_sn} ({instance.first_sn.comment_text}); "
for sn in instance.other_sn.all().order_by('sn_plan_date'):
instance.history_sn += f"{sn} ({sn.comment_text}); "
DT
@receiver(post_save, sender=Order)
def order_re_save(sender, instance, **kwargs):
instance.history_sn = f"{instance.first_sn} ({instance.first_sn.comment_text}); "
for sn in instance.other_sn.all().order_by('sn_plan_date'):
instance.history_sn += f"{sn} ({sn.comment_text}); "
YK
@receiver(post_save, sender=Order)
def order_re_save(sender, instance, **kwargs):
instance.history_sn = f"{instance.first_sn} ({instance.first_sn.comment_text}); "
for sn in instance.other_sn.all().order_by('sn_plan_date'):
instance.history_sn += f"{sn} ({sn.comment_text}); "
instance.save()
DT
DT
ИХ
YK
Р
Р
pyexcel. тащить пандас для этого — это такой оверхэд, что охеретьDT
combined_str = ''
for
combined_str += ''
Order.objects.filter(pk=instance.pk).update(history_sn=combined_str)ИХ
YK
combined_str = ''
for
combined_str += ''
Order.objects.filter(pk=instance.pk).update(history_sn=combined_str)YK
combined_str = ''
for
combined_str += ''
Order.objects.filter(pk=instance.pk).update(history_sn=combined_str)@receiver(post_save, sender=Order)
def order_re_save(sender, instance, **kwargs):
history_sn = f"{instance.first_sn} ({instance.first_sn.comment_text}); "
for sn in instance.other_sn.all().order_by('sn_plan_date'):
history_sn += f"{sn} ({sn.comment_text}); "
Order.objects.filter(pk=instance.pk).update(history_sn=history_sn)
AG
@receiver(post_save, sender=Order)
def order_re_save(sender, instance, **kwargs):
history_sn = f"{instance.first_sn} ({instance.first_sn.comment_text}); "
for sn in instance.other_sn.all().order_by('sn_plan_date'):
history_sn += f"{sn} ({sn.comment_text}); "
Order.objects.filter(pk=instance.pk).update(history_sn=history_sn)
save() у модели, чем сигналыYK
save() у модели, чем сигналыAG
SG
