Skip to content

Marina Mele's site

Reflections on family, values, and personal growth

Menu
  • Home
  • About
Menu
TaskBuster Django Tutorial

TaskBuster Django Tutorial

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!

Django

Moreover, while building the TaskBuster project, I’ll try to cover as many Django Best Practices as I can.


Enjoy, and learn as much as you 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 🙂

Did you start this tutorial with Django 1.7?
You can update to Django 1.8 quite easily. You just need to install Django 1.8 and update the requirements.txt file! However, if you want to follow the recommendations of Django 1.8, you’ll have to make two more changes:

  • Update the urls.py file so that it doesn’t use patterns (see the boilerplate file)
  • In settings/base.py change the TEMPLATE_DIRS by TEMPLATES (see the boilerplate file) 


Part I – Working environment and start a Django Project

  • 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

Part II – Settings files and Version control

  • 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

Part III – Create a Home Page with TDD, Staticfiles and Templates settings

  • 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

Part IV – Template Inheritance, Website files and Testing with coverage

  • Template Inheritance
  • Robots.txt and humans.txt files
  • The favico.ico image
  • Testing with Coverage

Part V – Internationalization and Localization. Languages and Time zones

  • Internationalization – Settings
  • Internationalization – Urls
  • Internationalization – Templates
  • Internationalization – Translation
  • Localization
  • Time Zones

Part VI – Documenting the TaskBuster Django Boilerplate

  • Install and configure Sphinx
  • Documenting the TaskBuster Django Project Boilerplate
  • Upload your project on GitHub
  • Upload your Docs on ReadTheDocs

TaskBuster Django Project Boilerplate

Part VII.a – Install and Configure PostgreSQL

  • Install PostgreSQL
  • Create a PostgreSQL Database
  • Install the PostgreSQL Django adapter, psycopg2
  • Configure the Django Database Settings

Part VII.b – Install and Configure MySQL

  • Install MySQL
  • Create a MySQL Database
  • Install the MySQL Django adapter, psycopg2
  • Configure the Django Database Settings
  • MySQL Workbench

Part VIII – User Authentication with a Google Account using Django Allauth

  • Define what we expect and write a Test
  • Install django-allauth
  • Settings File
  • Urls
  • Database migrations
  • Sites configuration
  • Google App registration
  • Allauth Django configuration
  • Testing the user flow

Part VIII.b – User Authentication with Twitter using Django Allauth

  • Test First! Test First!
  • Configure Allauth
  • Create a Twitter Application

Part IX – Model creation, OneToOne relations, signals and the Django Admin

  • 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

Part X – Model creation, ForeignKey relations, testing and the Django Admin

  • UML Diagram Revision
  • The Project Model: Foreign Key Relationships and custom validators
  • Tests for the Project Model
  • Django Admin for the Project Model: custom list display and Model Inline

Leave a Reply Cancel reply

You must be logged in to post a comment.

Categories

  • Personal Growth and Development
  • Artificial Intelligence
  • Mindful Parenting and Family Life
  • Productivity and Time Management
  • Mindfulness and Wellness
  • Values and Life Lessons
  • Posts en català
  • Other things to learn
Follow @marina_mele
  • Cookie Policy
  • Privacy Policy
©2023 Marina Mele's site | Built using WordPress and Responsive Blogily theme by Superb
This website uses cookies to improve your experience. If you keep navigating through this website, we'll assume you're ok with this, but you can opt-out if you wish.Accept Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT