CamelCamelCamel
CamelCamelCamel

Reputation: 5200

Django Admin :: HTML Input

In Django's admin panel: how do I add a form field that users can add unescaped HTML into?

Upvotes: 0

Views: 354

Answers (1)

Martin Thurau
Martin Thurau

Reputation: 7654

Use a standard TextField, the data gets saved unescaped. However, by default any data that is outputted in a template is automatically escaped. You can circumvent this by either disable autoescaping (bad idea!) by using the safe filter.

Upvotes: 1

Related Questions