Hello.
We need to link template with specified devices.
Our code create new template and receive list of devices id. How i
undestand all m2m links stored at "config_config_templates". And it's far
enough to add record for each config id like
"config_id, temlate_id".
Example of code:
* # template creation*
* template.save() self.template = template.id*
* for device in json.loads(str(self.devices_list).replace('\'', '\"')):*
* config_id=Config.objects.get(device_id=device)*
* # link device and template. What object to use if there is no
model for config-template?*
* ConfigTemplates.objects.create(config_id=config_id,
template_id=self.template)*
--
You received this message because you are subscribed to the Google Groups
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.