Skip to content

Commit

Permalink
Changed convention for modules storing AppConfigs.
Browse files Browse the repository at this point in the history
The app/apps dichotomy was more confusing than valuable.
  • Loading branch information
aaugustin committed Jan 2, 2014
1 parent 07711e9 commit 449ede0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/ref/applications.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ For application authors
If you're creating a pluggable app called "Rock ’n’ roll", here's how you
would provide a proper name for the admin::

# rock_n_roll/app.py
# rock_n_roll/apps.py

from django.apps import AppConfig

class RockNRollConfig(AppConfig):
name = 'rock_n_roll'
verbose_name = "Rock ’n’ roll"

You would then tell your users to add ``'rock_n_roll.app.RockNRollConfig'`` to
their :setting:`INSTALLED_APPS`.
You would then tell your users to add ``'rock_n_roll.apps.RockNRollConfig'``
to their :setting:`INSTALLED_APPS`.

The recommended convention is to put the configuration class in a submodule of
the application called ``app``. However, this isn't enforced by Django.
the application called ``apps``. However, this isn't enforced by Django.

You must include the :attr:`~django.apps.AppConfig.name` attribute for Django
to determine which application this configuration applies to. You can define
Expand Down

2 comments on commit 449ede0

@jezdez
Copy link
Contributor

@jezdez jezdez commented on 449ede0 Jan 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mjtamlyn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.