Ask coding questions

← Back to all posts
How do I move python code to html code so that my python output runs on the web site.
DellWithGaming

So I have a login in system and I want that to be displayed on a website. This login in system is like put in the 5 digit code to get the discord link.

Answered by Debarchito [earned 5 cycles]
View Answer
Voters
DellWithGaming
Comments
hotnewtop
Debarchito

For the front-end, you need to use JavaScript. Python can't be used in your html code. Still you can check a project named "Brython". It's basically a JavaScripty-Python implementation in JavaScript.

Coder100

python is backend so the most you can do is make a flask webserver so you can run html applications. You can also try out django and brython.

DellWithGaming

@Coder100 Could you explain more

JakeHu2020

If you invite me I can help do that

SixBeeps

You could embed the Repl with outputonly set to 1.

I would honestly suggest learning a server backend framework like Django (as Coder suggested) if you really want to make it secure.

DellWithGaming

Could you give me an example
@SixBeeps

SixBeeps

@DellWithGaming An example of what?

DellWithGaming

How to embed the replit @SixBeeps

SixBeeps

@DellWithGaming I linked the official documentation on how to do that in my answer.

DellWithGaming

Okay thxs
@SixBeeps