# -*- coding: utf-8 -*- # !/usr/bin/env python """ """ import os import sys #: current_dir - 2 PROJECT_ROOT = os.path.join(os.path.abspath(os.path.split(os.path.realpath(__file__))[0] + "/.."), '..') sys.path.insert(0, PROJECT_ROOT) from script.base import init_env, get_logger logger = get_logger(__name__) init_env(interactive=True) from apps.web.dealer.models import OnSale done0 = OnSale.objects(onClickUrl="/user/startDuration").update(onClickUrl='/user/promotion/getDuration') done1 = OnSale.objects(onClickUrl="/user/sendCoins").update(onClickUrl='/user/promotion/getCoins') assert all([done0, done1]) logger.info('finished')