Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Please excuse my level of inexperience and help me out please

I’m currently trying to deploy a very very basic website if you can even call it that to heroku just to make sure it’ll work. I was able to successfully load my one index.html file located in a templates folder within the GitHub repository I am using to deploy. The file contains links to other html files within that same templates folder. Now the index.html file loads fine but the links to the html files result in a Not Found Error.

My current app.py program looks like this:

#DEPLOY VERSION_v1.0.1 null(1)
from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy


app= Flask(__name__)


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


if __name__ == '__main__':
app.run()




How would I go about fixing this error?

P.s. you can ignore my import lines at the very beginning, they’re for use later.

/r/flask
https://redd.it/id61ka
How does Flask actually run in practice? Question about how the code actually executes when deployed.

I'm writing a simple app with Flask that I want to deploy and I'm confused about how this actually runs when it's been deployed. I have a strong feeling this is a case of me not knowing what questions I need to ask/"I don't know what I don't know."

I want to deploy this using Google App Engine because it seems very user-friendly and I'm a noob, and I found an excellent tutorial on how to deploy there and it seems like a perfect fit for my project.

I want the code within the for-loop to be run once per day, not when a user accesses the website - this is the issue that's leading me into confusion.

Here's my code and my questions are at the bottom. Thanks in advance for your help :)

from flask import Flask, rendertemplate
from getshows import get
shows
import pandas as pd
from time import sleep
from datetime import datetime


app = Flask(name)

# declare the global variable for storing show info

/r/flask
https://redd.it/1fnpumr