0Pricing
Django Academy · Lesson

startapp and the App Folder Layout

What each generated file in an app is for.

startapp and the App Folder Layout is a free Django Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Django Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

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

Frequently asked questions

Is the “startapp and the App Folder Layout” lesson free?

Yes — the full text of “startapp and the App Folder Layout” is free to read here on the web, and the Django Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Django Academy course, upgrade to CoddyKit PRO.

What will I learn in “startapp and the App Folder Layout”?

What each generated file in an app is for. You practise Django Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Django Academy?

No prior experience is required. Django Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “startapp and the App Folder Layout” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Django Academy lesson?

Yes. Every Django Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. startapp and the App Folder Layout
  2. Register Apps in INSTALLED_APPS
  3. Touring settings.py
  4. manage.py: Your Command Center
← Back to Django Academy