summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/widgets.py
diff options
context:
space:
mode:
authorMagnus Hagander2013-07-19 14:39:57 +0000
committerMagnus Hagander2013-07-19 14:39:57 +0000
commit520992c4ab012ee26f4f302b7cc15331e61746ba (patch)
tree4011c3e9e608ded69d77505d3af41a66218e8c93 /pgcommitfest/commitfest/widgets.py
parente71c90043dea5194ab1bbc82915d08cb8c7bcac5 (diff)
Break out the thread browsing functionality and create a widget for it
Also, move the javascript to a shared javascript file
Diffstat (limited to 'pgcommitfest/commitfest/widgets.py')
-rw-r--r--pgcommitfest/commitfest/widgets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pgcommitfest/commitfest/widgets.py b/pgcommitfest/commitfest/widgets.py
new file mode 100644
index 0000000..623643f
--- /dev/null
+++ b/pgcommitfest/commitfest/widgets.py
@@ -0,0 +1,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 + '&nbsp;<button class="btn attachThreadButton" id="btn_%s">Find thread</button>' % name
+ return mark_safe(html)