Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def update_dns_record(dns_record, ip):
    if dns_record.provider:
        config = settings.DYNAMICDNS_PROVIDERS[dns_record.provider]
        mod_path, mod_name = config['plugin'].rsplit('.', 1)
        exec('from {} import {} as DnsPlugin'.format(mod_path, mod_name))
        dns_plugin = DnsPlugin(dns_record.domain, config)
        dns_plugin.update(ip)
        


src/d/j/django-dynamic-dns-HEAD/dynamicdns/models.py   django-dynamic-dns(Download)
from django.db import models
 
from utils import update_dns_record
 
 
    def save(self):
        if not self.key:
            self.key = self.generate_key()
        update_dns_record(self, self.ip)
        self.last_change = datetime.now()