0Pricing
Django Academy · Lezione

Registrare le app in INSTALLED_APPS

Informi Django della nuova app

Registrare le app in INSTALLED_APPS è una lezione Django Academy gratuita su CoddyKit. Questa è la lezione 2 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Django Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Django Academy include 4 lezioni in totale.

Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.

Django Must Be Told

Creating an app folder is not enough. Django only activates an app once you add it to the INSTALLED_APPS list in settings.

Find the List

Open settings.py and look near the top for INSTALLED_APPS. It is a plain Python list of strings, one per active app.

INSTALLED_APPS = [
    "django.contrib.admin",
]

Built-in Apps Are Already There

You will see entries like django.contrib.auth and admin. These ship with Django and power features you get for free.

Add Your App

To switch on your app, add its name as a string to the list. The simple form is just the app's folder name.

INSTALLED_APPS = [
    "django.contrib.admin",
    "blog",
]

The Cleaner AppConfig Path

The recommended form points to the config class in apps.py. Using the full AppConfig path is the modern Django convention.

INSTALLED_APPS = [
    "blog.apps.BlogConfig",
]

Why Registration Matters

Once registered, Django can find your models, templates, and admin entries. Skip this step and your features simply will not load.

Unlocks Migrations

Migrations only run for apps in the list. Without registration, makemigrations ignores your models and no tables get created.

Order Can Matter

Django reads INSTALLED_APPS top to bottom. Order rarely matters, but it can affect template and static file lookups when names clash.

Mind the Commas

It is a Python list, so every entry needs a trailing comma. A missing comma is a classic, confusing beginner error here.

Verify It Loaded

After editing, run the dev server. If Django starts without an error about your app, the registration worked correctly.

python manage.py runserver

Third-Party Apps Too

Installed packages like Django REST Framework also go in this list. Registering them is what turns a pip install into working features.

Quick Check

What happens to your app's models if you forget INSTALLED_APPS?

Recap: App Switched On

You added your app to INSTALLED_APPS, ideally via its AppConfig path. That one line lets Django load your models, admin, and migrations. ✅

Domande Frequenti

La lezione «Registrare le app in INSTALLED_APPS» è gratuita?

Sì — il testo completo di «Registrare le app in INSTALLED_APPS» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Django Academy, passa a CoddyKit PRO. Il corso Django Academy include 4 lezioni in totale.

Cosa imparerò in «Registrare le app in INSTALLED_APPS»?

Informi Django della nuova app Eserciti Django Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.

Ho bisogno di esperienza per iniziare Django Academy?

Non è richiesta alcuna esperienza precedente. Django Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 2 di 4.

Quanto tempo richiede la lezione «Registrare le app in INSTALLED_APPS»?

La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.

Posso scrivere ed eseguire codice in questa lezione Django Academy?

Sì. Ogni lezione Django Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.

Tutte le lezioni di questo corso

  1. startapp e struttura della cartella dell'app
  2. Registrare le app in INSTALLED_APPS
  3. Esplorare settings.py
  4. manage.py: il Suo centro di comando
← Torna a Django Academy