Okay, we have our application running and we have our project.
But project is like a container for our applications and we might have more than one application inside.
So what is actually application?
Application will be part of your code of your project that will do a certain thing.
So for example, you might have a project that will contain our do a lot of things, but application
will have the single responsibility.
So you can have multiple applications, you might have one.
All depends on your architecture and your design.
In this tutorial, we'll focus on only one application because that will be easier to maintain, but
you don't need to keep it as one.
You might have more than one and then you can communicate in between the application as you wish.
So at the moment we don't have any application, so our Django project is kind of not usable.
So let's create one.
So how we can actually create one, I will go to terminal and in the same way as use, I use terminal
in my IDE on my system.
I can use it here.
So I'm inside the tutorial folder which is here.
What I can do is I have two choices.
I can use a python manage.py this file as we use before or I can do admin Django admin the same way
I've I've created a Django project.
So one way will be Django.
Admin and then start up and then name of the app.
And I will I can create an app called demo so I can do it like this.
Or instead of Django admin I can do python manage.py start up demo the same way I will use this one
and if we'll go here you can see demo has been created here and we have two folders.
So we have one demo here which is our application and this is our project.
So some people prefer to have this demo or this application inside our folder.
It's really up to you.
How would you like to have it?
But if that's up our application, it might be better to put this inside it or outside it.
I will keep it as as it is here because it doesn't really matter that much at And then the only thing
what you will need to do is you will need to have a reference, but you need to remember this is project
and this is our application.
So actually let's close this for now and see what we have in our files.
Let's start from the root directory.
Here we have our manage.py.
If we open this file, basically it's not something that we will be interested in, but this file is
for us to run our commands for our Django so we can forget about the content of this.
But it is very useful file to to manage our Django.
Another file we have in the root folder is database Sqlite3 that has been created for us automatically
by Django.
And this is local database.
So whatever we will store in our application, any data will go here.
That's not a proper solution for production environment.
So if you put your application on a server, you should not use SQLite because this is more like a testing
environment database.
So it's very easy to set up.
This is a normal file and you can write things into the sqlite3, but if you would like to have something
fast and reliable, the option will be MySQL or Postgres database.
But for now we can use this one because we are not testing that application on server yet.
So what else we have to implement?
We already talked about this, so we have our project here and inside the project we have few files.
First we have URLs and then we have settings.
The rest of the files are not really something that we will ever change, so we have some in it.
This is for initiate our project and then we have a wsgi which is more like a configuration for our
server.
So let's see what's inside the URLs, inside URLs.
As you can see here, we don't have a support for for Django, but it doesn't really matter.
We can close this.
So in here you have in the comment section, you have some explanation how to use the URLs.
But basically what this file is doing is it will give us some kind of paths.
So if we go to our application here, that's a URL we are using.
But if you take a look here, we have another patch that is available, which is admin.
So basically if I will type admin at the very end admin, I have another page here.
We'll talk about this later in the course.
But this URLs basically kind of do mapping for our application.
So whatever we will have here, it will be available as a URL in our application.
So at the moment built in we have admin, but we will create more our own later in the tutorial.
So this is URLs.
I can open another file which is settings.
This settings it's all settings for for our project.
So we will be talking more about this and we will change a lot of things here.
But basically if you would like to change something in your application, you will need to do it here
inside the settings page.
So we have a templates database.
You can see here Django Database Sqlite3 is the one we use, and this name of the file is exactly this
name here.
So if you would like to switch to another database, you will need to go to the settings and change
it here and you have other options here.
But as I said, we'll come back to this many different times and we'll add and change things on the
settings.
So basically the settings control our project.
So that's our project.
I will close both of this and I will go to the demo.
In demo we have a few things and we will be talking more about these files.
Later in the tutorial, but important files for us will be the models which is empty at the moment will
be views.
It's also empty at the moment.
And also we'll have some other files here that we will create.
But the models basically represent our objects in database, whatever.
We would like to store something in database, we'll need to create a model here and then we will apply
it for our database using a migrations command.
And then we have also views and views will be kind of our endpoint.
So if we would like to access part of our application, we'll use views to do that, but we'll be doing
a lot of different things in our views and models.
And also I will show you how to create another view files and how we can structure our application.