Django

Code

Changeset 2781

Show
Ignore:
Timestamp:
04/28/06 20:50:35 (2 years ago)
Author:
adrian
Message:

magic-removal: Proofread docs/legacy_databases.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/docs/legacy_databases.txt

    r2711 r2781  
    4646Save this as a file by using standard Unix output redirection:: 
    4747 
    48     django-admin.py inspectdb --settings=path.to.settings > appname.py 
     48    django-admin.py inspectdb --settings=path.to.settings > models.py 
    4949 
    5050This feature is meant as a shortcut, not as definitive model generation. See 
    5151the `django-admin.py documentation`_ for more information. 
    5252 
    53 Once you've cleaned up the model, put the module in the ``models`` directory of 
    54 your app, and add it to your ``INSTALLED_APPS`` setting. 
     53Once you've cleaned up your models, name the file ``models.py`` and put it in 
     54the Python package that holds your app. Then add the app to your 
     55``INSTALLED_APPS`` setting. 
    5556 
    5657.. _django-admin.py documentation: http://www.djangoproject.com/documentation/django_admin/ 
     
    5960============================== 
    6061 
    61 Next, run the ``django-admin.py init`` command to install Django's core tables 
    62 in your database:: 
     62Next, run the ``manage.py syncdb`` command to install any extra needed database 
     63records such as admin permissions and content types:: 
    6364 
    6465    django-admin.py init --settings=path.to.settings 
    65  
    66 This won't work if your database already contains tables that have any of the 
    67 following names: 
    68  
    69     * ``django_site`` 
    70     * ``django_content_type`` 
    71     * ``django_sessions`` 
    72     * ``auth_permission`` 
    73     * ``auth_group`` 
    74     * ``auth_user`` 
    75     * ``auth_message`` 
    76     * ``auth_group_permissions`` 
    77     * ``auth_user_groups`` 
    78     * ``auth_user_user_permission`` 
    79  
    80 If that's the case, try renaming one of your tables to resolve naming 
    81 conflicts. Currently, there's no way of customizing the names of Django's 
    82 database tables without editing Django's source code itself. 
    83  
    84 Install metadata about your app 
    85 =============================== 
    86  
    87 Django has a couple of database tables that contain metadata about your apps. 
    88 You'll need to execute the SQL output by this command:: 
    89  
    90     django-admin.py sqlinitialdata [appname] --settings=path.to.settings 
    9166 
    9267See whether it worked