blob: 623643fcb24dda4621910ab23f945da514748366 (
plain)
1
2
3
4
5
6
7
8
|
from django.forms import TextInput
from django.utils.safestring import mark_safe
class ThreadPickWidget(TextInput):
def render(self, name, value, attrs=None):
html = super(ThreadPickWidget, self).render(name, value, attrs)
html = html + ' <button class="btn attachThreadButton" id="btn_%s">Find thread</button>' % name
return mark_safe(html)
|