cartridge

How I can to get custom options in the `init` function of the Tarantool Cartridge role?

ぃ、小莉子 提交于 2021-01-27 05:14:39
问题 A Tarantool Cartridge role file has a function init . I want to get my custom options from the instance.yml file. But the opts variable doesn't have it. How I can do it? 回答1: Cartridge has a built-in module called "argparse". It parses a few sources of configuration and combines them together: instances.yml or files in /etc/tarantool/conf.d command line arguments environment variables starting with TARANTOOL_ Cartridge uses this module to get various pieces of configuration like the port

Issues with admin in django

跟風遠走 提交于 2019-12-04 06:55:36
问题 I am making a shopping cart using mezzanine and cartridge. In my order model there is a field called status which has choices of unprocessed and processed. After an order is placed an admin can change their status. I want to send an email to the user whenever an admin updates the status. I have done some R&D on it but I didn't find anything which tells me how to send an email on change of status. My model: class Order(models.Model): ... .... ........ status = models.IntegerField(_("Status"),