How To Operate Foreign Key And Many To Many Field In Django Model

This example is based on the article Django Bootstrap3 Example, it reuse the Department and Employee model class. Suppose Department and Employee model are many to many relationships, that means one department can have multiple employees and one employee can belong to multiple departments. Then we need to do the following changes.

How To Operate Foreign Key And Many To Many Field In Django Model Read More »

How To Add Models To Django Admin Site

When you create a Django project and start the project built-in web server successfully, it also contains an admin website in this project. This admin website is the result of django.contrib.admin and django.contrib.auth Django applications. The Django project installed some default applications in the project settings.py file when you create it. You can find them in the INSTALLED_APPS section

How To Add Models To Django Admin Site Read More »