Small code cleanup. Fixed bad import
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user