summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorSean Wang <sean@decrypted.org>2015-02-18 19:19:21 -0800
committerTim Graham <timograham@gmail.com>2015-02-22 09:36:51 -0500
commitf0780df608e2a8db487ac6e80d37d53d2912580d (patch)
tree0b138fd10333d09325873a50545039c08fda100a /docs/ref
parent1feeefe918e0f6ea6d633855549310dd149baed5 (diff)
[1.8.x] Fixed #24358 -- Corrected code-block directives for console sessions.
Backport of eba6dff581aa8bd6a1c08456e83e68ad09ae4ec3 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/gis/install/geolibs.txt2
-rw-r--r--docs/ref/contrib/gis/tutorial.txt34
-rw-r--r--docs/ref/django-admin.txt2
3 files changed, 19 insertions, 19 deletions
diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt
index 4cc2730e51..9ebea30283 100644
--- a/docs/ref/contrib/gis/install/geolibs.txt
+++ b/docs/ref/contrib/gis/install/geolibs.txt
@@ -58,7 +58,7 @@ __ http://www.gaia-gis.it/gaia-sins/
On Debian/Ubuntu, you are advised to install the following packages which will
install, directly or by dependency, the required geospatial libraries:
-.. code-block:: bash
+.. code-block:: console
$ sudo apt-get install binutils libproj-dev gdal-bin
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt
index eb11721c12..c13ef28ebd 100644
--- a/docs/ref/contrib/gis/tutorial.txt
+++ b/docs/ref/contrib/gis/tutorial.txt
@@ -56,7 +56,7 @@ First, create a spatial database for your project.
If you are using PostGIS, create the database from the :ref:`spatial database
template <spatialdb_template>`:
-.. code-block:: bash
+.. code-block:: console
$ createdb -T template_postgis geodjango
@@ -66,7 +66,7 @@ template <spatialdb_template>`:
create a database. To create a user with ``CREATE DATABASE`` privileges in
PostgreSQL, use the following commands:
- .. code-block:: bash
+ .. code-block:: console
$ sudo su - postgres
$ createuser --createdb geo
@@ -84,14 +84,14 @@ Create a New Project
Use the standard ``django-admin`` script to create a project called
``geodjango``:
-.. code-block:: bash
+.. code-block:: console
$ django-admin startproject geodjango
This will initialize a new project. Now, create a ``world`` Django application
within the ``geodjango`` project:
-.. code-block:: bash
+.. code-block:: console
$ cd geodjango
$ python manage.py startapp world
@@ -137,7 +137,7 @@ The world borders data is available in this `zip file`__. Create a ``data``
directory in the ``world`` application, download the world borders data, and
unzip. On GNU/Linux platforms, use the following commands:
-.. code-block:: bash
+.. code-block:: console
$ mkdir world/data
$ cd world/data
@@ -166,7 +166,7 @@ Use ``ogrinfo`` to examine spatial data
The GDAL ``ogrinfo`` utility allows examining the metadata of shapefiles or
other vector data sources:
-.. code-block:: bash
+.. code-block:: console
$ ogrinfo world/data/TM_WORLD_BORDERS-0.3.shp
INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp'
@@ -177,7 +177,7 @@ other vector data sources:
layer contains polygon data. To find out more, we'll specify the layer name
and use the ``-so`` option to get only the important summary information:
-.. code-block:: bash
+.. code-block:: console
$ ogrinfo -so world/data/TM_WORLD_BORDERS-0.3.shp TM_WORLD_BORDERS-0.3
INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp'
@@ -267,7 +267,7 @@ Run ``migrate``
After defining your model, you need to sync it with the database. First,
create a database migration:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py makemigrations
Migrations for 'world':
@@ -277,7 +277,7 @@ create a database migration:
Let's look at the SQL that will generate the table for the ``WorldBorder``
model:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py sqlmigrate world 0001
@@ -314,7 +314,7 @@ This command should produce the following output:
If this looks correct, run :djadmin:`migrate` to create this table in the
database:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py migrate
Operations to perform:
@@ -351,7 +351,7 @@ library that can work with all the vector data sources that OGR supports.
First, invoke the Django shell:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py shell
@@ -515,7 +515,7 @@ A few notes about what's going on:
Afterwards, invoke the Django shell from the ``geodjango`` project directory:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py shell
@@ -537,7 +537,7 @@ and generates a model definition and ``LayerMapping`` dictionary automatically.
The general usage of the command goes as follows:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py ogrinspect [options] <data_source> <model_name> [options]
@@ -548,7 +548,7 @@ be used to further define how the model is generated.
For example, the following command nearly reproduces the ``WorldBorder`` model
and mapping dictionary created above, automatically:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py ogrinspect world/data/TM_WORLD_BORDERS-0.3.shp WorldBorder \
--srid=4326 --mapping --multi
@@ -609,7 +609,7 @@ GeoDjango adds spatial lookups to the Django ORM. For example, you
can find the country in the ``WorldBorder`` table that contains
a particular point. First, fire up the management shell:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py shell
@@ -753,13 +753,13 @@ Next, edit your ``urls.py`` in the ``geodjango`` application folder as follows::
Create an admin user:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py createsuperuser
Next, start up the Django development server:
-.. code-block:: bash
+.. code-block:: console
$ python manage.py runserver
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 66caf8bf0f..82c143a6e8 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -47,7 +47,7 @@ be consistent, but any example can use ``manage.py`` just as well.
Usage
=====
-.. code-block:: bash
+.. code-block:: console
$ django-admin <command> [options]
$ manage.py <command> [options]