python - Django want to display help_text -


hello display text in model forms called alternate_id. seem having trouble this. might have written in response context.

forms.py

alternate_id = forms.charfield(label = 'client no', max_length = 400, required = false, help_text = 'valid wildcard search in format *xx, *xx*, xx*') 

views.py

def search_item(request, client_id = 0):     # search form code     return render_to_response('search_items.html', {'form':form, 'form.alternate_id':form.alternate_id}, context_instance = requestcontext(request)) 

search_items.html

<form action="." method="post">         <fieldset class="model">                 {{ form.as_p }}                 {{ form.alternate_id.help_text }}         </fieldset> 

maybe should try removing form.alternate_id':form.alternate_id context dict. form should contain alternate_id field , text.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -