Skip to content

Commit

Permalink
Merge pull request #87 from btimby/app-config-doc
Browse files Browse the repository at this point in the history
App config doc
  • Loading branch information
nshafer authored May 3, 2024
2 parents 1ec3544 + b9f55d8 commit 263dc1a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ Care must be given, as this will alter ALL models in your project. Usually you w
Also, since this changes the auto-generated field, only global settings will be used for that field. If you desire
specific settings for different models, then using this setting is not advised.

Django may configure the per-app `default_auto_field` when a new app is created. This will prevent the global setting
from taking affect. If you are attempting to use the global setting, you should check your app configs in
`project/app_name/apps.py` to ensure they don't interfere.

.. code-block:: python
from django.apps import AppConfig
class ScheduleConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'schedule'
Global Settings
---------------

Expand Down

0 comments on commit 263dc1a

Please sign in to comment.