+ 1

How to use Python in Web design?

How do i use Python for web scripting instead of JavaScript and as well, change PHP for Django?

9th Mar 2019, 3:07 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
7 Respuestas
+ 2
Check out the django, flask framework tutorials on youtube to get an idea for how python can be used as web scripting language
9th Mar 2019, 3:29 PM
Sagar Agrawal
+ 3
JavaScript is the only language that can be used dynamically inside of webpages, but several languages have the ability to convert their code to JavaScript or template HTML or JavaScript code.
9th Mar 2019, 3:43 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 2
+1 for Django
9th Mar 2019, 3:41 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 2
Grasshopper Hell Monkey Browsers interpret JS code with JavaScript engines like SpiderMonkey or V8. The only language browsers will understand is JavaScript (and major browsers support WebAssembly but that's beside point). Because of this, languages like Kotlin or JS supersets like Typescript provide the means to convert their code into JS code so it works in a webpage. Without being converted to JS or WASM, Python and all other languages cannot be used within a webpage.
10th Mar 2019, 10:50 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 2
Grasshopper Hell Monkey Of course Python can be used for the web. It just has to be used as a *server -side* scripting language and not client side like JS. You can't just stick Python code into a <script> tag and call it good. You need to use a framework like Django. https://www.sololearn.com/learn/Python/2489/
11th Mar 2019, 7:57 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 1
Maxwell Anderson Can you explain it a little bit more?
9th Mar 2019, 3:46 PM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
+ 1
Maxwell Are you saying that Python can't be used for Web Programming? Cuz i think it's weird since it's stated on the first paragraph on the first module of the Python Basics on Solo Learn's Python course that it's able to use Python for Web Programming, besides i learned how to use Python for modifying archives, also you should check out the other pal's comment too. Still thanks for answering my question, besides you didn't helped get the answer i intended to. Sorry for wasting your time.
11th Mar 2019, 1:22 AM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar