0Pricing
Django Academy · Lektion

startapp und der Aufbau des App-Ordners

Wofür jede generierte Datei einer App gedacht ist.

startapp und der Aufbau des App-Ordners ist eine kostenlose Django Academy-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Django Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Django Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

Apps Are the Building Blocks

A Django project is made of small, focused pieces called apps. Each app handles one feature, like a blog or a shop. 🧱

Create One with startapp

You make a new app with the startapp command. Django generates a ready-to-edit folder so you never start from a blank page.

python manage.py startapp blog

The App Folder Appears

That command drops a blog/ folder next to manage.py. Inside are several files, each with one clear job that you will meet next.

models.py Holds Your Data

The models.py file is where you describe your data as Python classes. Each class becomes a database table later on.

class Post(models.Model):
    title = models.CharField(max_length=200)

views.py Handles Requests

The views.py file holds the logic that runs when a page is requested. A view takes a request and returns a response.

def home(request):
    return HttpResponse("Hello")

admin.py Powers the Admin

The admin.py file lets you register models so they show up in Django's built-in admin site for easy editing.

admin.site.register(Post)

apps.py Names the App

The apps.py file holds a small config class that gives your app its name and settings. You rarely touch it at first.

class BlogConfig(AppConfig):
    name = "blog"

tests.py for Confidence

The tests.py file is where your automated tests live. Writing tests here helps you change code without breaking things.

The migrations Folder

The migrations folder tracks how your database structure changes over time. Django fills it in automatically as your models evolve.

No urls.py Yet

Notice startapp does not create a urls.py for the app. You add one yourself when you want to route pages to your views.

Apps Are Reusable

Because each app is self-contained, you can lift a well-made app out of one project and drop it into another with little effort. ♻️

Quick Check

Which file does startapp create for your data models?

Recap: You Mapped an App

You ran startapp and learned each file's job: models for data, views for logic, admin and apps for config. Apps keep features tidy and reusable. 🎉

Häufig gestellte Fragen

Ist die Lektion „startapp und der Aufbau des App-Ordners“ kostenlos?

Ja — der vollständige Text von „startapp und der Aufbau des App-Ordners“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Django Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Django Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „startapp und der Aufbau des App-Ordners“?

Wofür jede generierte Datei einer App gedacht ist. Du übst Django Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um Django Academy zu starten?

Keine Vorkenntnisse erforderlich. Django Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.

Wie lange dauert die Lektion „startapp und der Aufbau des App-Ordners“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser Django Academy-Lektion Code schreiben und ausführen?

Ja. Jede Django Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. startapp und der Aufbau des App-Ordners
  2. Apps in INSTALLED_APPS registrieren
  3. settings.py erkunden
  4. manage.py: Ihre Kommandozentrale
← Zurück zu Django Academy