Reputation: 1
I'm very new to django web development in python and I'm currently following a course on building a simple django website.
The problem is, I went to sleep and decided to shut down my computer. And now I think I need to reactivate the website or something because the website just says 'This site can't be reached'.
I opened up the code and I'm not sure if I'm suppose to write a certain command in the terminal or something. The terminal is empty when before it was running the website and had stuff there.
I do understand that it is going to stop running the website when I shut down my computer because it's my computer hosting it, but I just need to know how to start running it again.
So how do I 're-activate' a django website?
Upvotes: 0
Views: 776
Reputation: 1
You need to activate your virtual environment first and then run your Django server.
To activate a Python virtual environment:
source venv/bin/activate
Note: Here "venv" is your virtual environment folder name
To run your Django server go to the project directory and run the below command
python manage.py runserver
or
python3 manage.py runserver
Upvotes: 1