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

Creating Your First Django Project

After deciding with your project and coming up with a name for it, you can go inside the folder you want your project to be developed and enter in a virtual environment. A Django project can be created by typing the following command in the command prompt.

django-admin startproject <project_name>

In our case, the project name is EdkoolWorld so we will type the following command:

django-admin startproject EdkoolWorld

alt textAfter the command is completed successfully, Django will create some files in a structured manner. alt textWe will learn about all these files and their purpose further in this course.

Run Django Project

Now that we have a Django project, we can run it and see how it looks like in the browser.

Navigate inside the EdkoolWorld folder where the manage.py file is present, and type the following command

python manage.py runserver

The following command will produce a result like this : alt textThe default web page created can be viewed by visiting the link http://127.0.0.1:8000 alt textCongratulations, you have just created your first website. Althought its just a default web page, we will modify the web page further and create our dream website further in the course.

The next step is to create an app in Django. In Django a web page can be created only by creating an app.