MacbookPro2017 13inch macOS Catalina 10.15.6 Python 3.6 Djanngo version 3.1.1 ← I forgot to write the installation procedure. I may write it soon.
This time, create a django folder and create a project in it. Enter the following at the command prompt.
$ mkdir django
$ cd django
After moving to the "django" folder, enter the following to create the project. This time, the project name is "project1".
$ django-admin startproject project1
After execution, move to the created project1 folder and check the file.
$ cd project1
$ ls
manage.py project1
In addition, go to the project1 folder inside the project1 folder and check the files.
$ cd project1
$ ls
__init__.py asgi.py settings.py urls.py wsgi.py
After confirming that the above files have been created, go back to the folder above and start the Django server and check the operation.
$ cd ..
$ python3.6 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
September 13, 2020 - 07:31:30
Django version 3.1.1, using settings 'project1.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
When the server can be started, enter "http://127.0.0.1:8000/" in the browser. If you see an image of the rocket and the words "The install worked successfully! Congratulations!", You are successful.
After confirming the operation, you can stop the server by pressing Control + C at the command prompt.
Recommended Posts