0% found this document useful (0 votes)
49 views2 pages

Create Virtual Env Django

The document shows the steps to create a Django REST framework project: 1) Create a virtual environment and activate it. 2) Install Django and djangorestframework using pip. 3) Start a new Django project and app. 4) Add models, serializers, views, and configure URLs to set up the REST API.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views2 pages

Create Virtual Env Django

The document shows the steps to create a Django REST framework project: 1) Create a virtual environment and activate it. 2) Install Django and djangorestframework using pip. 3) Start a new Django project and app. 4) Add models, serializers, views, and configure URLs to set up the REST API.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

pip3.

9 install virtualenv //permet d’installer un environnement virtuel déjà


virtualenv venv //création d’environnement virtuel
source venv/bin/activate //activation du venv
pip3.9 install Django //installation de django
django-admin startproject myproject //commencer le projet django
pip3.9 install djangorestframework //installer djangorestframework
pwd
python3.9 [Link] runserver
ls
cd myproject
python3.9 [Link] runserver

pip3.9 install django


180 source venv/bin/activate
181 pip3.9 install django
182 ls
183 django-admin startproject mysite
184 cd mysite/
185 ls
186 cd ..
187 ls
188 cd mysite/
189 python3.9 [Link] runserver
190 python [Link] migrate
191 python3.9 [Link] runserver
192 ls
193 python3.9 [Link] startapp myapi
194 ls
195 vi mysite/[Link]
196 python3.9 [Link] migrate
197 vi myapi/[Link]
198 python3.9 [Link] migrate
199 python3.9 [Link] makemigrations
200 python3.9 [Link] migrate
201 vi myapi/[Link]
202 python3.9 [Link] runserver
203 python [Link] createsuperuser
204 python3.9 [Link] createsuperuser
205 python3.9 [Link] runserver
206 pip3.9 install djangorestframework
207 vi mysite/[Link]
208 ls
209 ls myapi/
210 touch myapi/[Link]
211 vi myapi/[Link]
212 vi myapi/[Link]
213 vi mysite/[Link]
214 vi myapi/[Link]
215 python3.9 [Link] runserver
216 vi mysite/[Link]
217 python3.9 [Link] runserver

You might also like