How to get started in web development with Python?
2018-06-28 09:19:00 UTC
How to get started in web development with Python?
Four answers:
2018-07-02 03:36:32 UTC
Python is not used for web development (basic).

Web sites/pages are built with HTML, CSS and Javascript.
2018-06-28 16:52:52 UTC
1. Learn Python.

This is the language you asked about. Good choice, imho.

2. Learn HTML/CSS.

You don't need to become a web designer, but you do need to know the basics of HTML/CSS since one of the primary jobs of the server side of a web application is to deliver customized HTML/CSS (and often in-line JS) to a browser.

3. Learn the basics of JavaScript.

Same idea. You don't need to be a front-end developer, but you will need to have some interactivity on the client side, and any nontrivial sites you study will have client-side interactivity implemented in JS code.

4. Learn Django and/or Flask.

A framework helps to handle the messy details of parsing browser requests and sending the customized document.

An early answer suggested Flask, so I include it. Django is a much more mature project with more documentation and how-to information (over 170k posts on StackOverflow for the "django" tag, compared to under 24k for "flask") and has been through 13 release cycles compared to 2 or 3 for Flask.

5. Learn SQL and relational database concepts.

Any information that needs to persist beyond the current session needs to be stored in a filesystem somewhere. By far, the most common way to do this is with a database, and by far the most common type of database is relational--using some form of SQL as the language to communicate with the database server.

6. Learn AJAX concepts, plus JSON (JavaScript Object Notation)

This is last and might be optional. If your web application has any dynamic content; or if you just want to perform transactions without reloading a whole web page, you'll need this. AJAX stands for "Asynchronous JavaScript And XML" and it's the most common way (the *only* common way, afaik) to manage data transactions between the web server and JS code running in the browser. The original idea encoded data with XML, but nearly everyone uses JSON as a lightweight alternative for encoding structured data.

You'll need to learn how to put all of that together. Studying sample sites that have source code available and can be copied onto your test server, then experimenting with modifications (adding new pages, changing existing features, adding new ones) is one good way, but may be challenging if you don't have much of a programming background.
David Clarke
2018-06-28 10:21:39 UTC
take a course and you will go from there
2018-06-28 09:48:32 UTC
Learn flask:

This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.