Answer the question
In order to leave comments, you need to log in
Where to start learning web development in Python, for a person who is completely unfamiliar with the backend?
I recently completed a Python course at Codecademy. But the course does not teach web development.
I myself studied HTML, CSS, JS as well as Jquery (on the same codecademy) and Bootstrap (on youtube).
I downloaded google app engine, but I'm not sure that learning web development will go faster with it.
Answer the question
In order to leave comments, you need to log in
Working with the web differs from working with non-web in one simple thing:
- the server (Apache, Njinx, etc.) receives a request (and the request is a string) from the browser,
- the server accesses the application, passing this string as an argument to it ,
- the application returns the result (also a string),
- the server sends the received string to the browser.
Specifically for python, such connection of the script to the web server is solved using WSGI .
How to do it. In the web server settings, you specify the document_root of your application and the script with the callback. Apache config:
<VirtualHost *:80>
ServerName mysite
DocumentRoot /var/sites/mysite/public
WSGIScriptAlias / /var/sites/mysite/script.wsgi
</VirtualHost>
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
<VirtualHost *:80>
ServerName mysite
DocumentRoot /var/sites/mysite/public
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule (.*) /index.py/$1 [L,QSA,PT]
WSGIScriptAlias /index.py /var/sites/mysite/script.wsgi
</VirtualHost>
It's better to start with Django. There is a good Django book on the subject. Detailed guide
It is worth starting with this book http://www.ozon.ru/context/detail/id/5730448/
Further http://www.ozon.ru/context/detail/id/8382738/ and http://www.ozon .ru/context/detail/id/8382719/
The first volume on the basics of the language, the subtleties of python are very well described. The two volumes talk about developing web applications, GUI, multithreading in Python. Then just read the Django documentation, there you can say a whole book and everything is described in great detail. I also advise you to read this book https://django.2scoops.org/
Here is a good Python book: Building Applications
and More Developing Geo-Apps with Python
I have little experience in python programming under Google App Engine (AE). I'll just describe how I learned.
At first, I myself tried to read and understand the AE documentation for a long time. I didn’t have enough knowledge of python, or rather, I wasn’t sure that I could write. Then came courses from udacity.
First I took a course in Python. The course is in English, but because everything is visualized, then everything is clear with minimal knowledge. Then I took a course in web programming there. I learned the basic concepts and that was enough.
Now about AE specific knowledge, they can be obtained from the documentation (in English) and videos from conferences, there are not many of them and they are very informative. For example, how to build a data model on a datastore.
Everyone here strongly advises Django, but I have never had a moment when I lacked the functionality of webapp2, which was made by Google. In general, you decide.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question