diff options
author | Sean Wang <sean@decrypted.org> | 2015-02-18 19:19:21 -0800 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-02-22 09:35:39 -0500 |
commit | eba6dff581aa8bd6a1c08456e83e68ad09ae4ec3 (patch) | |
tree | ab96fd1185101181e572d72ed40deb93b7ff2d60 /docs/intro | |
parent | ea3168dc6ced391d848c511a14cfcecfeac9d401 (diff) | |
download | django-eba6dff581aa8bd6a1c08456e83e68ad09ae4ec3.tar.gz |
Fixed #24358 -- Corrected code-block directives for console sessions.
Diffstat (limited to 'docs/intro')
-rw-r--r-- | docs/intro/overview.txt | 2 | ||||
-rw-r--r-- | docs/intro/tutorial01.txt | 22 | ||||
-rw-r--r-- | docs/intro/tutorial02.txt | 6 | ||||
-rw-r--r-- | docs/intro/whatsnext.txt | 6 |
4 files changed, 18 insertions, 18 deletions
diff --git a/docs/intro/overview.txt b/docs/intro/overview.txt index f8aea47890..e9f574a4f5 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -51,7 +51,7 @@ Install it Next, run the Django command-line utility to create the database tables automatically: -.. code-block:: bash +.. code-block:: console $ python manage.py migrate diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index bfce99de0b..e03febcced 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -15,7 +15,7 @@ It'll consist of two parts: We'll assume you have :doc:`Django installed </intro/install>` already. You can tell Django is installed and which version by running the following command: -.. code-block:: bash +.. code-block:: console $ python -c "import django; print(django.get_version())" @@ -51,7 +51,7 @@ 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-block:: bash +.. code-block:: console $ django-admin startproject mysite @@ -190,7 +190,7 @@ Some of these applications makes use of at least one database table, though, so we need to create the tables in the database before we can use them. To do that, run the following command: -.. code-block:: bash +.. code-block:: console $ python manage.py migrate @@ -217,7 +217,7 @@ 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: -.. code-block:: bash +.. code-block:: console $ python manage.py runserver @@ -255,7 +255,7 @@ It worked! it as a command-line argument. For instance, this command starts the server on port 8080: - .. code-block:: bash + .. code-block:: console $ python manage.py runserver 8080 @@ -263,7 +263,7 @@ It worked! listen on all public IPs (useful if you want to show off your work on other computers), use: - .. code-block:: bash + .. code-block:: console $ python manage.py runserver 0.0.0.0:8000 @@ -305,7 +305,7 @@ imported as its own top-level module, rather than a submodule of ``mysite``. To create your app, make sure you're in the same directory as :file:`manage.py` and type this command: -.. code-block:: bash +.. code-block:: console $ python manage.py startapp polls @@ -434,7 +434,7 @@ look like this: Now Django knows to include the ``polls`` app. Let's run another command: -.. code-block:: bash +.. code-block:: console $ python manage.py makemigrations polls @@ -464,7 +464,7 @@ schema automatically - that's called :djadmin:`migrate`, and we'll come to it in moment - but first, let's see what SQL that migration would run. The :djadmin:`sqlmigrate` command takes migration names and returns their SQL: -.. code-block:: bash +.. code-block:: console $ python manage.py sqlmigrate polls 0001 @@ -534,7 +534,7 @@ your project without making migrations or touching the database. Now, run :djadmin:`migrate` again to create those model tables in your database: -.. code-block:: bash +.. code-block:: console $ python manage.py migrate Operations to perform: @@ -577,7 +577,7 @@ Playing with the API Now, let's hop into the interactive Python shell and play around with the free API Django gives you. To invoke the Python shell, use this command: -.. code-block:: bash +.. code-block:: console $ python manage.py shell diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index e45753b40f..3dacc62369 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -27,7 +27,7 @@ Creating an admin user First we'll need to create a user who can login to the admin site. Run the following command: -.. code-block:: bash +.. code-block:: console $ python manage.py createsuperuser @@ -60,7 +60,7 @@ server and explore it. Recall from Tutorial 1 that you start the development server like so: -.. code-block:: bash +.. code-block:: console $ python manage.py runserver @@ -522,7 +522,7 @@ template directory in the source code of Django itself If you have difficulty finding where the Django source files are located on your system, run the following command: - .. code-block:: bash + .. code-block:: console $ python -c " import sys diff --git a/docs/intro/whatsnext.txt b/docs/intro/whatsnext.txt index 6da2aa830b..dd89da7ebe 100644 --- a/docs/intro/whatsnext.txt +++ b/docs/intro/whatsnext.txt @@ -150,7 +150,7 @@ Unix ``grep`` utility to search for a phrase in all of the documentation. For example, this will show you each mention of the phrase "max_length" in any Django document: -.. code-block:: bash +.. code-block:: console $ grep -r max_length /path/to/django/docs/ @@ -163,14 +163,14 @@ You can get a local copy of the HTML documentation following a few easy steps: plain text to HTML. You'll need to install Sphinx by either downloading and installing the package from the Sphinx Web site, or with ``pip``: - .. code-block:: bash + .. code-block:: console $ pip install Sphinx * Then, just use the included ``Makefile`` to turn the documentation into HTML: - .. code-block:: bash + .. code-block:: console $ cd path/to/django/docs $ make html |