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

Workshop Detail Page Styling

In this section, some more details regarding the workshop would be displayed on the web page and also some basic styling will be done for it. The styling will be done at a basic level and can be extended based on your requiremenets. Along with other contents, a poster for the workshop will also be displayed on the web page.

To start with lets add a section for poster and some tailwind styling to display the content on the web page.

Inside the event/workshop_detail.html make the following changes :

{% extends 'base.html' %}

{% block content %}

    <div class="p-6 mb-6 rounded-lg m-4">
        <h2 class="text-3xl font-semibold mb-4 text-center">{{ workshop.name }}</h2>
        <h2 class="text-2xl font-semibold mb-4 text-center">{{ workshop.workshop_title }}</h2>
        <p class="text-1xl font-bold mb-4 text-center">({{ workshop.event_type|upper }} WORKSHOP)</p>
        {% if workshop.poster %}
            <img src="{{workshop.poster.url}}" class="w-50 h-50 mx-auto mb-4"/>
        {% endif %}
        <p class="text-gray-200">{{ workshop.description }}</p>
        <p class="text-gray-200 text-center">A <b>{{workshop.workshop_title}}</b> for <b>{{workshop.target_audience}}</b> 
            From <b>{{workshop.start_date}} - {{workshop.end_date}}</b> in <b>{{workshop.venue}}</b>
        </p>
    
        

{% endblock %}

Making these changes will add the extra details on the webpage and also style it as follows : alt text You can change this, add some extra colours as per you requirements.

In the next section, you will see how you can add the instructor details for a particular workshop in its page.