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 2

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 2

To display a welcome message

Goto  folder e:\django

Step 1: create a project

E:\Django>django-admin startproject firstproject

E:\Django>cd firstproject

E:\Django\firstproject>

CBSE Python Django rajeshshuklacatalyst.in

Step :2

Create the application

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

CBSE Python Django rajeshshuklacatalyst.in

Step :3

Now we have to within the project folder (firstproject) and add the application in the settings.py

# Application definition

INSTALLED_APPS = [

    ‘django.contrib.admin’,

    ‘django.contrib.auth’,

    ‘django.contrib.contenttypes’,

    ‘django.contrib.sessions’,

    ‘django.contrib.messages’,

    ‘django.contrib.staticfiles’,

    ‘testapp’,

]

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 welcome(request):

    return HttpResonse(‘<h1>Welcome to Django Project </h1>’)

 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(‘welcome/’,views.welcome),

]

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/welcome

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