Small code cleanup. Fixed bad import

This commit is contained in:
John Mullins
2023-12-07 10:41:10 +11:00
parent 1cec36d593
commit 815baf2c59
2 changed files with 3 additions and 7 deletions
@@ -1,4 +1,5 @@
{% extends 'admin/base.html' %} {% block extrahead %}{{ block.super }}
{% extends 'admin/base.html' %}
{% block extrahead %}{{ block.super }}
{% load i18n static %}
<style>
:root {
+1 -6
View File
@@ -4,7 +4,7 @@ from django.shortcuts import render
from .context_helpers import *
from .email_helpers import render_to_pdf
from .form import SMSForm
from .utils.send_sms import SMSForm
@staff_member_required
@@ -26,13 +26,8 @@ def sms_message(request, queryset):
if request.method == 'POST':
form = SMSForm(request.POST)
if form.is_valid():
print("Hello world")
HttpResponseRedirect(request.get_full_path())
else:
print("Form not valid")
else:
print("Hello new world")
form = SMSForm()
return render(request, 'admin/sms_form.html', context={'form': form, 'travellers': queryset})