Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. Django is the most popular Python framework for web development. It’s a full-stack framework and includes all the necessary features by default instead of offering them as separate libraries.
Django and Ruby on Rails — two of the leading backend web development frameworks and both open source — have been on the scene since the mid-2000s. They’re no longer the trendy young bucks in web development, but they are still the seventh and 11th most-loved web frameworks respectively.
The browser sends a Http request to the server. The server does its magic and dumps the request via the CGI to django (?) Some part of django (which?) receives the request and turns it into a django request object.
Create A Virtual Environment:
A virtual environment is a Python environment such that the Python interpreter, libraries and scripts installed into it are isolated from those installed in other virtual environments, and (by default) any libraries installed in a “system” Python, i.e., one which is installed as part of your operating system.
python3 -m venv env # mac, linux
python -m virtualenv env # windows
source env/bin/activate
Now Install Django:
pip is used to install module in windows and pip3 is used to install module in macbook, ubntu, linux.
Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.
Django For mac:
pip3 install Django # mac, linux
Django For Windows:
pip install Django # windows
Start Project:
django-admin startproject mysite
Run Server:
Django is an extremely popular and fully featured server-side web framework, written in Python. This module shows you why Django is one of the most popular web server frameworks, how to set up a development environment, and how to start using it to create your own web applications.
cd mysite
python3 manage.py runserver # mac, linux
python manage.py runserver #windows
2 Comments
[…] This framework, developed by Google, is a comprehensive platform for building single-page applications and mobile […]
[…] is a framework for managing complex projects that emphasizes collaboration, accountability, and continuous […]