Django help_text -


i put text in form.

class itemform(forms.modelform):       alternative_id = forms.charfield(max_length = 60, required = false, help_text = 'valid wildcard search in format *xx, *xx*, xx*') 

however not appear on page. because may need template tag somewhere?

edit: have written in template.

<div id="location_header">search items</div> <div id="form_container"> <form action="." method="post">         <fieldset class="model">                 {{ form.as_p }}                 {{ alternative_id.help_text }}         </fieldset>         <div id="form_footer">                 <input type="submit" value="search" >         </div>  </form> </div> 

help text still not appear. there way write text, while allowing django generate form?

putting {{ form.as_p }} (or {{ form }}) in template should display help_text without additional code, provided have form in context (but suppose if field on page).


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -