Here is the list of files in our project:
- toodoo->manage.py
- toodoo->toodoo->__init__.py
- toodoo->toodoo->asgi.py
- toodoo->toodoo->settings.py
- toodoo->toodoo->urls.py
- toodoo->toodoo->wsgi.py
manage.py
This file is a script for doing administrative tasks. It will be used many times during this series,
and we will use it to create super users, create Django apps, interact with the database and similar.
Right now, you don't have to think to much about it.
toodoo
Inside the project root folder, we get another folder named "toodoo". This is where all the configuration for the project will be placed.
So it's kind of the center of the whole Django project.
toodoo->__init__.py
This file is empty, but it still has a function. It makes Python treat this folder as a module, so it's easy to reference the files inside it and similar.
toodoo->asgi.py
This file is a file the web server will be using (later). Asynchronous Server Gateway Interface.
It's entry points for the webserver, and will only be used if the project supports asynchronous views (which we will not cover in this series).
toodoo->settings.py
This is where all the settings will be placed. This is where we define the database connection, where templates are located, security settings, how dates are formatted and similar.
toodoo->urls.py
This file is sort of like a table of contents. The webserver uses this file to find out what to show you when you visit a url.
toodoo->wsgi.py
This file is a file the web server will be using (later). We're not going to do anything with it, but we will use it later when we deploy the project to a live server.
Summary
This might be a little bit information overload, but I promise that everything will start making more sense when we start using the files.
Table of contents
- 1. Introduction
- 2. Installation and setup
- 3. How things work
- 4. The first Django app
- 5. Your first view
- 6. Your first template
- 7. Testing our site
- 8. Extending templates
- 9. Your first model
- 10. The admin interface
- 11. Showing contents from the model
- 12. Another app (category)
- 13. Connecting two models
- 14. Show list of categories
- 15. Category detail page