mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21116 -- Made usage of manage.py in docs more consistent.
Thanks daniel.quattro at gmail.com for the report.
This commit is contained in:
@@ -36,11 +36,11 @@ 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::
|
||||
|
||||
python manage.py inspectdb
|
||||
$ python manage.py inspectdb
|
||||
|
||||
Save this as a file by using standard Unix output redirection::
|
||||
|
||||
python manage.py inspectdb > models.py
|
||||
$ python manage.py inspectdb > models.py
|
||||
|
||||
This feature is meant as a shortcut, not as definitive model generation. See the
|
||||
:djadmin:`documentation of inspectdb <inspectdb>` for more information.
|
||||
@@ -59,12 +59,12 @@ this generated model definition:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
class Person(models.Model):
|
||||
id = models.IntegerField(primary_key=True)
|
||||
first_name = models.CharField(max_length=70)
|
||||
class Meta:
|
||||
**managed = False**
|
||||
db_table = 'CENSUS_PERSONS'
|
||||
class Person(models.Model):
|
||||
id = models.IntegerField(primary_key=True)
|
||||
first_name = models.CharField(max_length=70)
|
||||
class Meta:
|
||||
**managed = False**
|
||||
db_table = 'CENSUS_PERSONS'
|
||||
|
||||
If you wanted to modify existing data on your ``CENSUS_PERSONS`` SQL table
|
||||
with Django you'd need to change the ``managed`` option highlighted above to
|
||||
@@ -84,7 +84,7 @@ 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::
|
||||
|
||||
python manage.py migrate
|
||||
$ python manage.py migrate
|
||||
|
||||
Test and tweak
|
||||
==============
|
||||
|
||||
Reference in New Issue
Block a user