django get current date

from django.utils import timzone 
This enables you to have a timestamp on any model if you create a 

For the date, you can use or

For the time, you can use

However, why have separate fields for these in the first place? 
Why not use a single DateTimeField? in Models

You can always define helper functions on the model that return the 
.date() or .time() later if you only want one or the other.

Here is what the above code is Doing:
1. It’s creating a model named Post.
2. It has a field named author, which is a ForeignKey.
3. It has a field named text, which is a TextField.
4. It has a field named created_date, which is a DateTimeField.
5. It has a field named published_date, which is a DateTimeField.