Loading video player…

Django Apps

A Django web application is made up of a project and its constituent apps. In this lesson, you’ll unravel the mystery of apps in a Django project!

When you start a Django project, you’ll have a folder for your project. That folder will contain a manage.py file as well as a folder with the same name as your project. This is the management app. There can also be other folders for other apps in your project.

00:00 Hello and welcome to video four in our Django overview, where we will unravel the mystery of apps in a Django project.

00:08 Once you start a Django project, you will end up with something that looks like this. So, what’s currently highlighted in blue? This is my Django project.

00:16 When I just create the project, I end up with one folder in here called the same as my project, as well as this manage.py file. manage.py is going to be an important file that we’ll talk about in just a little bit when we discuss the files. But for now, let’s take a look at this structure.

00:34 We have this folder here with the same name as my project, and that’s called the management app. This app is going to contain some different files than any other app that we’re going to build. What I have up here, the example_app, is something that I created afterwards.

00:50 This is different than the management app, but it’s going to be the same as any additional app that I’m creating in here. The example app is going to contain some functionality.

01:00 For example, our projects is going to be its own Django app, and we could have other apps in there. Your portfolio can have a blog app, for example. Those would be all separate apps. If you remember what we talked about before, these are pluggable.

01:16 I could reuse this whole thing in a different Django project where maybe I want to build another blog, or—if you remember how the portfolio app looked like, let’s take a peek,

01:29 it looks like this—you can easily see that this functionality could be interesting for other things. Maybe you want to make your own Instagram where you have a photo that displays and then a bit of a text, and then you can check out the photo in more detail.

01:46 You could simply go ahead and reuse this app that we’re going to be building here, change it a little bit, and utilize it in a different project. So, that’s what’s meant when you hear that Django apps are pluggable and everything that is necessary for this app to function is going to be retained inside of the app.

02:05 So remember, as a sum-up: we have a Django project that consists of a couple of apps: there’s going to be always a management app, and then there can be multiple other apps that, all together, create our Django project. I hope that makes sense. Let’s hop forward to the next video.

Become a Member to join the conversation.