Django Project for Class 12 [ New Syllabus-2020]

Django Project for class 12 according to the new syllabus 2020 for computer science students. The purpose of this project is to give my dear students the idea of how they can build a web application in such a small time.

This Django Project will help you, how you can use different types of programming knowledge learned in your junior classes like HTML, CSS, JavaScript, Jquery, and other latest technologies.

Python Project for Class 12

This Python project is developed using the Django Framework. A framework is a collection of libraries and packages designed to solve a particular type of problem.  Other popular web frameworks in Python is flask, web2py, TurboGears, etc.

The purpose of this investigatory python project for class 12 CS and IP students,  is to give the basic idea on

  • Web Development using Django Framework
  • Django Templating using DRY ( Do not Repeat Yourself)
  • Models for creating tables in SQLite database
  • Use of Static files like CSS, Javascripts, Images
  • Pagination and Extending of  Templates
  • Use of Forms in Django Projects
  • URL routing
  • Function-based views
  • Email Handling from Django
  • Image and file Uploading and handling in templates
  • How to pass database values from a table into a template
  • Basic Template tags

Basic Requirement to run Python Project

This Django project was developed using Django 2.2 on Windows 10 system. The database of this project is developed on SQLite and the default user of this Database is rakesh and password is: ramji00789

Templates of the Django project are stored in the Templates/creations folder.  These templates are divided into parts so that we could see the basics of Django templating tags and how we can dynamically use the URL rewriting.

How to run the Django Project on Local system

You are required to download and unzip the python project in a folder and then run the following command to run your system.

python runserver

Now check the result at

Sample output

Django Project portfolio

Download Python Django Project: Django Portfolio

if you have any query or suggestion then please send me your suggestion at

Django Portfolio – Python Project for class 12

Django project for class 12 students uses a single table for storing project information in a single table that defines the details of each project.  The other models are as follows

from django.db import models
from django.urls import reverse

# Create your models here.
class creation(models.Model):
    name = models.CharField(max_length=100)
    url = models.URLField()
    creation_type = models.CharField(max_length=200)
    description = models.TextField()
    creation_image = models.ImageField(
        "creation image", upload_to='uploads')

    class Meta:
        verbose_name = "creation"
        verbose_name_plural = "creations"

    def __str__(self):

    def get_absolute_url(self):
        return reverse("creation_detail", kwargs={"pk":})

class option(models.Model):
    sitename = models.CharField(max_length=100)
    punchline = models.CharField(max_length=150)
    site_email = models.EmailField(max_length=254)
    address = models.TextField()
    phoneNo = models.TextField(max_length=15)
    twitter = models.URLField()
    facebook = models.URLField()
    youtube = models.URLField()
    instagram = models.URLField()
    linkedin = models.URLField()
    github = models.URLField()

    def __str__(self):
        return self.sitename

    def get_absolute_url(self):
        return reverse("option_detail", kwargs={"pk":})

class slider(models.Model):

    slider_name = models.CharField(max_length=100)
    slider_url = models.URLField()
    slider_image = models.ImageField('slider image', upload_to='sliders')

    def __str__(self):
        return self.slider_name

    def get_absolute_url(self):
        return reverse("slider_detail", kwargs={"pk":})

The views of the projects that is responsible for displaying data is as follows

from django.shortcuts import render
from django.core.paginator import Paginator
from .models import creation, slider

# Create your views here.

def home(request):
    posts_list = creation.objects.all()
    sliders = slider.objects.all()
    paginator = Paginator(posts_list, 6)  # Show 25 contacts per page
    page = request.GET.get('page')
    posts = paginator.get_page(page)
    return render(request, "creations/portfolio.html", {'posts': posts, 'sliders': sliders})

def contactus(request):
    return render(request, 'creations/contact.html')

Now, I think you should also have the basic idea behind the URL structure of this web app.

from django.urls import path
from .views import home, contactus
urlpatterns = [
    path('', home, name="home"),
    path('contact/', contactus, name="contactus"),

Live Demo of Python Django Project -Portfolio

These are the basics of this whole Python Project for class 12. I hope you will learn a lot from this Django Project and make something different for your class 12 computer project. !!!!

Print Friendly, PDF & Email

Related Posts

If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to See your article appearing on the main page and help other students/teachers.