Skip to content
Advertisement

How to remove the querysets ‘< [ (code markers?)’ for html (Django)

Am trying to just get a list of the made up gigs, (and hopefully make them links, to view them in a different html).

Page result right now looks like this;

<QuerySet [<Gig: Fulltime assistent needed from fall 2021!>, <Gig: Looking for event staff!>]>

I don’t know how to remove queryset ‘code markers(or what are they called?)’. Just want the gig names listed. How can I fix that, to just show the gig titles?

This is my code:

Html:

JavaScript

Views:

JavaScript

Model:

JavaScript

Advertisement

Answer

You iterate over the gigs, so:

JavaScript

In that case it will thus make a query, and enumerate over the Gigs wrapped in the queryset. Each gig is then rendered individually.

Advertisement