Coder Social home page Coder Social logo

ex-05-webtech-serverside-processing's Introduction

Design a Website for Server Side Processing

AIM:

To design a website to perform mathematical calculations in server side.

DESIGN STEPS:

Step 1:

Design your website for calculation using wireframe work.

Step 2:

Then to execute the wireframe work desing use html,css.

Step 3:

Use views.py to execute the coding in serverside.

Step 4:

Mention the path of the website in urls.py

Step 5:

Publish the website in the given URL.

PROGRAM:

*HTML CODE

<title>Volume Calculator</title> <style> *{ box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }
body{
background-color: lightblue;
color:blue;
}

.container{
width: 1080px;
height: 350px;
margin-top: 100px;
margin-left: auto;
margin-right: auto;
border-radius: 25px;
border: 10px solid cyan;
box-shadow: inset 0 0 15px rgb(231, 217, 160);
background-color:lightgreen;
}
h1{
    color: rgb(0, 0, 0);
    text-align: center;
}
.calculate{
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    padding-right:10px;
    text-align: center;
    font-size: 20px;
    padding-top: 7px;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
</style>

VOLUME OF OF A CUBOID

G PAVANA (22008660)

{% csrf_token %}
Enter Height:
Enter Length:
Enter Width:

Volume:

Views.py

from django.shortcuts import render

def volumecalculation(request): context ={} context["volume"]='0' context["h"]='0' context["l"]='0' context["w"]='0' if request.method == 'POST':

    h=request.POST.get('height','0')
    l=request.POST.get('length','0')
    w=request.POST.get('width','0')
    volume=int(h)*int(l)*int(w)
    context['volume'] = volume
    context['l']=l
    context['h']=h
    context['w']=w
return render(request,"myapp/math.html",context)

urls.py

from django.contrib import admin from django.urls import path from myapp import views

urlpatterns=[ path('admin/',admin.site.urls), path('volofrectangulartank/',views.volumecalculation,name="volofrectangulartank"), path('',views.volumecalculation,name="volofrectangulartankroot") ]

OUTPUT:

OUTPUT

RESULT:

A website to perform mathematical calculations in server side is created.

ex-05-webtech-serverside-processing's People

Contributors

karthi-govindharaju avatar gpavana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.