CBSE CLASS 12

CBSE Class 12 : Python

Revision tour

CBSE Class 12 : Functions

Functions

User defined functions

Resursion

Recursion Examples

CBSE Class 12: Inbuilt Functions

String Inbuilt Functions
Math Inbuilt Functions
Date and Time Inbuilt Functions
Random Module

CBSE Class 12 : Data File Handling

Data File Handling

Character by Character reading
Word by word reading
Line by line reading

CBSE Class 12 : Data Structures

Introduction to Data Structures
Stacks and its Applications
Implementation of Stacks
Queue and its Applications
Implementation of Queue

CBSE Class 12 : Interface Python With SQL

Class 12 Interface Python With SQL

Example : 1 Student Record management

Example :2 Bank Record Management

CBSE Class 12 : Web Development With Django

Introduction To Django

Example 1: To Test Django

Example 2: To Display Welcome Message

Example 3: To Display Data in Table Format

CBSE Class : Communication And Network Concepts

Full Forms

Computer Networks

Wired and Wireless Networks

New Technologies

Network Devices

Network Stack

IP Address

Transmission Control Protocol

Basic Network Tools and Applications

Switching techniques

 

Network topologies

Society Law and Ethics

Society Law and Ethics

Digital Property Rights

LICENSING

CYBERCRIME

Cyber Forensics

Technology And Society

Gender and Disability issues

 

CBSE Class 12 : Sample Papers

Class 12 Python Sample Paper 1
Class 12 Python Sample Paper 1 (Solution)
Class 12 Python Sample Paper 2
Class 12 Python Sample Paper 2 (Solution)

CBSE Class 12 : Practical File

Practical File Programs

CBSE Class 12 :  Python Project

Student management System

Student Management System 2

Banking System

MarkSheet Management System

Stock Management System

Telephone Directory

Digital Directory

CBSE CLASS 12 PYTHON DJANGO EXAMPLE 3

Django Introduction     Example : 1 To test Python Django working    Example :2 To display welcome message    Example :3 To To Display Students Data In Table Format

Example 3

To display Student Data in Table Format

Goto  folder e:\django

Step 1: create a project

E:\Django>django-admin startproject secondproject

E:\Django>cd secondproject

E:\Django\secondproject>

CBSE Python Django rajeshshuklacatalyst.in

Step :2

Create the application

E:\Django\secondproject>python manage.py startapp testapp

CBSE Python Django rajeshshuklacatalyst.in

Step:4

Now goto application folder (testapp) and add a view to display the welcome message
Views.py (in testapp folder)

from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

def display(request):
n=”””
<h1>Student Data</h1>
<table border=’1′>
<tr>
<th>Roll No </th>
<th>Name </th>
<th>Per</th>
</tr>
<tr>
<td>101</td>
<td>Amit</td>
<td>98.90</td>
</tr>
<tr>
<td>102</td>
<td>Sumit</td>
<td>99.90</td>
</tr>
<tr>
<td>103</td>
<td>Kishan</td>
<td>97.90</td>
</tr>
</table>
“””
return HttpResponse(n)

Step:5

Define urls in urls.py in project related to views defined in views.py in application
Urls.py (in project folder firstproject)
from django.contrib import admin
from django.urls import path
from testapp import views

urlpatterns = [
path(‘admin/’, admin.site.urls),
path(‘display/’,views.display),
]
Step:6
Run the server so that project can be executed
E:\Django\firstproject>python manage.py runserver
Now put the below address in browser to get the output

http://127.0.0.1:8000/
http://127.0.0.1:8000/display/

Output:

CBSE Python Django rajeshshuklacatalyst.in

Django Introduction     Example : 1 To test Python Django working    Example :2 To display welcome message    Example :3 To To Display Students Data In Table Format