Skip to content

Commit

Permalink
Merge pull request #494 from ccnmtl/markdownify
Browse files Browse the repository at this point in the history
Remove django-markwhat, introduce markdownify
  • Loading branch information
ndittren authored Jun 12, 2024
2 parents 215cb73 + 0b6fe04 commit 8d4bca7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions pageblocks/templates/pageblocks/imageblock.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load markup %}
{% load markdownify %}
{% load thumbnail %}

{% if block.lightbox %}
Expand All @@ -17,7 +17,7 @@ <h3 class="modal-title">{{block.alt}}</h3>
<div class="modal-body">
<img alt="{{block.alt}}" src="{% if img_src %}{{img_src}}{% else %}{% thumbnail block.image 900x900 %}{% endif %}" />
<div class="caption">
{{block.caption|markdown}}
{{block.caption|markdownify}}
</div>
</div>
</div>
Expand All @@ -32,7 +32,7 @@ <h3 class="modal-title">{{block.alt}}</h3>
src="{% if img_src %}{{img_src}}{% else %}{% thumbnail block.image 200x200 %}{% endif %}" />
</a>
<div class="caption">
{{block.caption|markdown}}
{{block.caption|markdownify}}
</div>
</div>
</li>
Expand All @@ -41,6 +41,6 @@ <h3 class="modal-title">{{block.alt}}</h3>
{% else %}
<img alt="{{block.alt}}" src="{% if img_src %}{{img_src}}{% else %}{% thumbnail block.image 600x600 %}{% endif %}" />
<div class="caption">
{{block.caption|markdown}}
{{block.caption|markdownify}}
</div>
{% endif %}
4 changes: 2 additions & 2 deletions pageblocks/templates/pageblocks/imagepullquoteblock.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load markup %}
{% load markdownify %}
{% load thumbnail %}
<ul class="thumbnails">
<li class="span6">
<div class="thumbnail">
<img alt="{{block.alt}}" src="{% if img_src %}{{img_src}}{% else %}{% thumbnail block.image 260x180 %}{% endif %}" /><br />
<div class="caption">
{{block.caption|markdown}}
{{block.caption|markdownify}}
</div>
</div>
</li>
Expand Down
4 changes: 2 additions & 2 deletions pageblocks/templates/pageblocks/pullquoteblock.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% load markup %}
<div class="pullquote">{{block.body|markdown}}</div>
{% load markdownify %}
<div class="pullquote">{{block.body|markdownify}}</div>
4 changes: 2 additions & 2 deletions pageblocks/templates/pageblocks/simpleimageblock.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load markup %}
{% load markdownify %}
<div class="{{block.css_extra}}">
<img alt="{{block.alt}}"
class="img-responsive"
src="{{MEDIA_URL}}{{block.image.name}}" />
{% if block.caption %}
<div class="caption">
{{block.caption|markdown}}
{{block.caption|markdownify}}
</div>
{% endif %}
</div>
4 changes: 2 additions & 2 deletions pageblocks/templates/pageblocks/textblock.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% load markup %}
{{block.body|markdown}}
{% load markdownify %}
{{block.body|markdownify}}
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2007-2015, Columbia Center For New Media Teaching And Learning (CCNMTL)
# Copyright (c) 2007-2024, Columbia Center For Teaching And Learning (CTL)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -36,12 +36,12 @@
install_requires = [
"django-pagetree>=1.1.0",
"sorl>=3.1",
"django-markdownify",
],
scripts = [],
license = "BSD",
platforms = ["any"],
zip_safe=False,
packages=['pageblocks'],
include_package_data=True,

)
)
3 changes: 1 addition & 2 deletions test_reqs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
django-treebeard==4.7.1
Markdown==3.6
django-markwhat==1.6.2
django-pagetree==1.5.0
importlib-metadata<7.2 # for flake8
typing_extensions==4.12.2
Expand All @@ -20,3 +18,4 @@ python-dateutil==2.9.0.post0
text-unidecode==1.3
six==1.16.0
test_reqs/sorl-3.4-py3-none-any.whl
django-markdownify==0.9.5

0 comments on commit 8d4bca7

Please sign in to comment.