aaravcreator / django_ism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making the folder and setting up Django Project in Virtual Environment

  • 1.Make a new folder
mkdir myproject
  • 2.Go to that folder
cd myproject
  • 3.Make a Virtual Environment
python -m venv djangoenv

here djangoenv is the name of environment.

    1. Activate the environment
      In Linux/Unix system source djangoenv/bin/activate

In Windows using command prompt

djangoenv\Scripts\activate

If using git bash terminal you can execute cd djangoenv and then . Scripts/activate

if the environment is activated you can see (djangoenv) in the terminal
Now go to project folder by executing cd .. only if you are inside environment folder use ls or pwd command to check your location

install django

pip install django

Create Django Project

django-admin startproject testproject .

Here testproject is the name of django project and . tells to create the project in current folder i.e myproject \

Now you can see files and folder created

  • testproject
  • manage.py

You can run the development server using command python manage.py runserver

About


Languages

Language:Python 51.2%Language:HTML 48.8%