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

Customize lead qualification for a seamless experience

Spread the love When the 2024 Release Wave 2 was launched,

Create a Custom Console Command in Spryker

Spread the love In Spryker, developers can create custom

SALESFORCE

Spread the love Salesforce is a cloud-based software

CRUD Operation in Spryker Backoffice with a Custom Module

Spread the love Spryker is a highly flexible and modular

How to create custom module on Spryker for Backoffice?

Spread the love Creating a custom module in Spryker

How to Install Spryker Project with Docker on Local Machine

Spread the love Spryker is a flexible and scalable commerce

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

bluethinkinc Blogs