How to install and setup django
- If you haven't installed python3 in your desktop then first install python3 in your dekstop from python official website.
1. Open command shell of your computer.
2. set virtual environment
Creating a virtual environment for django project is good because it keeps your django dependency and computer root files separate which will enable you to edit dependency. So, first create a virtual environment in your system using this command.
python3 venv env
3. Change directory to env by this command
cd env
4. now activate the virtual environment by this command
Activate
5. Install django with pip using this command.
Pip install django
6. Create a project by this command.
Django-admin startproject myproject
7. Change the directory to myproject
Cd myproject
8. Now run the server by this command
Python manage.py runserver
9. now your django project is ready to go
Visit http://127.0.0.1/
Your django project is working
What is django?
Django is a python based web framework which allows you to create applications in python without any dependency problem.
It is simpler to create websites using django than any language or package from scratch.
You don't need to install any other dependencies to run django that is why it is so easy to use.
Features of django
- Django is a framework which can be used with any database such as MySQL, sqlite, etc.
- Django is a secure framework, it will keep your website safe from malwares.
- It is very easy to use, you don't need to write codes from basic level to create a website.
- Django is completely free, you don't need to pay anything to use and create a website in django.
- It is easily scalable framework, if your website traffic increases much then you can easily scale your website.
Instagram and Disqus are two Django based products that have millions of active users, this is taken as an example of the scalability of Django.
- it can built almost any type of website, it can also work with any client side framework and can deliver content in any format such as HTML, JSON, etc.
No comments:
Post a Comment