Hi, I’m working a website which has a blog component. Here is my model:
title = models.CharField(max_length=500)
slug = models.SlugField(max_length=200, unique_for_date='publish')
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE,)
content = models.TextField()
publish = models.DateField(default=timezone.now)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='draft')
It is up and working, no problem.
I’m having a difficult time figuring out how I can markup the content I enter in the “content” model.
When it renders all of the text is inline and I can’t figure out how to format/add space to the output or how to use HTML to style. My understanding is the content is being dynamically rendered from my database. Is it even possible to mark that content up or do I need to take a different approach? Any feedback on best practices? Not really sure what to do from here.
This is how it’s rendered on the site: