Django 3 Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

Creating an app configuration

Django projects consist of multiple Python modules called applications (or, more commonly, apps) that combine different modular functionalities. Each app can have models, views, forms, URL configurations, management commands, migrations, signals, tests, context processors, middlewares, and so on. The Django framework has an application registry, where all apps and models are collected and later used for configuration and introspection. Since Django 1.7, metainformation about apps can be saved in the AppConfig instance for each app. Let's create a sample magazine app to take a look at how to use the app configuration there.