Redirecting Register page to Homepage FLASK

I’m building a website using Flask and I’m running into an issue where after creating an account the website doesn’t redirect me to the homepage.

from flask import Flask, render_template, url_for, flash, redirect
from forms import RegistrationForm, LoginForm
app = Flask(__name__)

posts = [
        'author': 'Corey',
        'title': 'blg post',
        'content': 'first post',
        'date_posted': 'april 20 2021'
        'author': 'Hus',
        'title': '2nd post',
        'content': '2nd post',
        'date_posted': 'May 20 2021'

def home():
    return render_template('home.html', posts=posts)

def about():
    return render_template('about.html', title='About')

@app.route("/register", methods=['GET', 'POST'])
def register():
    form = RegistrationForm()
    if form.validate_on_submit():
        flash(f'Account Created for {}!', 'success')
        return redirect(url_for('home'))
    return render_template('register.html', title='Register', form=form)

def login():
    form = LoginForm()
    return render_template('login.html', title ='Login', form=form)

if __name__ == '__main  __':

form page

from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import DataRequired, Length, Email, EqualTo

class RegistrationForm(FlaskForm):
    username = StringField('Username',
                           validators=[DataRequired(), Length(min=3, max=20)])
    email = StringField('Email', validators=[DataRequired(), Email()])

    password = PasswordField('Password', validators=[DataRequired()])
    confirm_password = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')])

    submit = SubmitField('Sign Up')

class LoginForm(FlaskForm):
    email = StringField('Email', validators=[DataRequired(), Email()])
    password = PasswordField('Password', validators=[DataRequired()])
    remember = BooleanField('Remember Me',)
    submit = SubmitField('Login')

registration page in html

{% extends "layout.html"%}
{% block content %}
    <div class="content-section">
        <form meethod="POST" action="">
            {{ form.hidden_tag() }}
            <fieldset class="form-group">
                <legend class="border-bottom mb-4">Join Today</legend>
                <div class="form-group">
                    {{ form.username.label(class="form-control-label") }}
                    {{ form.username(class="form-control form-control-lg") }}
                <div class="form-group">
                    {{"form-control-label") }}
                    {{"form-control form-control-lg") }}
                <div class="form-group">
                    {{ form.password.label(class="form-control-label") }}
                    {{ form.password(class="form-control form-control-lg") }}
                <div class="form-group">
                    {{ form.confirm_password.label(class="form-control-label") }}
                    {{ form.confirm_password(class="form-control form-control-lg") }}
            <div class="form-group">
                {{ form.submit(class="btn btn-outline-info") }}
    <div class="border-top pt-3">
        <small class="text-muted">
            Already Have an Account <a class="ml-2" href="{{ url_for('login') }}">Sign In</a>
{% endblock content %}

layout of the webiste

<!DOCTYPE html>
<html lang="en">
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href=""
          integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='static.css') }}">

    {% if title %}
    <title>Flask Blog - {{ title }}</title>
    {% else %}
    <title>Flask Blog</title>
    {% endif %}
    <header class="site-header">
      <nav class="navbar navbar-expand-md navbar-dark bg-steel fixed-top">
        <div class="container">
          <a class="navbar-brand mr-4" href="/">Flask Blog</a>
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle" aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          <div class="collapse navbar-collapse" id="navbarToggle">
            <div class="navbar-nav mr-auto">
              <a class="nav-item nav-link" href="/">Home</a>
              <a class="nav-item nav-link" href="/about">About</a>
            <!-- Navbar Right Side -->
            <div class="navbar-nav">
              <a class="nav-item nav-link" href="/login">Login</a>
              <a class="nav-item nav-link" href="/register">Register</a>
    <main role="main" class="container">
      <div class="row">
        <div class="col-md-8">
            {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                  {% for category, message in messages %}
                    <div class="alert alert-{{ category }}">
                        {{ message }}
                  {% endfor %}
                {% endif %}
            {% endwith %}
            {% block content %}{% endblock %}
        <div class="col-md-4">
          <div class="content-section">
            <h3>Our Sidebar</h3>
            <p class='text-muted'>You can put any information here you'd like.
                <li>Latest Posts</li>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src=""
    <script src=""
    <script src=""

After clicking the Sign up button on the Registration page, the page redirects me to the same page instead of to the home page.


In your registration page change

<form meethod="POST" action=""> 


<form method="POST" action="">