web/quotes: format oops

This commit is contained in:
Luke Granger-Brown 2021-01-20 22:48:41 +00:00
parent 2d634def1c
commit da459ee5c1

View file

@ -23,11 +23,11 @@ def show_quote(request, quote_id):
class AddQuoteForm(ModelForm): class AddQuoteForm(ModelForm):
class Meta: class Meta:
model = models.Quote model = models.Quote
fields = ['quote'] fields = ["quote"]
def add_quote(request): def add_quote(request):
if request.method == 'POST': if request.method == "POST":
form = AddQuoteForm(request.POST) form = AddQuoteForm(request.POST)
if form.is_valid(): if form.is_valid():
new_quote = form.save(commit=False) new_quote = form.save(commit=False)
@ -38,4 +38,3 @@ def add_quote(request):
form = AddQuoteForm() form = AddQuoteForm()
return render(request, "quotedb/new.html", {"form": form}) return render(request, "quotedb/new.html", {"form": form})