def import_files(request): page_message = "success" try: arp.import_all() except RuntimeError as err: page_message = err return render(request, 'arpwatch/import.html', {'page_message': page_message})
def import_files(request): page_message = "success" try: arp.import_all() except RuntimeError as err: page_message = err return render_to_response('arpwatch/import.html', {'page_message': page_message}, context_instance=RequestContext(request))
def handle(self, *args, **options): arp.import_all() arp.map_ip_to_mac(1)
def handle_noargs(self, **options): arp.import_all() arp.map_ip_to_mac(1)
def import_arp(): from arpwatch import arp arp.import_all() #arp.import_snmp() arp.map_ip_to_mac(1)