diff --git a/.gitignore b/.gitignore index b2141611..bd246c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,14 @@ .DS_Store /pipeline-env/ **/__pycache__/** +<<<<<<< HEAD +pipeline\.code-workspace +\.build +Pipeline Session\.sql +run +.gitignore +======= +>>>>>>> stylingDocumentation + +\.idea/ diff --git a/core/models.py b/core/models.py index 6e266be7..c803ef35 100644 --- a/core/models.py +++ b/core/models.py @@ -247,6 +247,20 @@ def get_attribution_html(self): return self.photographer.name + def get_attribution_html_caption(self): + if self.photographer is None: + return "" + + if hasattr(self.photographer, "staff_page"): + sp = self.photographer.staff_page + return format_html( + '

{}/The Polytechnic

', + sp.url, + sp.name, + ) + + return self.photographer.name + # Delete the source image file when an image is deleted @receiver(pre_delete, sender=CustomImage) diff --git a/core/templates/core/article_page.html b/core/templates/core/article_page.html index 8da2d20e..5551d63a 100644 --- a/core/templates/core/article_page.html +++ b/core/templates/core/article_page.html @@ -26,8 +26,10 @@

{{ page.subdeck|richtext_unwrapped }}