We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello team, first of all I would like to thank you for a great product.
I've got a custom widget for displaying stored credit cards in the store:
from django.forms import RadioSelect class PaymentCardRadioSelect(RadioSelect): template_name = "forms/widgets/card_radio.html" option_template_name = "forms/widgets/card_radio_option.html"
When using my widget in the form:
from django import forms from .widgets import PaymentCardRadioSelect class FondyPaymentForm(forms.Form): card = forms.ChoiceField( choices=(), label=_("Card"), widget=PaymentCardRadioSelect() ) def __init__(self, *args, **kwargs): cards = kwargs.pop("cards", ()) super().__init__(*args, **kwargs) self.fields["card"].choices = cards
When I'm rendering the form, this line in renderers is being executed and it overrides the custom template that I have for card selection.
This happens because:
pw = PaymentCardRadioSelect() assert isinstance(pw, RadioSelect) # evaluates to `True`
What is the recommended way of handling those scenarios?
Cheers, p
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello team, first of all I would like to thank you for a great product.
I've got a custom widget for displaying stored credit cards in the store:
When using my widget in the form:
When I'm rendering the form, this line in renderers is being executed and it overrides the custom template that I have for card selection.
This happens because:
What is the recommended way of handling those scenarios?
Cheers,
p
The text was updated successfully, but these errors were encountered: