Datetime On Django on models?
you can work with: birthday = models.DateField()
you can work with: birthday = models.DateField()
Simply use the django admin panel provided by django: Step 1: create superuser python manage.py createsuperuser Step 2: run server python manage.py runserver Setp 3: Enter the admin site with the newly created credientials 127.0.0.1:8000/admin Learn more form official documentation: https://docs.djangoproject.com/en/3.1/intro/tutorial02/#creating-an-admin-user
You must supply a user when you create a department. You can access the current user as request.user if you are in a view user = request.user or fetch any user from the database if you are testing in the shell user = User.objects.get(id=1) # get then create the department: department = Department(name=”test”, description=’test’, user=user, … Read more