Some python files print while others don't

My wont print into the console and i’m using the django template. Only whatevers in the django template is printed but i dont need any of that to be printed i just need to be printed.
Repl link:

And by the way all of is correct and fully functional, it just wont print into the console because of the django template and i have no idea why.

What are you using django for? Could you use a blank repl?

I’m using django for uptimerobot so the repl doesn’t go down. I’ve used flask but I think django is better than flask.

The .replit config on the django template makes it run instead of Just use a normal python repl. For keep-alive you can use a minimal webserver: at the start of your code:

from http import server
import multiprocessing

class Server(server.BaseHTTPRequestHandler):
    # Override the log_request function to prevent spammy logging output
    def log_request(_, __):

    def do_HEAD(self):
    do_GET = do_HEAD 

    target=server.ThreadingHTTPServer(("", 80), Server).serve_forever
1 Like

Oh alright, that works too. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.