I have created a django project named Book Store. In my project I have one app named books.
I am using PostgreSQL DBMS. I have a database called books. In that database, I have a table named novel. How do I add this table in the models.py file inside books app?
I want to register this table under admin site. After successfully adding this table in the models.py file, I believe, I shall be able to register the table in the admin site by writing the following codes in the admin.py file under books app.
from django.contrib import admin
from . models import novel
admin.site.register(novel)
I also want to know that if my approach is correct or is there any better way available? As I am new to django, I don't know much about it.
I have read django-book but didn't find out my answer. There is an article about SQLite database though.