mercredi 20 octobre 2021

How to load assets into flask angular app

Hi I am trying to run a website using angular and flask. I am really new to flask, and I am having trouble including the assets file into the static folder. This is my main python file app.py:

from flask import Flask,render_template

app = Flask(__name__)

@app.route('/')
def hello():
    return render_template('index.html')

app.run()

I have executed the following command: C:\Users\Angel\PycharmProjects\Ubay\frontend>ng build --base-href /static/ and generated all the static and the template folders to run the app with flask. However when I run the app, all the assets contained in the static folder are not loaded.

actual static folder

When I run the app the assets file is not loaded




Aucun commentaire:

Enregistrer un commentaire