Avatar ·

Python when should you use async and when await?

📁 Advanced Python Topics, asyncio

When should you use async and when await?

Avatar ·

Since no one figured out how to implement this - I'll have to explain it myself. The values that are generated in HayStack and processed in the template are not suitable for a dropdown list as such, so these values need to be redirected to a form, and the logic should be described in the form. To do this: 1. Create a special {{tag}} that will receive values from the dictionary, and add it to the Template. It will look like this -

{% load choice_tags %}

In the tag itself, you need to specify the form.

@register.assignment_tag()def choice_form(request,field):    form_class = addToChoiceForm

And one more

Log in to leave an answer

Blogs