This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
class TextareaWithValueHandling(forms.Textarea): | |
""" | |
Ugly hack to get a default value preset within a textarea. (not supported by django) | |
This template renders widget.attrs.value within the textarea body if there is no real value | |
""" | |
template_name = 'form/widget/textarea_with_value_handling.html' | |
class TheForm(forms.Form): |