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

PODMAN

Spread the love 1.Introduction Podman: The Modern Container

Running Your Java Program (JAR) 24/7 on AWS EC2 Automatically

Spread the love Introduction Running a Java application

Building a REST API with Spring Boot

Spread the love Introduction REST (Representational State

Custom API to Fetch Customer Data by Customer ID in Spryker

Spread the love Introduction In this blog post, we will

Creating a Custom Module for a Custom Frontend Page in Spryker

Spread the love To create a custom module for a custom

How to create custom module api get category list without access token in Spryker

Spread the love To create a custom API for fetching a

Creating a Custom Glue API in Spryker

Spread the love Spryker’s Glue API is a powerful tool

Get AI Generated 360-Degree View of Account Summary in Dynamics 365 Sales

Spread the love Navigating the demanding landscape of sales

Enhancing Productivity with Dynamics 365: The Power of Session Restore

Spread the love Enhancing Productivity with Dynamics 365:

Salesforce Admin

Spread the love In our last blog, we discussed common

bluethinkinc Blogs