Django

College Event Registration Website

CampusConnect Introduction and Setup Configuring settings file for template, static and media files Setting up Tailwind Creating Custom User Model Creating Super User for CampusConnect Registering Custom User Model Search and Filter for User Model Serving Media Files During Development Categorizing Departments Linking Department with HOD Creating Abstract Model for Event Creating Model for Workshop Customizing Admin Page for Workshop Update in Model AbstractEvent Adding Instructor for Workshop Instructor Model Admin Page Adding Poster Field in Abstract Event Providing Access to HOD Access Update for HOD Restricting HOD Access to Particular Department AbstractEvent On Spot Registration Field Creating Workshop Object Creating and Linking Home Page Displaying Workshop on Home Page Styling Home Page Adding Workshop Detail Page Link Workshop Detail Page Workshop Detail Page Styling Workshop Instructor Details Workshop Detail Contact Contact Admin Page Many to Many Field for Contact Displaying Contact on Workshop Detail Page Adding Title for Workshop Detail Page Adding Gallery for Workshop Workshop Gallery Admin Page Displaying Gallery Images on Website Through Context Displaying Gallery Images on Website through template tags Authentication for users User Registration User Registration Submission Logout Functionality For User Login Functionality for User Model For Workshop Registration Workshop Registration Admin Page Register Workshop Function Register Button in Workshop Page Validations Before Workshop Registration Workshop Registration Closed Validaiton User Already Registered for Workshop Validation Workshop Registration Report From Admin Page Export using Library in Django Admin Extending Abstract Event for Hackathons

Register Note Model

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)

alt textNow 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. alt textAn 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. alt text Correspondingly notes can be selected, and they can be deleted by selecting the particular option from the actions deropdown. alt text On clicking the GO button, it will take you to a confirmation page. alt textIf 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. alt text These are the default options, provided by django admin panel. These features can further be customized and make it more effective for our use.