How to inline radio buttons in a django form?

Here's the radio buttons:

account_type = forms.ChoiceField(
    choices=enumerate(('Choice 1', 'Choice 2')),
        {'class': 'form-check form-check-inline', 'style': 'margin-left: 20px'}

I'm using bootstrap-nightshade for styling which possibly contains something that prevents inlining the buttons. So far I tried:

display: inline


display: inline-block;



Nothing works. Here's the template of the form

{% extends 'index.html' %}
{% load bootstrap5 %}

{% block content %}
    <section class="h-100">
        <div class="container h-100">
            <div class="row justify-content-sm-center h-100">
                <div class="col-xxl-4 col-xl-5 col-lg-5 col-md-7 col-sm-9">
                    <div class="card shadow-lg">
                        <div class="card-body p-5">
                            <h4>{{ form_title }}</h4>
                            <form method="post">
                                {% csrf_token %}
                                {% bootstrap_form form %}
                                <button class="btn btn-success">{{ form_title }}</button>
                                {% if form_title == 'Sign in' %}
                                    <a style="margin-left: 15px" href={% url 'reset-password' %}>Forgot password?</a>
                                {% endif %}
{% endblock %}

and here's how they are rendered:

<div class="mb-3">
    <div class="form-check form-check-inline" id="id_choices">
            <label for="id_choices_0"><input class="form-check form-check-inline" id="id_choices_0"
                                                  name="choices" required="" style="margin-left: 20px" title=""
                                                  type="radio" value="0">
                Choice 1</label>
            <label for="id_choices_1"><input class="form-check form-check-inline" id="id_choices_1"
                                                  name="choices" required="" style="margin-left: 20px" title=""
                                                  type="radio" value="1">
                Choice 2</label>


Back to Top