(.venv) $ python manage.py migrate (.venv) $ python manage.py runserverĬonfirm everything worked by navigating to in your web browser. (.venv) $ django-admin startproject django_project. Normally I don't recommend running migrate on new projects until after a custom user model has been configured but in this tutorial, we will ignore that advice. Next, we can create a new project called django_project, migrate our database to initialize it, and use runserver to start the local server. venv /bin /activate (.venv) $ python3 -m pip install django venv\Scripts\Activate.ps1 (.venv) $ python -m pip install django # macOS $ python3 -m venv. venv $ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser $. We will follow the standard steps for creating a new Django project: make a dedicated virtual environment, activate it, and install Django. # Windows $ cd onedrive\desktop $ mkdir django -docker # macOS $ cd ~/desktop /code $ mkdir django -docker On the command line navigate to the desktop and create a new directory called django-docker. The code for this project can live anywhere on your computer but the Desktop is an easy location for teaching purposes. We can then proceed to configure a local Django set-up and then switch over to Docker. Docker is now properly installed on your computer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |