In this repository, I followed a Django tutorial from the official site. Here is the link: https://docs.djangoproject.com/en/4.0/intro/tutorial01/
This README provides the log what I've done with this repository. This repository also the result of my study in that tutorial.
Table of Content
See this link to see the full explanation: https://docs.djangoproject.com/en/4.0/intro/tutorial01/
Let's start this learn by creating your virtual environment (venv). Please refer to this link to see how to make it: https://gist.github.com/ryumada/c22133988fd1c22a66e4ed1b23eca233
The result in terminal view showing virtual environment name:
pip install -r requirement.txt
django-admin startproject mysite
Change the directory into mysite, then running this command:
python manage.py runserver
This will run the server into http://127.0.0.1:8000.
If you want to run the server on another port, you can run a command like this:
python manage.py runserver 8080
If you want the server listens to all available public IP with port 8000:
python manage.py runserver 0:8080
0 is a shortcut of 0.0.0.0
Make sure you are in the same directory as manage.py
, then type this command.
python manage.py startapp polls
That'll create a new directory polls.
In this tutorial, I've finished the first Django's tutorial01. Next time I will do the next part at this link: https://docs.djangoproject.com/en/4.0/intro/tutorial02/