I should say that it is just a memorandum for myself. I wrote it to save you the trouble of learning Django Girls and the trouble of looking back at the previous page (for Windows).
DjangoGirls Go to the Django Girls tutorial. The code etc. that I will write from now on is quoted from the code posted on Django Girls.
python -m venv myvenv #Creating a virtual environment
myvenv\Scripts\activate #Start virtual environment
Command execution in virtual environment (myvenv)
python manage.py runserver
Command execution in virtual environment (myvenv)
python manage.py startapp blog
Command execution in virtual environment (myvenv)
python manage.py makemigrations blog #Tell Django about model changes
python manage.py migrate blog #Save edited file
Django admin Creating a superuser
python manage.py createsuperuser
I didn't know if I would type in the user name and email address as it is, so I entered the user name and email address that I usually use.
git init
git config --global user.name "your Name"
git config --global user.email [email protected]
From the dashboard screen, click Web (the part circled in red).
There's a link at Configration for ~ (circled in red in the image below) and you'll see the Django success screen. After that, if you add / admin to the URL, you will be taken to the Django administration screen. You may also want to read the Django Deployment Checklist (https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/) for future reference.
--When you use VSCode as an editor and write code as you go through Django, you may get a code error even though it's correct, but it's better to ignore it and not waste time. I think it's better to read the error message for the future, so read it. --If an error different from the tutorial is displayed, check that the import is done correctly and that the code you wrote is correct (such as incorrect word input). At worst, copying the tutorial code will solve it.
Recommended Posts