I want to format my modelforms with bootstrap, and without any additional packages (just using the bootstrap source files). A particular form that I want configured:
class FoodForm(forms.ModelForm):
class Meta:
model = Food
fields = ['name', 'company']
exclude = ('user', 'edit')
The 'name' is a text field I'd want to be a bootstrap text field, and 'company' is a selection field (from a foreign key) that I'd want to be a bootstrap dropdown.
The current setup of the form template:
{% extends "mainsite/base.html" %}
{% block content %}
<form method="POST" class="post-form">{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary">Save</button>
</form>
</form>
{% endblock %}
What's best practice for formatting any django modelform field into bootstrap?