Re: showing the checked item alone in template

2013-07-17 Thread Sivaram R
Tom, It is multiplechoice checkbox,it is saving the checked item in number againsted theor respective reportperson_id. The functionality is working only required is to show the saved number into human redable format.Any idea how to do this . Thanks On Wednesday, July 17, 2013 5:26:55 PM UTC+5

Re: showing the checked item alone in template

2013-07-17 Thread Tom Evans
On Mon, Jul 15, 2013 at 3:16 PM, Sivaram R wrote: > forms.py > > PERSON_ACTIONS = ( > ('1', '01.Allowed to rest and returned to class'), > ('2', '02.Contacted parents /guardians'), > ('3', '02a.- Unable to Contact'), > ('4', '02b.Unavailable - left message'),) > > class PersonActio

Re: showing the checked item alone in template

2013-07-17 Thread Lukas Nemec
I meant like this: views.py: form = PersonActionsForm() actions = form.fields['actions'] # set checked_choice to None checked_choice = None for choice in actions.choices: # if choice.selected (confirm this against request.POST) checked_choice = choice return render_to_response(

Re: showing the checked item alone in template

2013-07-17 Thread Sivaram R
Can you provide me a sample or related url for reference purpose.I don't know how to right custom templatetag for this. Thanks On Tuesday, July 16, 2013 11:54:17 AM UTC+5:30, Lukáš Němec wrote: > > You should do something like this (I havent tried it but it should work): > > 1. you are missing t

Re: showing the checked item alone in template

2013-07-16 Thread Lukáš Němec
You should do something like this (I havent tried it but it should work): 1. you are missing this in forms.py class Meta: model = Actions 2. then you can do this in your views: form = PersonActionsForm() actions = form.fields['actions'] for choice in actions.choices: # do something

Re: showing the checked item alone in template

2013-07-15 Thread Sivaram R
Hi,can i get any answer or let me know the way to do this. Thanks On Monday, July 15, 2013 7:46:43 PM UTC+5:30, Sivaram R wrote: > > forms.py > > PERSON_ACTIONS = ( > ('1', '01.Allowed to rest and returned to class'), > ('2', '02.Contacted parents /guardians'), > ('3', '02a.- Unable t