Sumago Infotect
Sumago Infotect
2024
SUMAGO INFOTECH PVT.LTD , NASHIK
CONTENT
• Introduction of html
• Introduction of css
• Introduction of java-script
• Study of python
• Study of django
Introduction to web technologies
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
CSS fields :
• It is important to note that by default any width and height specified to an element will
not take into account its margin, so a div with width 100px and margin 10px will
measure 120px on the screen, not 100px.
• This could be a problem breaking your layout.
• You can change this behaviour changing the box model of the element so the width uses
the outmost border:
div { box-sizing: border; }
• Content - The content of the box, where text and images appear
• Padding - Clears an area around the content. The padding is transparent
• Border - A border that goes around the padding and content
• Margin - Clears an area outside the border. The margin is transparent
Box Model Example
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px;
}
Javascript
• A regular programming language, easy to start, hard to master.
• You can change the content of the HTML or the CSS applied to an element.
• You can even send or retrieve information from the internet to update the content of the web without
reloading the page.
• It can be utilized for both client-side and server-side development, making it essential for modern web
applications. Known as the scripting language for web pages, JavaScript supports variables, data types,
operators, conditional statements, loops, functions, arrays, and objects.
Example of a website
Variables in JS
EXAMPLE :
Example:
myvar="John"
my_var="John"
_my_var="John"
myVar="John"
MYVAR="John"
myvar2 = "John"
DJANGO fRAMEWORK
• Django is a high-level Python framework. It is free and open-source, written in Python itself,
and follows the model-view-template architectural pattern.
• We can use it to develop quality web applications faster and easier. Since developing for the
web needs a set of similar components, you can use a framework.
• This way, you don't have to reinvent the wheel. These tasks include authentication, forms,
uploading files, management panels, and so.
FEATURES
• 1. Rapid Development
• 2. Secure
• 3. Scalable
• 4. Fully loaded
• 5. Versatile
• 6. Open Source
CONTROL FLOW
• 1.The user sends a URL request for a resource to
Django.
• 2.Django framework then searches for the URL
resource.
• 3. If the URL path links up to a View, then that
particular View is called.
• 4. The View will then interact with the Model and
retrieve the appropriate data from the database.
• 5. The View then renders back an appropriate
template along with the retrieved data to the user .
INSTALLATION OF DJANGO
Steps to Install Django and Set Up a Virtual Environment
1.Install Python 5.Project creation
get install python Django-admin startproject
projectname
2.Install pip 6.app creation in Project
get install – python pip py manage.py startapp appname
3.create virtual environment 7. To run project
pip install virtualenv py manage.py runserver
4.Installing Django 8.To make migrations
pip install Django py manage.py makemigrations
MVT ARCHITECTURE
• Models: Just like the Model in MVC, here as well it has the
same functionality of providing the interface for the data stored
in the database.
• Views:-In Django, Views act as a link between the Model data
and the Templates. It sees the user request, retrieves appropriate
data from the database, then renders back the template along
with retrieved data.
• Templates:- Just like View in MVC, Django usesemplates in
its framework. Templates are responsible for che entire User
Interface completely. It handles all the static parts of the
webpage along with the HTML, which che users visiting the
webpage will perceive.
DJANGO TEMPLATE LANGUAGE
• Django's template engine offers a mini-language to define the user-facing layer of the
application.
• A variable looks like this: {{variable}}. -