Django

Code

Changeset 7388

Show
Ignore:
Timestamp:
03/30/08 08:35:12 (3 months ago)
Author:
ubernostrum
Message:

Fixed #6927: Corrected documentation describing when and why the auth application creates default permissions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/authentication.txt

    r7294 r7388  
    820820------------------- 
    821821 
    822 Three basic permissions -- add, change and delete -- are automatically created 
    823 for each Django model that has a ``class Admin`` set. Behind the scenes, these 
    824 permissions are added to the ``auth_permission`` database table when you run 
    825 ``manage.py syncdb``. 
    826  
    827 Note that if your model doesn't have ``class Admin`` set when you run 
    828 ``syncdb``, the permissions won't be created. If you initialize your database 
    829 and add ``class Admin`` to models after the fact, you'll need to run 
    830 ``manage.py syncdb`` again. It will create any missing permissions for 
    831 all of your installed apps. 
     822When ``django.contrib.auth`` is listed in your ``INSTALLED_APPS`` 
     823setting, it will ensure that three default permissions -- add, change 
     824and delete -- are created for each Django model defined in one of your 
     825installed applications. 
     826 
     827These permissions will be created when you run ``manage.py syncdb``; 
     828the first time you run ``syncdb`` after adding ``django.contrib.auth`` 
     829to ``INSTALLED_APPS``, the default permissions will be created for all 
     830previously-installed models, as well as for any new models being 
     831installed at that time. Afterward, it will create default permissions 
     832for new models each time you run ``manage.py syncdb``. 
    832833 
    833834Custom permissions