Answer the question
In order to leave comments, you need to log in
How to pass slug to forms.py?
Is there a form like this, how can I pull the slug from views and pass it to forms.py ?
forms.py
class AddAvailabilityForm(forms.Form):
servers = forms.ModelChoiceField(queryset=Servers.objects.filter(id_num=slug)) - как сюда передать слаг
Answer the question
In order to leave comments, you need to log in
how to pass slug hereright here, no way. And in the last question you were told how to do it through name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question