State of Progress logo

We are super excited today to announce Django Prose; an open source project we have been working on for a while in LOGIC. Django Prose makes it extremely easy to work with rich-text content in Django, our web framework of choice. Let’s take a deeper look into this.

We built Django Prose in order to provide us with a clean, robust and secure full stack solution to manage rich text content in our Django projects. Until now, we found no existing solution that covered all these needs. Let’s run through them quickly one by one.

Django Prose is super clean. All you need to do is:

  • Install it. Example: poetry add Django-prose.
  • Add it to Django’s INSTALLED_APPS settings.
  • Use the Document model or RichTextField directly in your own models.

Robustness is crucial for production applications. This is why Django Prose comes with a built-in Document model, where you can store large rich-text content, like a blog article’s body in a separate database table, while keeping query sets light.

Last, security is key and while not intuitive; rich text content editing can pose important security issues. Rich text is plain HTML rendered in the browser, this means that unguarded rich text (HTML) editing by users and publishing can lead to cross site scripting attacks. For that reason, Django Prose allows only the essential HTML tags and attributes for content editing and strips everything else.

We have also prepared a video showcasing how you can use Django Prose to build a blog supporting rich text content editing with Django from scratch, in just a few minutes.

What about production use? It’s already there! Django Prose sits at the heart of Remote Work Café, where we use it to edit location content, like the one we did for Amsterdam. On top of that, Django Prose is used in production by multiple clients of LOGIC, from small companies to the public sector.

We hope you find Django Prose as useful as we have! Of course, we would love to hear your feedback in our GitHub repository ( github.com/withlogicco/django-prose ) by opening up a discussion, or even Pull Requests with contributions to make it even better for you.

Share this article

Share on X

If you enjoyed this article, you can learn more about LOGIC at withlogic.co, check out our open source work at GitHub github.com/withlogicco and stay up to date with us on Twitter @withlogicco.