# -*- coding: utf-8 -*- # !/usr/bin/env python import os,sys PROJECT_ROOT = os.path.join(os.path.abspath(os.path.split(os.path.realpath(__file__))[0] + "/.."), '..') sys.path.insert(0, PROJECT_ROOT) os.environ.update({"DJANGO_SETTINGS_MODULE": "configs.testing"}) import django django.setup() from apps.web.device.models import Device from apps.web.core.helpers import ActionDeviceBuilder dev = Device.get_dev('869300033390166') box = ActionDeviceBuilder.create_action_device(dev) box.set print 'finished'