Hi, On Tue, 6 Aug 2013 20:19:01 -0700 (PDT) Muhammed TÜFEKYAPAN <muhammed...@gmail.com> wrote: > def home(request): > output = Excuse.objects.order_by('?')[:1]
[:1] selects all elements from the beginning up to the first and returns that list. true, its a list with only one member, but still a list. You want [0] to get the first element of the list/set that Excuse.objects.order_by returns. > template = loader.get_template('index.html') > context = {'output': output} > return render(request, 'index.html', context) > > I get output like this: [<Excuse: BlaBla>] > i just want to blabla section and how i get away from [<Excuse:>] Have fun, Arnold
signature.asc
Description: PGP signature