less than 1 minute read

How to reactivate the virtual environment and restart the server using the Powershell terminal when returning to a Django project.

Reactivate the virtual environment

Instructions on setting up a venv Python virtual environment for Django can be found on the project website.

In the PowerShell terminal, navigate to the project folder:


cd my-python-projects
cd my-django-project 

Reactivate the virtual environment:


my_django_project_venvironment\Scripts\activate 

The virtual environment name will appear in brackets at the beginning of the command line:


(my_django_project_venvironment) PS C: ... \my-python-projects\my-django-project>  


Restart the Server

Instructions on restarting the development server are given directly above the instructions for logging in and using the site in part four of the Mozilla MDN Local Library Tutorial.

In PowerShell terminal run the “manage” script to restart the server:


python manage.py runserver 

QED

© Adam Heinz

13 December 2023

Categories:

Updated: