diff --git a/startScan/migrations/0002_auto_20200516_0530.py b/startScan/migrations/0002_auto_20200516_0530.py new file mode 100644 index 00000000..5bb28bd0 --- /dev/null +++ b/startScan/migrations/0002_auto_20200516_0530.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.6 on 2020-05-16 05:30 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('startScan', '0001_initial'), + ] + + operations = [ + migrations.RenameField( + model_name='scannedsubdomains', + old_name='scan_history_model', + new_name='scan_history', + ), + ] diff --git a/startScan/models.py b/startScan/models.py index 18ec1595..06750896 100644 --- a/startScan/models.py +++ b/startScan/models.py @@ -9,11 +9,12 @@ class ScanHistory(models.Model): scan_type = models.ForeignKey(EngineType, on_delete=models.CASCADE) def __str__(self): + # debug purpose remove scan type and id in prod return self.domain_name.domain_name + self.scan_type.scan_type_name + str(self.id) class ScannedSubdomains(models.Model): subdomain = models.CharField(max_length=100) - scan_history_model = models.ForeignKey(ScanHistory, on_delete=models.CASCADE) + scan_history = models.ForeignKey(ScanHistory, on_delete=models.CASCADE) open_ports = models.CharField(max_length=1000) takeover_possible = models.BooleanField() http_status = models.IntegerField() diff --git a/startScan/templates/startScan/detail_scan.html b/startScan/templates/startScan/detail_scan.html index d0e6f0a8..5bd73d05 100644 --- a/startScan/templates/startScan/detail_scan.html +++ b/startScan/templates/startScan/detail_scan.html @@ -51,7 +51,7 @@ Scan history {% else %}