Model register but not creating table

on my django application I try to register model , python manage.py makemigrations , migrate works , but no database table found on admin.. `from django.contrib import admin..

<< admin.py >>

from .models import Product

class ProductAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('product_name',)} list_display = ('product_name', 'price', 'stock', 'category', 'modified_date', 'is_available')

admin.site.register(Product, ProductAdmin)

`

First make sure you app is registered in your settings.py file inside INSTALLED APPS

then runpython manage.py appname then migrate as python manage.py migrate appname

Back to Top