Connecting the admin interface to models

You might have noticed from the preceding admin dashboard that there is a section called AUTHENTICATION AND AUTHORIZATION, in which we, as an admin, could add and customize privileges of various groups of users. However, the models that we created (Book and Author) are not there.

This is because, as a result of the automatic nature of its generation, the admin interface was created independently of our models. Therefore, we will need to connect our models to this admin interface, which, in fact, is also a Django application in itself, called admin.

First, we will implement the Author model:

  1. Make sure that our current server is still running.
  2. In the file of the library folder, enter the following ...

Get Hands-On Application Development with PyCharm now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.