[go: up one dir, main page]

0% found this document useful (0 votes)
47 views50 pages

Utsavbb HTML

The document summarizes the internship of Sagar Panchal at BrainyBeam Technologies Pvt Ltd. during the summer of 2021-2022. It includes details like the company profile, internship tasks completed over several days such as learning Python basics, operators and flow control, creating a calculator program, exception handling, and working with data types like sets, tuples and dictionaries. The internship focused on gaining practical experience with Python programming.

Uploaded by

SAGAR PANCHAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views50 pages

Utsavbb HTML

The document summarizes the internship of Sagar Panchal at BrainyBeam Technologies Pvt Ltd. during the summer of 2021-2022. It includes details like the company profile, internship tasks completed over several days such as learning Python basics, operators and flow control, creating a calculator program, exception handling, and working with data types like sets, tuples and dictionaries. The internship focused on gaining practical experience with Python programming.

Uploaded by

SAGAR PANCHAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 50

GUJARAT TECHNOLOGICAL UNIVERSITY

Academic year
(2021-2022)

KILACHAND DEVCHAND POLYTECHNIC

INTERNSHORT UNDER

SUBJECT OF

SUMMER INTERNSHIP (4370001)

D.E. SEMESTER-III

BRANCH - Computer Science and Engineering

Submitted by :-

PANCHAL SAGAR BHARAT BHAI

BrainyBeam Technologies Pvt. Ltd.

Prof. Shweta Rajput Type the Name of Ext. guide

(Internal Guide) (External Guide)

Company Profile
Company Name: BrainyBeam Technologies Pvt Ltd

Address: 118, Sukan Mall , Science city road, Ahmedabad


Contact No: +91 9033237336
Email Id : sagar@brainybeam.com
Website: www.brainybeam.com
About Us
At BrainyBeam, we see Innovation as a clear differentiator. Innovation, along with focus on deep,
long-lasting client relationships and strong domain expertise, drives every facet of our day-to-day
operations.
BrainyBeam Technologies was founded with a vision to address growing businesses' needs of
reducing the time to market and cost effectiveness required to develop and maintain unique
and customized web and mobile solutions. We are uniquely and strategically positioned to
partner with startups and leading brands to help them expand their business and offer the most
effective and cost-efficient solutions that provide revenues and value to their business needs.
Vision
To become the most trusted and preferred offshore IT solutions partner for Startups, SMBs and
Enterprises through innovation and technology leadership. Understanding your ambitious
vision, honing in on its essence, creating a design strategy, and knowing how to technically
execute it is what we do best. Our promise? The integrity of your vision will be maintained and
we'll enhance it to best reach your target customers. With our primary focus on creating
amazing user experiences, we'll help you understand the tradeoffs, prioritize features, and distill
valuable functionality. It's an art form we care about getting right.
Joining Letter
Completion Certificate
Panchal achyut

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.

❖ What Can Python Do?


• Create web application
• Create web site
• Create software
• Connect to database system. It can also read and modify
• Handle big data
• Used for data visualization

❖ 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

||| DAY – 1 = PRINT MESSAGE USING PYTHON

❖ Output

3|Page
Panchal achyut

❖ Python installation:- Link :


https://www.python.org/downloads/

||| DAY - 2 AIM:

4|Page
Panchal achyut
PYTHON OPERATORS , FLOW CONTROL AND CREAT
CALCULATOR.

❖ Python divides the operators in the following groups:


1. Assignment operators
2. Comparison operators
3. Logical operators
4. Identity operators
5. Membership operators
6. Bitwise operators
7. Arithmetic operators

❖ . Python Flow Control


1. If Statement
2. Elif Statement
3. Else Statement

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

||| DAY - 3 AIM:

9|Page
Panchal achyut

❖ Perform different patterns using loop.


❖ Basic knowledge of Range,Append,Insert.

RANGE:
-Range(endpoint) Range(startpoint,end point) Range(startpoint,end point,jumppoint)

APPEND:

Productarry.append(“x” ) [“a”,”b”,””c”,”d”,”x”]

INSERT:

Productarray.insert( 2”,y”) [“a”,”b”,”y”,”c”,”d”]

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::

||DAY 4 :- TRY EXCEPTION


➢ Error in Python can be of two types i.e. Syntax errors and
Exceptions. Errors are the problems in a program due to which
the program will stop the execution. On the other hand,
exceptions are raised when some internal events occur which
changes the normal flow of the program.

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 :-

dict1 = {"Programs": "Python Programming", "Result": True, "Contact": 987,


"UserData":"Parth"}

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

File handling using Python.

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?

Django is a high-level Python web framework that enables rapid development


of secure and maintainable websites. Built by experienced developers, Django
takes care of much of the hassle of web development, so you can focus on
writing your app without needing to reinvent the wheel. It is free and open
source, has a thriving and active community, great documentation, and many
options for free and paid-for support.

Some characteristics of Django are:


➢ Complete
➢ Versatile
➢ Secure
➢ Scalable
➢ Maintainable

➢ Portable Django is an extremely popular and fully featured server-side


web framework, written in Python. This module shows you why Django
is one of the most popular web server frameworks, how to set up a
development environment, and how to start using it to create your own
web applications.

20 | P a g e
Panchal achyut
Why Django framework?

➢ Excellent documentation and high scalability.


➢ Used by top MNCs and companies, such as Instagram, Spotify, Youtube,
Dropbox etc.
➢ Easiest framework to learn, rapid development and batteries fully
charged.

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:

1 Run django-admin startproject PROJECT_NAME to create a number of starter files


for our project.
django-admin startproject web_project .

2. Run cd PROJECT_NAME to navigate into your new project’s directory.

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.

Today We Will Create a Page or App:

To create a page or app type the following command on terminal or CMD.

Command: - Python -m django startproject Myapp

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’.

We will add path to reach a page name LoginView

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.

LoginView is a HTML file in which we can add what we wanted to do.

26 | P a g e
Panchal achyut

The Output on the Django Administration site

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.

In ‘urls.py’ we include path of the new page that we create.

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:-

python manage.py makemigrations APPNAME


python manage.py migrate APPNAME
OR
python manage.py makemigrations python
manage.py migrate After Register:

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

After running the server, we get our users filtered by email.

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

You might also like