or I create a disponibilities table which reference the id of a user?
Yes, thats the way it has to go. In Django terms you have to create a model with the fields (database columns) you need and additionally a field 'user' (or similar name) which will be a foreign key field. You can take a look at the 'Vote model in wlpoll/models.py for comparison:
class Vote(models.Model): user = models.ForeignKey(User, related_name='poll_votes') poll = models.ForeignKey(Poll) choice = models.ForeignKey(Choice) date_voted = models.DateTimeField( 'voted at', default=datetime.datetime.now)
The field 'user' creates the relation from/to the model 'Vote' and a registered user (model: auth.user, which is part of the django frame work). After the creation of the model you have to run
./manage.py makemigrations and
./manage.py migrate to get your model into the database. All necessary work in database will be made automatically then. Refer to the Django documentation for more information about the available field types and options, e.g. there is also a DateTimeField available.
Regarding the colors:
Or how about giving the available dates a color, and making the other dates empty boxes?