failing to redirect

when a user submits the form, it does not redirect the user to the success page nor does it bring any message indcating that one has successfully created an appointment. Note that the information is properly being saved in the database.
my views

from pyexpat.errors import messages
from django.shortcuts import redirect, render
from django.http import HttpResponse
from django.contrib import messages
from .forms import AppointmentForm
from .models import *
from django.core.mail import send_mail
from datetime import datetime
from django import forms
from django.core.exceptions import ValidationError
from django.utils.dateparse import parse_date, parse_time
from django.http import HttpResponseRedirect
from django.urls import reverse

# Create your views here.
def home(request):
   form = AppointmentForm()  # Create an instance of the form
   return render(request, 'index.html', {'form': form})

def about(request):
   return render(request,'about.html')

def services(request):
   return render(request,'services.html')

def pricing(request):
   return render(request,'pricing.html')

def contact(request):
   return render(request,'contact.html')

def appointment(request):
   return render(request, 'appointment.html') 

def success_view(request):
   return render(request, 'success.html')   
def store(request):
   return render(request, 'store.html')

def create_appointment(request):
   if request.method == 'POST':
       form = AppointmentForm(request.POST)
       if form.is_valid():
           # Log the form data
           messages.success(request, 'Appointment created successfully.')
           return HttpResponseRedirect('/success/') 
           messages.error(request, 'Error submitting the form. Please check the entered data.')
       form = AppointmentForm()

   return render(request, 'index.html', {'form': form})

my urls
from django import views
from django.urls import path
from .views import *

urlpatterns = [
   path('', home, name='home'),
   path('about/', about, name='about'),
   path('services/', services, name='services'),
   path('pricing/', pricing, name='pricing'),
   path('contact/', contact, name='contact'),
   path('success/', success_view, name='success_view'),
   path('create_appointment/', create_appointment, name='create_appointment'),

I’m a little confused by what you have posted here.

What’s the purpose of this home view? How does this differ from the create_appointment view? (Why do you appear to have two views showing the same template with the same form?)

What does the form tag look like in your index.html template?

i experienced an error earlier, where if i click on make an appointment in my browser on the form would not load but when i enter the form would load. so i made modifications to my views for the form to load on when i want to reach it instead of me having to type in my browser

Then have your “empty” url run the create_appointment view instead of home.

how do you mean sir?, and will that solve the redirect issue i am facing?