Python + Django Project Setup: [In Linux operating system]

Blog
Spread the love
This blog refers to Installation of Python and Django framework in users machine and create a project using Django framework

> In your system must have python installed

> Install any IDE like (VS code, Pycharm, etc.)

Step 1: Create a separate folder in your system where you want to place your project.

Step 2: Now Before Installing any dependencies just create virtual environment using this command:

virtualenv name_of_virtualenv(venv)

Step 3: Activate virtual environment which you created just before using this command:

source venv/bin/activate

Step 4: Now Install Django using this command:

pip3 install django

Step 5: Next step is creating a project using this command:

django-admin startproject project_name.

Step 6: Now You can create number of applications in that project as per your requirements using this command:

python3 manage.py startapp app_name

Step 7: Now you have added all application name inside settings.py file in

Step 8: Now you have to run make migrations command to generate sql for models:

python3 manage.py makemigrations

Step 9: For Finally reflect changes related to model on databases you have to run:

python3 manage.py migrate

Step 10: Now you can run your project using this command:

python3 manage.py runserver

Python Django

Step 11: You can also change default port using this command:

python3 manage.py runserver 9000

Step 12: You can also take all dependencies with version details using this command:

pip3 freeze > requirements.txt

Stay tuned with us for more interesting articles and fun fact related to Python and Django Veni vidi vici …..

bluethinkinc_blog

bluethinkinc_blog

2022-07-14

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

bluethinkinc Blogs