status: hidden
title: Python — Django — Habits Tracker
slug: ao8Taifu-django
robots: noindex


# Habits Tracker

The project name is `django-habits-tracker`, follow [the return
protocol](https://mdk.fr/pages/obiree2uaza2sh-rendu.html) in great
details, any failures to follow the protocol will cost points.

Create a [Django](https://docs.djangoproject.com/) project named
`proj` containing a single app named `habits`.


## Features needed

- A user can sign-in¹ (no email validation needed).
- A user can log-in and log-out.
- A user can manage a list of habits².
- One user can't see other user habits, habits can be very personal information.
- A user can easily mark a habit as done when he does it.
- A user can edit or remove a habit.
- A user can see an overview of how well it did the habits.
- A user should easily see what he show do now (habit running late) or if everything's done.

1. Read the doc properly, Django already provides a user creation form
   handling password validation password hashing for you.
2. A habit is something like "Run at least once every other day", or
   "Bake a brioche once a month", "Tech watch twice a week", ...


So you'll need to find a way, given a habit description and a list of
when he did it in the past, to score the user "fitness to the habit".


## Admin zone

The superuser should be able to easily see, modify, and delete the
habits and when they've been done, so if a user tells "I forgot mark X
as done yesterday, please add it manually", it should be easy to fix
by a superadmin.


## Bonus

- Make the front-end 2021-looking.
- i18n.


## What I will be looking for

- Everything in english, if you want french.
  - Function names, comments, variables, ... in english.
  - UI in english.
  - Commit message in english.
  - You want french? → i18n.
- Semantically correct git log.
- Readable and maintainable code.


## Hints

Reading the [Django
tutorial](https://docs.djangoproject.com/en/3.2/intro/tutorial01/),
[my slides](http://mdk.fr/django-initiation), and the [hackinscience
source code](https://framagit.org/hackinscience/hkis-website) should
be enough for this project.
