Creating a CMS
Now that you have created a versatile data model, you are going to build the CMS. The CMS will allow instructors to create courses and manage their contents. You need to provide the following functionality:
- Log in to the CMS
- List the courses created by the instructor
- Create, edit, and delete courses
- Add modules to a course and reorder them
- Add different types of content to each module and reorder them
Adding an authentication system
You are going to use Django's authentication framework in your platform. Both instructors and students will be instances of Django's User
model, so they will be able to log in to the site using the authentication views of django.contrib.auth
.
Edit the main urls.py
file of the educa
project and include the login
and logout
views of Django's authentication framework:
from django.contrib import admin
from django.urls import path
from django.contrib.auth import views as auth_views...