I have retrived some data by retreival from database and saved in into variable DATA `
def sendApproval(request):
form = SendApp
data = Profile.objects.filter(Admin="Lavanya")
context = { "form": form,"data":data}
return render(request, 'homePageHtml/SendApproval.html', context)
` And then in the html templete I used that data to represent it as checkboxes
`
{%for a in data%}<br>
<input type="checkbox" id="recommender" name="choosen" value="{{a.UserName}}" >
<label for="recommender" style="font-size:15px"> {{a.UserName}}</label><br><br>
{%endfor%}
`
and after viewing it on web page it is visible like this:
Any one with the solution will be appreciated! Thanks in advance
I tried:
`
.adjust-line-height {
line-height: 1em;
}
` adding this into my code, but this didn't work....
CodePudding user response:
I believe that you can reduce the < br > amount in the HTML part, something like:
{%for a in data%}<br>
<input type="checkbox" id="recommender" name="choosen" value="{{a.UserName}}" >
<label for="recommender" style="font-size:15px"> {{a.UserName}}</label><br>
{%endfor%}