Skip to content

Use Query is always loading? #239

Discussion options

You must be logged in to vote

There was a typo in the docs, thank you for noticing this. I will fix the docs ASAP.

rendered_items = html.ul([html.li(item, key=item) for item in item_query.data])

needs to be changed to

rendered_items = html.ul([html.li(item, key=item.pk) for item in item_query.data])

The reason is key=... must always be a unique immutable value.

The value item.pk is both a string and unique.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@danieludokike
Comment options

@danieludokike
Comment options

@Archmonger
Comment options

Answer selected by Archmonger
@danieludokike
Comment options

@danieludokike
Comment options

@danieludokike
Comment options

@Archmonger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants