What Happens When You Create a Django Project? (Full Breakdown)
What Happens When You Create a Django Project? I remember the exact moment. I’d just typed django-admin startproject myfirstproject, hit enter, and… nothing dramatic happened. No confetti, no “success” message. Just my terminal quietly returning to the next line. I opened the folder expecting something impressive and instead found a handful of small files with names I didn’t recognize.
If that’s where you are right now, I want to slow down and actually explain what happens when you create a Django project — not just list the files, but explain why Django hands you exactly this setup and nothing more.
Table of Contents
What Happens When You Create a Django Project? The Command That Starts Everything
Everything begins with one line:
django-admin startproject myfirstproject
Behind the scenes, Django isn’t doing anything magical. It’s copying a template folder structure and renaming a few things based on the project name you gave it. That’s genuinely it. There’s no hidden database being created yet, no server running — just files being written to your disk.
Once it’s done, you’ll have this:
myfirstproject/
manage.py
myfirstproject/
__init__.py
settings.py
urls.py
asgi.py
wsgi.py
Why There Are Two Folders With the Same Name
This part confused me for longer than I’d like to admit. The outer myfirstproject/ is just a container — it holds everything related to your project, including apps you’ll build later. The inner myfirstproject/ folder is the actual Python package that configures your project. Django names it the same as your project by default, but you’ll see later that your apps live outside this inner folder, not inside it.
manage.py Shows Up First — For a Reason
The very first file sitting at the top level is manage.py. I think Django puts it there on purpose, almost like handing you the controls before anything else. Every command you’ll run from now on — starting the server, creating apps, applying database changes — goes through this file.
python manage.py runserver
You don’t edit manage.py. You just use it, constantly.
settings.py Gets Created Empty-ish, On Purpose
Open settings.py and you’ll see it’s already filled with default values — a random SECRET_KEY, a default SQLite database connection, a list of pre-installed apps like django.contrib.admin and django.contrib.auth. None of this is your work yet. Django ships with sensible defaults so your project actually runs the moment it’s created, before you’ve written a single line of custom code.
This is also why the welcome page works the instant you run the server — the admin app and default database are already wired up for you.
urls.py Starts With Just One Route
When you open urls.py, there’s only one path defined:
python
urlpatterns = [
path('admin/', admin.site.urls),
]
That single line is why http://127.0.0.1:8000/admin/ works right out of the box, but your homepage doesn’t yet. Django doesn’t guess what pages you want — it gives you the bare minimum and lets you build the rest.
wsgi.py and asgi.py Are Created for Deployment, Not Development
Both of these files get created automatically, even though you won’t touch either one for weeks, maybe months. They exist because Django wants your project deployment-ready from day one. wsgi.py handles traditional server deployment, and asgi.py handles asynchronous features. I ignored both entirely for my first several projects, and that was completely fine.
The Moment You Run the Server
After creating the project, running:
python manage.py runserver
starts a lightweight development server on your machine. Django checks your settings, loads your URL configuration, and waits for a browser request. When you visit 127.0.0.1:8000, it matches the request against urls.py, finds no custom route yet, and shows you the default welcome page instead of an error.
That welcome page is Django’s way of saying: “the wiring is correct, now build something.”
What Creating a Project Does Not Do
This part matters too. Creating a project does not:
- Create your database tables (that happens with
migrate) - Create any app-specific logic (that happens with
startapp) - Set up any custom pages (that’s on you, in
urls.pyandviews.py)
A lot of beginners, myself included, expect startproject to do more than it actually does. It’s just scaffolding — the real work starts after.
Why Django Sets It Up This Way
The more projects I’ve built, the more I’ve come to appreciate this minimal starting point. Django doesn’t force an opinion on how your app should be organized beyond the basics. It gives you a working skeleton, sensible defaults, and then steps back. Compare that to frameworks that generate hundreds of files upfront — I’d rather understand six files deeply than skim past sixty.
If you haven’t already, I’d recommend reading through my breakdown of the full Django project structure for a file-by-file reference you can come back to. And for anything I haven’t covered here, the official Django documentation is worth bookmarking early.
Final Thoughts
So, what actually happens when you create a Django project? Not much, and that’s the point. You get a small set of files, each with a clear job, and a server that runs instantly so you know your setup is correct. Everything after that — the pages, the database, the features — is what you build on top.
Go back to your terminal, run through startproject again if you need to, and this time, actually open each file and read it. It’ll make a lot more sense now.
