summaryrefslogtreecommitdiff
path: root/pgweb/util/helpers.py
diff options
context:
space:
mode:
authorMagnus Hagander2009-12-28 13:18:53 +0000
committerMagnus Hagander2009-12-28 13:18:53 +0000
commite41c85bd0047e52e02680e34e7a577751f9b3031 (patch)
tree0d70f98582b9349da69c9900a89f6024d5ae3197 /pgweb/util/helpers.py
parentab1b585e539bb14cc2a6dcedcfdfa46896f3a3df (diff)
Support short introductory text on a form driven from the model,
without the need to create a separate template. (Anything more advanced should still use a template, of course)
Diffstat (limited to 'pgweb/util/helpers.py')
-rw-r--r--pgweb/util/helpers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pgweb/util/helpers.py b/pgweb/util/helpers.py
index aa43aa65..126b271c 100644
--- a/pgweb/util/helpers.py
+++ b/pgweb/util/helpers.py
@@ -38,5 +38,6 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
'form': form,
'formitemtype': instance._meta.verbose_name,
'markdownfields': markdownfields,
+ 'form_intro': hasattr(form, 'form_intro') and form.form_intro or None,
}, NavContext(request, navsection))