Advertisement
Guest User

Untitled

a guest
Nov 10th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. ...
  2.         if product_lib:
  3.             with config.set_context(language='fr'):
  4.                 product_fr = Product(product.id)
  5.                 product_fr.name = product_lib[3].strip()
  6.                 product_fr.save()
  7.             with config.set_context(language='de'):
  8.                 product_de = Product(product.id)
  9.                 product_de.name = product_lib[2].strip()
  10.                 product_de.save()
  11.             with config.set_context(language='es'):
  12.                 product_es = Product(product.id)
  13.                 product_es.name = product_lib[1].strip()
  14.                 product_es.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement