In order for a model, to be displayed in the admin page in Django, it has to be registered in the admin.py file.
A model can be registered in the admin panel by adding the follwoing code in the notesapp\admin.py
file as follows :
from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Note)
Now the notes model is also visible in the admin panel.
We can add a note, directly from the admin panel by clikcing on the add button. An editor like this will open, where notes can be added.
Also by clicking on the Notes
we can view the list of notes and edit it by clicking on it.
Correspondingly notes can be selected, and they can be deleted by selecting the particular option from the actions deropdown.
On clicking the GO button, it will take you to a confirmation page.
If you confirm it, then it will be deleted from the database.
Similarly by clicking on a particular title, it will be possible to edit that note. These are the default options, provided by django admin panel. These features can further be customized and make it more effective for our use.