diff options
| author | Meta <petmetic@gmail.com> | 2024-08-07 16:07:22 -0300 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2024-10-09 09:12:58 -0300 |
| commit | d2c74cfb48a3d29159732fb98e3c28a53572067f (patch) | |
| tree | 135f6a2508937266eb946845450d197601e33ad7 /docs/intro/tutorial01.txt | |
| parent | 2e3bc59fd3760de87952ec8fd6cd3694e8d9dc1c (diff) | |
Fixed #35502 -- Removed duplication of "mysite" directory name in intro docs.
Reorganized intro docs when explaining `django-admin startproject` to prevent
confusion when using "mysite" as both the top-level directory and the Django
project directory name.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Carlton Gibson <carlton@noumenal.es>
Diffstat (limited to 'docs/intro/tutorial01.txt')
| -rw-r--r-- | docs/intro/tutorial01.txt | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index d45fa6bcb6..041da0a404 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -48,14 +48,21 @@ including database configuration, Django-specific options and application-specific settings. From the command line, ``cd`` into a directory where you'd like to store your -code, then run the following command: +code and create a new directory named ``djangotutorial``. (This directory name +doesn't matter to Django; you can rename it to anything you like.) .. console:: - $ django-admin startproject mysite + $ mkdir djangotutorial -This will create a ``mysite`` directory in your current directory. If it didn't -work, see :ref:`troubleshooting-django-admin`. +Then, run the following command to bootstrap a new Django project: + +.. console:: + + $ django-admin startproject mysite djangotutorial + +This will create a project called ``mysite`` inside the ``djangotutorial`` +directory. If it didn't work, see :ref:`troubleshooting-django-admin`. .. note:: @@ -68,7 +75,7 @@ Let's look at what :djadmin:`startproject` created: .. code-block:: text - mysite/ + djangotutorial/ manage.py mysite/ __init__.py @@ -79,14 +86,11 @@ Let's look at what :djadmin:`startproject` created: These files are: -* The outer :file:`mysite/` root directory is a container for your project. Its - name doesn't matter to Django; you can rename it to anything you like. - * :file:`manage.py`: A command-line utility that lets you interact with this Django project in various ways. You can read all the details about :file:`manage.py` in :doc:`/ref/django-admin`. -* The inner :file:`mysite/` directory is the actual Python package for your +* :file:`mysite/`: A directory that is the actual Python package for your project. Its name is the Python package name you'll need to use to import anything inside it (e.g. ``mysite.urls``). @@ -111,8 +115,8 @@ These files are: The development server ====================== -Let's verify your Django project works. Change into the outer :file:`mysite` directory, if -you haven't already, and run the following commands: +Let's verify your Django project works. Change into the :file:`djangotutorial` +directory, if you haven't already, and run the following commands: .. console:: @@ -182,10 +186,8 @@ rather than creating directories. configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects. -Your apps can live anywhere on your :ref:`Python path <tut-searchpath>`. In -this tutorial, we'll create our poll app in the same directory as your -:file:`manage.py` file so that it can be imported as its own top-level module, -rather than a submodule of ``mysite``. +Your apps can live anywhere in your :ref:`Python path <tut-searchpath>`. In +this tutorial, we'll create our poll app inside the ``djangotutorial`` folder. To create your app, make sure you're in the same directory as :file:`manage.py` and type this command: |
