Hello one! This is Ponta, a Shiba Inu. I had yogurt topped on dog food today! The sourness worked and it was the best.
Today I would like to create and run a Django project. However, it doesn't have a server, so it's on a Ponta Mac. First, let's enter the Python virtual environment created yesterday.
(venv_dog) Ponta@venv_dog # django-admin startproject shiba_app
(venv_dog) Ponta@venv_dog #
Here, "shiba_app" will be the name of the project.
(venv_dog) Ponta@venv_dog # ls
bin include lib pyvenv.cfg shiba_app
A directory called shiba_app has been created.
(venv_dog) Ponta@venv_dog # cd shiba_app
(venv_dog) Ponta@shiba_app # tree
.
├── manage.py
└── shiba_app
├── __init__.py
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
1 directory, 6 files
Inside shiba_app is the file "manage.py" and the directory "shiba_app". Django has the ability to launch a local web server where you can test your Django project. Eh, is the web server in the local environment strange in Japanese? Excuse me. I'm a dog, so I don't know the details. Let's start a local web server!
(venv_dog) Ponta@shiba_app # python 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.
August 22, 2020 - 12:54:34
Django version 3.1, using settings 'shiba_app.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
I got a lot of messages. Will it be okay. Did you forget to migrate! I was told something like that. Well, it says "Starting development server at http://127.0.0.1:8000/" and it seems to have worked for the time being! Of course I will try to access it, one!
Oh! "The install worked successfully! Congratulations!"! The display of the terminal is as follows.
[22/Aug/2020 12:58:51] "GET / HTTP/1.1" 200 16351
[22/Aug/2020 12:58:51] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[22/Aug/2020 12:58:51] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[22/Aug/2020 12:58:51] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
[22/Aug/2020 12:58:51] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692
HTTP status code 200 (OK) is returned properly.
So, for now, I'd like to shut down the server and take a rest. Control-C at the terminal! The prompt came back properly.
See you later! Bye bye!
Recommended Posts