Adding markdown was relatively straightforward thanks to this tutorial. All I had to do was to import the markdown package in the views.py
file and convert the post.body to markdown.
import markdown
# ...
def blog_detail(request, pk):
md = markdown.Markdown(extensions=["fenced_code"])
post = Post.objects.get(pk=pk)
post.body = md.convert(post.body)
# ...
I also had to modify the HTML template to flag the markdown to be rendered as safe:
<p>{{ post.body|safe | linebreaks }}</p>
For some reason the markdown is still pretty ugly, so I'll have to see if this could be fixed by a template.
While the change to the code was relatively simple, I struggled a bit with figuring out what the local development workflow should be. I ran into two issues.
poetry
to manage the environment, and for some reason Django was not installed, so I had to reinstall everything with poetry install --no-root
. The --no-root
was due to the install erroring out when trying to install the project. I'm not sure if that is a problem but it ended up working fine. poetry run ./manage.py runserver
, I got an error relating to the database. I realized this was due to some changes I had made to the settings.py
file for deploying on Render. Notably, this entailed switching away from a SQLite db to postgres. I therefore had to figure out how to get postgres running (I downloaded the mac app, and ran postgres=# CREATE DATABASE personal_blog;
to get the db I needed.)So far this has been decent progress. I am realizing that:
On Jan. 19, 2024 Adrien wrote:
The linebreaks are massive. Why?
On Feb. 19, 2025 Celesta wrote:
https://jekyll.s3.us-east-005.backblazeb2.com/20241213-1/research/je-tall-sf-marketing-(111).html
Knowing a little bit about what you’d wish to put on might help you narrow down your choices.
On April 23, 2025 Elida wrote:
https://filedn.eu/l46Ju9IQhhQ84ifWoIzEYnJ/digi111sa/research/digi111sa-(466).html
I was very impressed to see that there are classy and elegant outfits for all plus size girls.
On June 13, 2025 Cathleen wrote:
https://storage.googleapis.com/digi153sa/research/digi153sa-(332).html
Her mother, Rita, opted for this champagne-hued gown that was equally as ethereal.
On June 21, 2025 Whitney wrote:
https://filedn.eu/l4uw5uiN1qUR9BCabqOgPER/cz-marketing-111/research/cz-marketing-(404).html
For a seashore marriage ceremony I would put on one thing a bit more flowy like the flowery and ruffly attire above.
On June 23, 2025 Garrett wrote:
https://digi479sa.s3.us-east-005.backblazeb2.com/research/digi479sa-(162).html
Light, sunny, and normally stuffed with flowers, and they often use pastel colors inspired by springtime blooms.
On June 24, 2025 Major wrote:
https://cz-marketing-146.sgp1.digitaloceanspaces.com/research/je-tall-sf-marketing-(294).html
Everyone is conscious of you're the bride, so don't be
concerned about your mother sporting white or a full skirt alongside you.
On June 28, 2025 Brigida wrote:
https://elio191.wordpress.com/2025/06/16/2/
Check out the guide for excellent ideas and ideas, and get ready
to chop a dash at your daughter’s D-day.
On July 5, 2025 Keeley wrote:
https://digi562sa.z1.web.core.windows.net/research/digi562sa-(317).html
A stylishly easy event gown printed with romantic florals,
good for the mom of the bride.
On July 5, 2025 Marsha wrote:
https://digi23sa.syd1.digitaloceanspaces.com/research/digi23sa-(405).html
Inspired by Old Hollywood glamour, it'll match right in at a black tie wedding.
On July 10, 2025 Jacquelyn wrote:
https://digi15sa.sfo3.digitaloceanspaces.com/research/digi15sa-(43).html
This fashion is obtainable in a good choice of colors from neutrals and pastels to brights.
On July 27, 2025 Loretta wrote:
https://filedn.eu/lXvDNJGJo3S0aUrNKUTnNkb/marketing-279/research/je-tall-sf-marketing-(147).html
I assume each of the above might work with winery weddings.
On Aug. 2, 2025 Jolene wrote:
https://digi636sa.netlify.app/research/digi636sa-(436)
This will assist her discover the complementary ensemble and forestall her from being over or underdressed.
On Aug. 11, 2025 http://Boyarka-Inform.com/ wrote:
Hello! Someone in my Myspace group shared this site with us so I
came to give it a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers!
Great blog and wonderful design and style. http://Boyarka-Inform.com/
On Aug. 16, 2025 spevaws wrote:
Happy to join conversations, share thoughts, and learn something new as I go.
I like hearing diverse viewpoints and adding to the conversation when possible. Interested in hearing new ideas and meeting like-minded people.
That's my site-<a href="https://automisto24.com.ua/">AutoMisto24</a>
https://automisto24.com.ua/