Utsavbb HTML
Utsavbb HTML
Academic year
(2021-2022)
INTERNSHORT UNDER
SUBJECT OF
D.E. SEMESTER-III
Submitted by :-
Company Profile
Company Name: BrainyBeam Technologies Pvt Ltd
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all those who provided me the possibility to
the completion of the internship. A special gratitude of thanks I give to our Assitant
Professor, Prof. Shweta Rajput, whose contribution in stimulating suggestions and
encouragement, helped me to coordinate the internship especially in drafting this report.
Furthermore, I would also like to acknowledge with much appreciation the crucial role of
the Class Coordinator Mrs. RASHMIKA VAGHELA who gave the permission to use all
required equipment and the necessary material to fulfil the task. Last but not the least,
many thanks go to the teachers and my friends and families who have invested their full
effort in guiding us in achieving the goal.
Also I appreciate the guidance given by the developer at BrainyBeam, Mr Raj as well as the
panels especially for the internship that has advised me and gave guidance at every moment
of the internship.
Abstract
Django is a high-level web framework used in Python for web application development. It enables the
rapid development of websites with proper secure and maintenance. Due to its flexibility, robust nature,
Django has turned into one of the most favorite frameworks among developers. It clears the hassles in
web application development so that you can focus on writing the code without needing to reinvent the
wheel. In addition, Django Framework is free and open source. It has a thriving online community where
you can every solution related this framework.
Django framework plays an important role in Python Programming. With the help of this popular
framework, the developers can build the web applications without any hassle.
This framework comes with a helper tool that makes the life of a Python developer so easy. It helps to
maintain and deploy all the codes. Django framework has amazing features like helpers, working ORM
along with admin interface makes it a dream framework for every developer.
1|Page
Panchal achyut
We make an E-Commerce website as our main project using Python Django Framework. We will make
webpages like a Login Form page, Sign-up Form page, Home Page where we add Category and Product
Page Where we list our all the product and last we make an logout page.
||| DAY - 1
BASIC INTRODUCTION AND DOMAIN KNOWLADGE
Explain about work flow of whole internship. Also discuss some basic domain
knowledge.
❖ What Is Python ?
i. Python is a computer programming language.
ii. ii. Python is general purpose language.
iii. iii. Python is high level programming language.
iv. Phython is object oriented programming language.
❖ Features Of Python
1. Easy to code
2. Easy to Read
3. Free and Open-Source
4. Robust Standard Library
5. Interpreted
6. Portable
7. Object-Oriented and Procedure-Oriented
8. Extensible
9. Expressive
10. Support for GUI
11. Dynamically Typed
12. High-level Language
13. Simplify Complex Software Development
2|Page
Panchal achyut
❖ Output
3|Page
Panchal achyut
4|Page
Panchal achyut
PYTHON OPERATORS , FLOW CONTROL AND CREAT
CALCULATOR.
5|Page
Panchal achyut
❖ Logical operators
6|Page
Panchal achyut
❖ Identity operators
❖ Membership operators
7|Page
Panchal achyut
MAKING SIMPLE CALCULATOR USING PYTHON :-
❖ output
8|Page
Panchal achyut
MAKING GST COUNT USING PYTHON :-
❖ output
9|Page
Panchal achyut
RANGE:
-Range(endpoint) Range(startpoint,end point) Range(startpoint,end point,jumppoint)
APPEND:
Productarry.append(“x” ) [“a”,”b”,””c”,”d”,”x”]
INSERT:
Programs:-
Program 1 ::
Program 2::
10 | P a g e
Panchal achyut
Program 3::
Program 4::
Program 5::
Program 6::
Program 7::
Program 8::
11 | P a g e
Panchal achyut
Program 9::
12 | P a g e
Panchal achyut
Program:-
Output:-
13 | P a g e
Panchal achyut
DAY – 5
On day 5, We learn about set, dictionary, and tuple data types.
We also learn about file handling, How to write any file, How to appendfile and how to
create a file using python.
Set Operation:-
value1 = {"KN","Parth",99,"hello",2}
print(value1)
print(list(value1))
value1.add("25")
print(value1)
value1.pop()
print(value1 )
value1.clear()
print(value1)
# del value1
# print(value1)
14 | P a g e
Panchal achyut
❖ Output
Tuple Operation :-
Tuple is immutable data type so we can not change it. Therefore we don’t
havemany operation to do on tuple.
value1 = (1,3,4,7,5,6,"ABC",10)
print(value1) print(len(value1))
print(value1.index("ABC"))
15 | P a g e
Panchal achyut
❖ Output
Dictionary Operation :-
print(dict1.get("Programs")) print(dict1.get("UserData"))
dict1["UserData"] = {"Name": "Parth", "ContactNo": 999}
print(dict1)
print(dict1["UserData" ])
print(dict1["UserData"]["ContactNo"])
dict1["Programs"] = ["Python", "Php", "Web Design", "Java Script", "C++"]
print(dict1)
print(dict1["Programs"])
for i in dict1["Programs"]:
16 | P a g e
Panchal achyut
print(i) print(len(dict1["Programs"]))
dict1.pop("Result") print(dict1)
key = [] value
= [] f
or i, j in
dict1.items(): key.append(i)
value.append(j)
print(key, value)
17 | P a g e
Panchal achyut
❖ Output
fileName = "SessionDemo.txt" #
with open(fileName,"w") as value1:
# message= "Hello Everyone, Good Evening"
# value1.write(message) # print(value1) for i in range(3):
with open("SessionDemo"+str(i)+".txt","w") as value1:
message= input("Enter Message : ")
value1.write(message) print(value1)
18 | P a g e
Panchal achyut
❖ Output
||| DAY - 6
Explore File Handling in depth.
Python too supports file handling and allows users to handle files i.e., to read and write
files, along with many other file handling options, to operate on files.
1. File Write:
➢ It opens the file to write only. It overwrites the file if it previously exists or creates a
new one if no file exists with the same name. The file pointer exists at the
beginning of the file.
2. File Read:
➢ It opens the file to read-only mode. The file pointer exists at the beginning. The file
is by default open in this mode if no access mode is passed.
3.File Append:
19 | P a g e
Panchal achyut
➢ It opens the file in the append mode. The file pointer exists at the end of the
previously written file if there exists any. It creates a new file if no file exists with
the same name.
||| DAY – 7
Explain Django in detail and install and work with Django on your device.
What is Django?
20 | P a g e
Panchal achyut
Why Django framework?
Step 1:
Visit https://pypi.org/project/Django/ and search Django on the search
bar.
Step 2:
Copy the code and paste it in the Terminal and check if Django is installed by
importing it in python environment which I check through terminal.
21 | P a g e
Panchal achyut
After installing Django, we can go through the steps of creating a new Django
project:
Step 3.
Open the directory in your text editor of choice. You’ll notice that some files have been
created for you. We won’t need to look at most of these for now, but there are three that
will be very important from the start:
manage.py is what we use to execute commands on our terminal. We won’t have to edit
it, but we’ll use it often. Settings.py contains some important configuration settings for
our new project. There are some default settings, but we may wish to change some of
them from time to time. urls.py contains directions fo where users should be routed after
navigating to a certain URL.
22 | P a g e
Panchal achyut
Step 4.
Start the project by running python manage.py runserver. This will open a development
server, which you can access by visiting the URL provided. This development server is
being run locally on your machine, meaning other people cannot access your website.
This should bring you to a default landing page Step 5: now migrate the data Run “python
manage.py makemigrations” in terminal. Run “python manage.py migrate” in the
terminal.
23 | P a g e
Panchal achyut
Step 5:
now migrate the data Run “python manage.py makemigrations” in terminal. Run “python
manage.py migrate” in the terminal.
Step 6:
Run “python manage.py createsuperuser” in Terminal Enter username, email ID, and
password of your choice.
Step 7:
Open the admin page by the link we get from the run server. And Create The User name
and Password.
24 | P a g e
Panchal achyut
Day – 8:
See The Basics of Django Module and packages.
25 | P a g e
Panchal achyut
This will Create a Folder or app in the IntershipDjango.
Now you can see the Myapp in the folder and it include all the functions or modules except ‘urls’, so we
should create the ‘url.py’ file.
The urls.py is important because all the links that we move from our start page to other page.
In Myapp, ‘urls.py’.
In View.py,
We create a user defined function LoginView that will so or request to the LoginView
page.
We Will Create a Folder in Myapp Name Template in which all the pages like
LoginView, SignupView Etc... Pages are there.
26 | P a g e
Panchal achyut
Day –9:
Today We Create Another Page with Same Pattern, yesterday we have created LoginView
Page. Today we will create SignupPage With the same pattern.
27 | P a g e
Panchal achyut
After that We create a user defined function SignupView that will so or request to the
SignupView page.
In Template folder we will create a new page signup.html in which our output
will be printed in the administration.
28 | P a g e
Panchal achyut
Output
29 | P a g e
Panchal achyut
–10:
Now today we will see how our app or page we see on Django’s official administration
page
To see our page or app in administration we want to register our code in Myapp
‘admin.py’ file It should register our file or app in the administration in the Myapp.
After make the AppModel we want to migrate the database of the app or page concept to
administration type the following command:-
After Register:
30 | P a g e
Panchal achyut
Day
Now we want to add items or data in the App models, now in Myapp ‘model.py’ we want
to define our data or way to reach the user details to show on the output of the
administration. You will defined the length of the fields. You can find the fields in
Django docs where many docs useful in queries and many more there in Django docs.
As you know it shows the name of the students but not the email and contact no. to do
this, we will create a table like structure etc.
–11:
Today we will continue that we left tomorrow. In Myapp ‘admin.py’ we now add filter, to
filter the students by email…
31 | P a g e
Panchal achyut
You can also add a new model field after done with something. To do this same as we
create It’s a good practice because with the help of filter we fond anyone easily with
the help of him/her name or email or other details etc. you can go with many fields at the
same time.
previous name, email and contact. Now we create password field with the help of docs in
fields.
32 | P a g e
Panchal achyut
Day
You want to do makemigrations and migration again to add the field in database. After
doing the second time adding field you wanted to do makemigrations and migrate it.
–12:
Today we will create a new folder that loads our images or data. As we follow a standard
format by Django, we can’t store image like we do so that’s why we create a new folder
that will store our image in Media Folder. When we load the picture, we cannot find path
by category that’s we create media folde r. Open IntershipDjango go at ‘settings.py’, in
‘settings.py’ go at the bottom of the code and create a path to store and load our images
33 | P a g e
Panchal achyut
Now we will create a New Model in Productapp ‘model.py’, Named ‘ProductModel’ after
CategoryModel. After creating a model, we add several categories that we needed in our
app or page. Now we define or register our model at ‘admin.py’ in Productapp just like
Now in the Productapp ‘admin.py’ you want to define a new class to show the table
type format of the items or data in the Product Model. Here you see we want to add 3
details of a Product Model in our page to display the list of formats.
34 | P a g e
Panchal achyut
Day
now all the items or data are in list format first name after price and
description.
35 | P a g e