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:38:54 -0500 |
| commit | a3f7b034d7a8dacc117fef4d2237d63ec2274cba (patch) | |
| tree | e28d0ad56ac06ee92d88b54e627b2fc4f2129491 /docs/topics | |
| parent | c231ec1af0c40f17b67fbd6d6af34b2d8b7a9616 (diff) | |
[1.7.x] Fixed #24358 -- Corrected code-block directives for console sessions.
Backport of eba6dff581aa8bd6a1c08456e83e68ad09ae4ec3 from master
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/i18n/timezones.txt | 2 | ||||
| -rw-r--r-- | docs/topics/install.txt | 24 | ||||
| -rw-r--r-- | docs/topics/testing/tools.txt | 16 |
3 files changed, 21 insertions, 21 deletions
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt index 7baa67310e..f2b7c30a74 100644 --- a/docs/topics/i18n/timezones.txt +++ b/docs/topics/i18n/timezones.txt @@ -34,7 +34,7 @@ but may not be mandatory depending on your particular database backend, operating system and time zone. If you encounter an exception querying dates or times, please try installing it before filing a bug. It's as simple as: -.. code-block:: bash +.. code-block:: console $ sudo pip install pytz diff --git a/docs/topics/install.txt b/docs/topics/install.txt index 61ea28ae77..3da5ee713e 100644 --- a/docs/topics/install.txt +++ b/docs/topics/install.txt @@ -140,9 +140,9 @@ uninstalling is as simple as deleting the ``django`` directory from your Python ``site-packages``. To find the directory you need to remove, you can run the following at your shell prompt (not the interactive Python prompt): -.. code-block:: bash +.. code-block:: console - python -c "import sys; sys.path = sys.path[1:]; import django; print(django.__path__)" + $ python -c "import sys; sys.path = sys.path[1:]; import django; print(django.__path__)" .. _install-django-code: @@ -256,18 +256,18 @@ latest bug fixes and improvements, follow these instructions: 2. Check out Django's main development branch (the 'trunk' or 'master') like so: - .. code-block:: bash + .. code-block:: console - git clone git://github.com/django/django.git django-trunk + $ git clone git://github.com/django/django.git django-trunk This will create a directory ``django-trunk`` in your current directory. 3. Make sure that the Python interpreter can load Django's code. The most convenient way to do this is via pip_. Run the following command: - .. code-block:: bash + .. code-block:: console - sudo pip install -e django-trunk/ + $ sudo pip install -e django-trunk/ (If using a virtualenv_ you can omit ``sudo``.) @@ -302,9 +302,9 @@ with a checkout of Django's latest code in it. Then add a ``.pth`` file containing the full path to the ``django-trunk`` directory to your system's ``site-packages`` directory. For example, on a Unix-like system: -.. code-block:: bash +.. code-block:: console - echo WORKING-DIR/django-trunk > SITE-PACKAGES-DIR/django.pth + $ echo WORKING-DIR/django-trunk > SITE-PACKAGES-DIR/django.pth In the above line, change ``WORKING-DIR/django-trunk`` to match the full path to your new ``django-trunk`` directory, and change ``SITE-PACKAGES-DIR`` to @@ -314,9 +314,9 @@ The location of the ``site-packages`` directory depends on the operating system, and the location in which Python was installed. To find your system's ``site-packages`` location, execute the following: -.. code-block:: bash +.. code-block:: console - python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" + $ python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" (Note that this should be run from a shell prompt, not a Python interactive prompt.) @@ -334,9 +334,9 @@ On Unix-like systems, create a symbolic link to the file ``django-trunk/django/bin/django-admin.py`` in a directory on your system path, such as ``/usr/local/bin``. For example: -.. code-block:: bash +.. code-block:: console - ln -s WORKING-DIR/django-trunk/django/bin/django-admin.py /usr/local/bin/ + $ ln -s WORKING-DIR/django-trunk/django/bin/django-admin.py /usr/local/bin/ (In the above line, change WORKING-DIR to match the full path to your new ``django-trunk`` directory.) diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index fcb7775c7f..99a4634c1c 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -677,9 +677,9 @@ to change the default address (in the case, for example, where the 8081 port is already taken) then you may pass a different one to the :djadmin:`test` command via the :djadminopt:`--liveserver` option, for example: -.. code-block:: bash +.. code-block:: console - ./manage.py test --liveserver=localhost:8082 + $ ./manage.py test --liveserver=localhost:8082 Another way of changing the default server address is by setting the `DJANGO_LIVE_TEST_SERVER_ADDRESS` environment variable somewhere in your @@ -697,9 +697,9 @@ tests might randomly fail with an "Address already in use" error. To avoid this problem, you can pass a comma-separated list of ports or ranges of ports (at least as many as the number of potential parallel processes). For example: -.. code-block:: bash +.. code-block:: console - ./manage.py test --liveserver=localhost:8082,8090-8100,9000-9200,7041 + $ ./manage.py test --liveserver=localhost:8082,8090-8100,9000-9200,7041 Then, during test execution, each new live test server will try every specified port until it finds one that is free and takes it. @@ -710,9 +710,9 @@ To demonstrate how to use ``LiveServerTestCase``, let's write a simple Selenium test. First of all, you need to install the `selenium package`_ into your Python path: -.. code-block:: bash +.. code-block:: console - pip install selenium + $ pip install selenium Then, add a ``LiveServerTestCase``-based test to your app's tests module (for example: ``myapp/tests.py``). The code for this test may look as follows: @@ -745,9 +745,9 @@ Then, add a ``LiveServerTestCase``-based test to your app's tests module Finally, you may run the test as follows: -.. code-block:: bash +.. code-block:: console - ./manage.py test myapp.tests.MySeleniumTests.test_login + $ ./manage.py test myapp.tests.MySeleniumTests.test_login This example will automatically open Firefox then go to the login page, enter the credentials and press the "Log in" button. Selenium offers other drivers in |
