summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commcrawler/admin.py2
-rw-r--r--commcrawler/models.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/commcrawler/admin.py b/commcrawler/admin.py
index 6b06228..6365e65 100644
--- a/commcrawler/admin.py
+++ b/commcrawler/admin.py
@@ -30,7 +30,7 @@ admin_site.register(models.Crawl, CrawlAdmin)
class CrawlResultAdmin(admin.ModelAdmin):
model = models.CrawlResult
list_display = (
- "target", "crawl", "started", "duration", "status", "is_online",
+ "url", "crawl", "started", "duration", "status", "is_online",
"bad_ssl", "nb_external_link", "nb_internal_link",
"nb_images", "nb_facebook", "nb_twitter", "nb_instagram", "nb_youtube",
"nb_dailymotion", "nb_vimeo", "nb_video", "nb_audio", "nb_internal_pdf",
diff --git a/commcrawler/models.py b/commcrawler/models.py
index ce3deb0..62d12eb 100644
--- a/commcrawler/models.py
+++ b/commcrawler/models.py
@@ -141,6 +141,9 @@ class CrawlResult(models.Model):
def __str__(self):
return "{} - {}".format(self.crawl, self.target)
+ def url(self):
+ return self.target.url
+
class CrawlRelation(models.Model):
crawl = models.ForeignKey(Crawl, verbose_name=_("Crawl"))