Hey guys. I'm having trouble with Crispy forms with my models. The form shows up plain without the bootstrap and there seems to be no save button which i need to save data to my model. I have tried many ways and tutorials but have failed. Any help would be highly appreciated!
forms.py
from django import forms
from crispy_forms.helper import FormHelper
from .models import Plot
class PlotForm(forms.ModelForm):
helper = FormHelper()
helper.form_tag = False
helper.form_method = 'POST'
class Meta:
model = Plot
fields = '__all__'
the html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Plot form</title>
</head>
<body>
{% load crispy_forms_tags %}
{% block content %}
{% crispy form %}
{% endblock %}
</body>
</html>
views.py
def plot_form(request):
return render(request, 'plot_form.html', {'form': PlotForm()})