Fields is not showing in admin panel for models

I was following exact documentation of Django website but after implementing all this when I run the code it showing following screen(Without fields).

I’m new at Django framework.

It was my mistake that I was forgotten to add () at the end of models declarations.

Wrong format:

Create your models here.

class Product(models.Model):
title = models.TextField
description = models.TextField
price = models.TextField

Correct format:

Create your models here.

class Product(models.Model):
title = models.TextField()
description = models.TextField()
price = models.TextField()

интересно… а как (python manage.py makemigrations
python manage.py migrate) работало… “с пинка или подзатыльника” во = чудеса…!

1 Like