خرید بک لینک

Vote count: 0

I have been working with django-crispy-forms a while ago and I want to know if there is a way to set the positioning of the inputs like the col-md-XX classes or something to make it looks better and not just like a list of fields.

Here is an example:

This is a "normal" render of a crispy-form using {{ form | crispy }} or {% crispy form %} enter image description here

I want to be rendered like this with python code in the forms.py or something like that. Actually I make this by typing HTML code and rendering with as_crispy_field tag. enter image description here

Finally when I render the form with {% crispy form %} I can have the radio buttons with inline style, but with as_crispy_field tag, the radios still looking vertical, even with the InlineRadios layout in the helper.

With as_crispy_field enter image description here

With {% crispy form %} enter image description here

Is there a way to make radios looks horizontal or inline with as_crispy_field tag?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 22 ارديبهشت 1395 ساعت: 8:50

صفحه بندی