$ source django/bin/activate
// Move to the directory where you want to create the project and create it
(django) [*****]$ django-admin startproject hellodjango
(django) [*****]$ ls hellodjango/
hellodjango manage.py
(django) [*****]$ ls hellodjango/hellodjango/
__init__.py __pycache__ asgi.py settings.py urls.py wsgi.py
--hellodjango (outside): Just a container for your project. This name has nothing to do with Django, so you can change it to whatever you like --manage.py: Command line utility for performing various operations on the project --hellodjango (inside): The actual Python package for your project --init.py: An empty file to let you know that this directory is a Python package --settings.py: project settings file --urls.py: Django project URL declaration (= equivalent to the "table of contents" on the Django site) --wsgi.py: Entry point with WSGI compatible web server for serving projects
Reference: Creating your first Django app
(django) [*****]$ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 17 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.
December 16, 2019 - 14:06:33
Django version 3.0, using settings 'hellodjango.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
ttp://127.0.0.1:8000/
The install worked successfully! Congratulations! Is displayed, it is successful!
// Move to the directory where manage.py is and execute
$ python manage.py startapp hello
Set various things ...
python manage.py migrate
Recommended Posts