本文整理汇总了Python中cyder.cydns.address_record.models.AddressRecord.get_edit_url方法的典型用法代码示例。如果您正苦于以下问题:Python AddressRecord.get_edit_url方法的具体用法?Python AddressRecord.get_edit_url怎么用?Python AddressRecord.get_edit_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cyder.cydns.address_record.models.AddressRecord
的用法示例。
在下文中一共展示了AddressRecord.get_edit_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_add_record6
# 需要导入模块: from cyder.cydns.address_record.models import AddressRecord [as 别名]
# 或者: from cyder.cydns.address_record.models.AddressRecord import get_edit_url [as 别名]
def do_add_record6(self, data):
rec = AddressRecord(label = data['label'], domain=data['domain'], ip_str=data['ip'], ip_type='6')
rec.save()
self.assertTrue(rec.__repr__())
self.assertTrue(rec.get_absolute_url())
self.assertTrue(rec.get_edit_url())
self.assertTrue(rec.get_delete_url())
self.assertTrue(rec.details())
示例2: do_add_record
# 需要导入模块: from cyder.cydns.address_record.models import AddressRecord [as 别名]
# 或者: from cyder.cydns.address_record.models.AddressRecord import get_edit_url [as 别名]
def do_add_record(self, data):
rec = AddressRecord(label = data['label'], domain=data['domain'], ip_str=data['ip'], ip_type='4')
rec.save()
self.assertTrue(rec.__repr__())
self.assertTrue(rec.get_absolute_url())
self.assertTrue(rec.get_edit_url())
self.assertTrue(rec.get_delete_url())
self.assertTrue(rec.details())
search = AddressRecord.objects.filter( label = data['label'], domain = data['domain'], ip_type='4', ip_str=data['ip'] )
found = False
for record in search:
if record.ip_str == data['ip']:
found = True
self.assertTrue(found)