We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3
Full-Stack Development (21CS62)
LAB COMPONENT SOLUTIONS
Module-1: 1. Installation of Python, Django and Visual Studio code editors can be demonstrated. I. Python download and installation Link:
https://www.python.org/downloads/
II. Visual Studio Code download and installation link
https://code.visualstudio.com/
III. Django installation:
Open a command prompt and type following command:
>pip install django
2. Creation of virtual environment, Django project and App should be
demonstrated 1) Create project folder Create a new folder and name it as django_lab Within the folder django_lab, in the command line, type cmd and it will open command prompt. In the command prompt, execute the command:
>python -m venv env
It creates a virtual environment.
2) Install python extension
In vs code, go to extensions and check for python extension and install it
3) Go to Fileopen folder Select the Project folderdjango_lab.
4) Go to view command palette
Select python interpreter (python: select interpreter) virtual environment venv(python 3.12.3(‘env’:venv)) 5) Create Django project: 1. Goto terminal new terminal Before using Django command, Execute the command:
>pip install django
Django elements will be retrieved and installed.
2. Create project by executing command:
>django-admin startproject p .
It creates manage.py in the project folder which is used to execute
administrative commands. (“.” represents current directory) 3. Run the server, to launch the project.
>python manage.py runserver
The server runs on the default port 8000(127.0.0.1:8000), it will open