mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-30 05:34:52 +02:00
17 lines
446 B
Python
17 lines
446 B
Python
from rest_framework import serializers
|
|
|
|
from .models import ScannedHost, ScanHistory
|
|
|
|
class ScannedHostSerializer(serializers.ModelSerializer):
|
|
|
|
# scan_history = serializers.SerializerMethodField()
|
|
#
|
|
# def get_scan_history(self, scanned_host):
|
|
# return scanned_host.scan_history.domain_name.domain_name
|
|
|
|
id = serializers.IntegerField(read_only=True)
|
|
|
|
class Meta:
|
|
model = ScannedHost
|
|
fields = '__all__'
|