logout button and user in navbar

This commit is contained in:
Alicja Cięciwa
2020-11-14 17:40:14 +01:00
parent 68337fcf66
commit 5ef5ba52f4
7 changed files with 73 additions and 51 deletions

View File

@@ -1,9 +1,13 @@
from django.db import models
import datetime
from django.core.validators import MaxValueValidator, MinValueValidator
class HoursInput(models.Model):
date = models.DateField(default=datetime.date.today)
hours_number = models.IntegerField()
hours_number = models.IntegerField(validators=[
MaxValueValidator(15, "Niemożliwe, że tyle pracowałeś"),
MinValueValidator(0, "Wprowadź liczbę dodatnią 0-15")
])
workplace = models.CharField(max_length=100)