mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
[4.2.x] Refs #34140 -- Applied rst code-block to non-Python examples.
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for
reviews.
Backport of 534ac48297 from main.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4a89aa25c9
commit
b784768eef
@@ -30,15 +30,17 @@ connection:
|
||||
Auto-generate the models
|
||||
========================
|
||||
|
||||
.. highlight:: bash
|
||||
|
||||
Django comes with a utility called :djadmin:`inspectdb` that can create models
|
||||
by introspecting an existing database. You can view the output by running this
|
||||
command::
|
||||
command:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ python manage.py inspectdb
|
||||
|
||||
Save this as a file by using standard Unix output redirection::
|
||||
Save this as a file by using standard Unix output redirection:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ python manage.py inspectdb > models.py
|
||||
|
||||
@@ -68,7 +70,9 @@ Install the core Django tables
|
||||
==============================
|
||||
|
||||
Next, run the :djadmin:`migrate` command to install any extra needed database
|
||||
records such as admin permissions and content types::
|
||||
records such as admin permissions and content types:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ python manage.py migrate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user