To get started in the shell, execute,

python manage.py shell


shell looks beautiful, right?

Untitled 3.png


to access DateField() import timezone

from django.utils import timezone

and also import like this,

Prod = Product(product_name='keyboard',category='key',subcategory='',price=150,de
    ...: sc='somehting that we use daily', pub_date= timezone.now())

And finally,

Prod.save()

You can list all by, Product.objects.all()

And even more at it’s documentations, good luck!

0 items under this folder.