I am really excited to present this Django tutorial, made with Django 1.8 and Python 3.
In this tutorial, I will show you how to create a Django Project from scratch.
I will focus in a simple Task manager project, but the idea is that you can follow this tutorial while building your own project.
Specially during the first posts. And you will be able to download a Django Project Boilerplate too!
However, this is not a common Django tutorial.
It is much better: it is like a check list to create a complex Django project.
You will learn about security issues, different environments for developing and testing, version control repositories, deployment on Heroku, PostgreSQL configuration, and many more things!
Moreover, while building the TaskBuster project, I’ll try to cover as many Django Best Practices as I can.
Ah, and let me introduce you to our main character, you will find it around through this tutorial. It’s a Python with an interesting Hat…
Yeah, that’s our Django pet!
Many thanks to Enric Melé for the design
- Building your Working environment
- Install Django 1.8
- Working directory and Sublime Text
- Obey the Testing Goat
- Create a Django project
- Start a development server
- Virtual environments and requirements files
- Different settings.py for each enviroment
- Production settings.py – Debug False
- Django security and the Secret Key
- Initialize a Git repository and Commit
- Upload your project into Bitbucket
- Static Files Settings
- Templates Settings
- Initializr: HTML5 Boilerplate and Twitter Bootstrap
- Home Page with TDD – Tests first
- Home Page with TDD – Code next
- Commit again to your local repository and Bitbucket
- Install MySQL
- Create a MySQL Database
- Install the MySQL Django adapter, psycopg2
- Configure the Django Database Settings
- MySQL Workbench
- Define what we expect and write a Test
- Install django-allauth
- Settings File
- Database migrations
- Sites configuration
- Google App registration
- Allauth Django configuration
- Testing the user flow
- UML Diagram of the TaskManager app
- Create the TaskManager app
- Profile Model: OneToOne relationship with the User Model
- Django Signals: create a Profile instance when a new user is created
- The Django Admin for the Profile Model