Hello,
I have two models:
class Currency(models.Model):
...
available = models.BooleanField()
class Offer(models.Model):
...
currency = models.ForeignKey('Currency')
I make a form from the Offer model:
class OfferForm(ModelForm):
class Meta:
model = Offer
How can I add an attribute tag with the value `currency.available` to
each `<option>` from the `<select>` `Currency` widget?
(I am also open to solutions using external apps (like
django-crispy-forms))
(This question has also been asked on stackoverflow:
http://stackoverflow.com/q/27474719/1011154 )
Best regards
Jonathan Dan