0Pricing
Django Academy · درس

تسجيل التطبيقات في INSTALLED_APPS

اجعل Django على دراية بتطبيقك الجديد

تسجيل التطبيقات في INSTALLED_APPS درس مجاني في Django Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Django Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Django Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

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. ✅

الأسئلة الشائعة

هل درس «تسجيل التطبيقات في INSTALLED_APPS» مجاني؟

نعم — نص درس «تسجيل التطبيقات في INSTALLED_APPS» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Django Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Django Academy 4 دروس في المجموع.

ماذا ستتعلم في «تسجيل التطبيقات في INSTALLED_APPS»؟

اجعل Django على دراية بتطبيقك الجديد تتمرن على Django Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Django Academy؟

لا تُشترط خبرة سابقة. Django Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.

كم من الوقت يستغرق درس «تسجيل التطبيقات في INSTALLED_APPS»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Django Academy هذا؟

نعم. كل درس في Django Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. ‏startapp وتخطيط مجلد التطبيق
  2. تسجيل التطبيقات في INSTALLED_APPS
  3. جولة في settings.py
  4. ‏manage.py: مركز قيادة مشروعك
← العودة إلى Django Academy